@langchain/langgraph 1.1.3 → 1.1.5

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.
Files changed (179) hide show
  1. package/dist/channels/any_value.d.cts +0 -1
  2. package/dist/channels/any_value.d.cts.map +1 -1
  3. package/dist/channels/any_value.d.ts +0 -1
  4. package/dist/channels/any_value.d.ts.map +1 -1
  5. package/dist/channels/base.d.cts.map +1 -1
  6. package/dist/channels/base.d.ts.map +1 -1
  7. package/dist/channels/binop.d.cts.map +1 -1
  8. package/dist/channels/binop.d.ts.map +1 -1
  9. package/dist/channels/dynamic_barrier_value.d.cts +0 -10
  10. package/dist/channels/dynamic_barrier_value.d.cts.map +1 -1
  11. package/dist/channels/dynamic_barrier_value.d.ts +0 -10
  12. package/dist/channels/dynamic_barrier_value.d.ts.map +1 -1
  13. package/dist/channels/ephemeral_value.d.cts +0 -1
  14. package/dist/channels/ephemeral_value.d.cts.map +1 -1
  15. package/dist/channels/ephemeral_value.d.ts +0 -1
  16. package/dist/channels/ephemeral_value.d.ts.map +1 -1
  17. package/dist/channels/last_value.d.cts +0 -1
  18. package/dist/channels/last_value.d.cts.map +1 -1
  19. package/dist/channels/last_value.d.ts +0 -1
  20. package/dist/channels/last_value.d.ts.map +1 -1
  21. package/dist/channels/named_barrier_value.d.cts +0 -1
  22. package/dist/channels/named_barrier_value.d.cts.map +1 -1
  23. package/dist/channels/named_barrier_value.d.ts +0 -1
  24. package/dist/channels/named_barrier_value.d.ts.map +1 -1
  25. package/dist/channels/topic.d.cts +0 -1
  26. package/dist/channels/topic.d.cts.map +1 -1
  27. package/dist/channels/topic.d.ts +0 -1
  28. package/dist/channels/topic.d.ts.map +1 -1
  29. package/dist/channels/untracked_value.d.cts +0 -1
  30. package/dist/channels/untracked_value.d.cts.map +1 -1
  31. package/dist/channels/untracked_value.d.ts +0 -1
  32. package/dist/channels/untracked_value.d.ts.map +1 -1
  33. package/dist/constants.d.cts +0 -15
  34. package/dist/constants.d.cts.map +1 -1
  35. package/dist/constants.d.ts +0 -15
  36. package/dist/constants.d.ts.map +1 -1
  37. package/dist/errors.d.cts.map +1 -1
  38. package/dist/errors.d.ts.map +1 -1
  39. package/dist/func/index.d.cts +0 -1
  40. package/dist/func/index.d.cts.map +1 -1
  41. package/dist/func/index.d.ts +0 -1
  42. package/dist/func/index.d.ts.map +1 -1
  43. package/dist/func/types.d.cts +0 -11
  44. package/dist/func/types.d.cts.map +1 -1
  45. package/dist/func/types.d.ts +0 -11
  46. package/dist/func/types.d.ts.map +1 -1
  47. package/dist/graph/annotation.d.cts.map +1 -1
  48. package/dist/graph/annotation.d.ts.map +1 -1
  49. package/dist/graph/graph.d.cts.map +1 -1
  50. package/dist/graph/graph.d.ts.map +1 -1
  51. package/dist/graph/index.d.ts +7 -0
  52. package/dist/graph/message.d.cts.map +1 -1
  53. package/dist/graph/message.d.ts +2 -2
  54. package/dist/graph/message.d.ts.map +1 -1
  55. package/dist/graph/messages_annotation.d.cts +5 -6
  56. package/dist/graph/messages_annotation.d.cts.map +1 -1
  57. package/dist/graph/messages_annotation.d.ts +1 -1
  58. package/dist/graph/messages_annotation.d.ts.map +1 -1
  59. package/dist/graph/messages_reducer.d.cts +0 -1
  60. package/dist/graph/messages_reducer.d.cts.map +1 -1
  61. package/dist/graph/messages_reducer.d.ts +0 -1
  62. package/dist/graph/messages_reducer.d.ts.map +1 -1
  63. package/dist/graph/state.cjs +59 -0
  64. package/dist/graph/state.cjs.map +1 -1
  65. package/dist/graph/state.d.cts +59 -0
  66. package/dist/graph/state.d.cts.map +1 -1
  67. package/dist/graph/state.d.ts +59 -0
  68. package/dist/graph/state.d.ts.map +1 -1
  69. package/dist/graph/state.js +59 -0
  70. package/dist/graph/state.js.map +1 -1
  71. package/dist/graph/types.d.cts +2 -18
  72. package/dist/graph/types.d.cts.map +1 -1
  73. package/dist/graph/types.d.ts +2 -18
  74. package/dist/graph/types.d.ts.map +1 -1
  75. package/dist/graph/zod/index.d.cts +1 -0
  76. package/dist/graph/zod/index.d.ts +1 -0
  77. package/dist/graph/zod/meta.d.cts.map +1 -1
  78. package/dist/graph/zod/meta.d.ts.map +1 -1
  79. package/dist/graph/zod/plugin.d.cts +30 -0
  80. package/dist/graph/zod/plugin.d.cts.map +1 -0
  81. package/dist/graph/zod/plugin.d.ts +30 -0
  82. package/dist/graph/zod/plugin.d.ts.map +1 -0
  83. package/dist/graph/zod/schema.d.cts +0 -1
  84. package/dist/graph/zod/schema.d.cts.map +1 -1
  85. package/dist/graph/zod/schema.d.ts +0 -1
  86. package/dist/graph/zod/schema.d.ts.map +1 -1
  87. package/dist/graph/zod/zod-registry.d.cts +0 -1
  88. package/dist/graph/zod/zod-registry.d.cts.map +1 -1
  89. package/dist/graph/zod/zod-registry.d.ts +0 -1
  90. package/dist/graph/zod/zod-registry.d.ts.map +1 -1
  91. package/dist/interrupt.d.cts.map +1 -1
  92. package/dist/interrupt.d.ts.map +1 -1
  93. package/dist/prebuilt/agentName.d.cts +0 -17
  94. package/dist/prebuilt/agentName.d.cts.map +1 -1
  95. package/dist/prebuilt/agentName.d.ts +0 -17
  96. package/dist/prebuilt/agentName.d.ts.map +1 -1
  97. package/dist/prebuilt/agent_executor.d.cts +5 -5
  98. package/dist/prebuilt/agent_executor.d.cts.map +1 -1
  99. package/dist/prebuilt/agent_executor.d.ts +6 -5
  100. package/dist/prebuilt/agent_executor.d.ts.map +1 -1
  101. package/dist/prebuilt/chat_agent_executor.d.cts.map +1 -1
  102. package/dist/prebuilt/chat_agent_executor.d.ts.map +1 -1
  103. package/dist/prebuilt/interrupt.d.cts.map +1 -1
  104. package/dist/prebuilt/interrupt.d.ts.map +1 -1
  105. package/dist/prebuilt/react_agent_executor.d.cts +8 -14
  106. package/dist/prebuilt/react_agent_executor.d.cts.map +1 -1
  107. package/dist/prebuilt/react_agent_executor.d.ts +10 -14
  108. package/dist/prebuilt/react_agent_executor.d.ts.map +1 -1
  109. package/dist/prebuilt/tool_executor.d.cts.map +1 -1
  110. package/dist/prebuilt/tool_executor.d.ts.map +1 -1
  111. package/dist/prebuilt/tool_node.d.cts.map +1 -1
  112. package/dist/prebuilt/tool_node.d.ts.map +1 -1
  113. package/dist/pregel/algo.d.cts +0 -1
  114. package/dist/pregel/algo.d.cts.map +1 -1
  115. package/dist/pregel/algo.d.ts +5 -1
  116. package/dist/pregel/algo.d.ts.map +1 -1
  117. package/dist/pregel/index.d.cts.map +1 -1
  118. package/dist/pregel/index.d.ts.map +1 -1
  119. package/dist/pregel/read.d.cts +0 -1
  120. package/dist/pregel/read.d.cts.map +1 -1
  121. package/dist/pregel/read.d.ts +1 -1
  122. package/dist/pregel/read.d.ts.map +1 -1
  123. package/dist/pregel/remote.cjs +1 -1
  124. package/dist/pregel/remote.cjs.map +1 -1
  125. package/dist/pregel/remote.d.cts.map +1 -1
  126. package/dist/pregel/remote.d.ts +2 -0
  127. package/dist/pregel/remote.d.ts.map +1 -1
  128. package/dist/pregel/remote.js +2 -2
  129. package/dist/pregel/remote.js.map +1 -1
  130. package/dist/pregel/runnable_types.d.cts.map +1 -1
  131. package/dist/pregel/runnable_types.d.ts.map +1 -1
  132. package/dist/pregel/stream.d.ts +2 -0
  133. package/dist/pregel/types.d.cts +0 -7
  134. package/dist/pregel/types.d.cts.map +1 -1
  135. package/dist/pregel/types.d.ts +0 -7
  136. package/dist/pregel/types.d.ts.map +1 -1
  137. package/dist/pregel/utils/config.d.cts +0 -1
  138. package/dist/pregel/utils/config.d.cts.map +1 -1
  139. package/dist/pregel/utils/config.d.ts +0 -1
  140. package/dist/pregel/utils/config.d.ts.map +1 -1
  141. package/dist/pregel/utils/index.d.cts +3 -7
  142. package/dist/pregel/utils/index.d.cts.map +1 -1
  143. package/dist/pregel/utils/index.d.ts +3 -7
  144. package/dist/pregel/utils/index.d.ts.map +1 -1
  145. package/dist/pregel/write.d.cts +0 -1
  146. package/dist/pregel/write.d.cts.map +1 -1
  147. package/dist/pregel/write.d.ts +0 -1
  148. package/dist/pregel/write.d.ts.map +1 -1
  149. package/dist/state/adapter.d.cts +0 -1
  150. package/dist/state/adapter.d.cts.map +1 -1
  151. package/dist/state/adapter.d.ts +0 -1
  152. package/dist/state/adapter.d.ts.map +1 -1
  153. package/dist/state/index.d.ts +7 -0
  154. package/dist/state/prebuilt/index.d.ts +1 -0
  155. package/dist/state/prebuilt/messages.d.cts +2 -2
  156. package/dist/state/prebuilt/messages.d.cts.map +1 -1
  157. package/dist/state/prebuilt/messages.d.ts +2 -2
  158. package/dist/state/prebuilt/messages.d.ts.map +1 -1
  159. package/dist/state/schema.d.cts.map +1 -1
  160. package/dist/state/schema.d.ts +1 -0
  161. package/dist/state/schema.d.ts.map +1 -1
  162. package/dist/state/types.d.cts +0 -20
  163. package/dist/state/types.d.cts.map +1 -1
  164. package/dist/state/types.d.ts +0 -20
  165. package/dist/state/types.d.ts.map +1 -1
  166. package/dist/state/values/reduced.d.cts +0 -1
  167. package/dist/state/values/reduced.d.cts.map +1 -1
  168. package/dist/state/values/reduced.d.ts +0 -1
  169. package/dist/state/values/reduced.d.ts.map +1 -1
  170. package/dist/state/values/untracked.d.cts +0 -1
  171. package/dist/state/values/untracked.d.cts.map +1 -1
  172. package/dist/state/values/untracked.d.ts +0 -1
  173. package/dist/state/values/untracked.d.ts.map +1 -1
  174. package/dist/utils.d.cts.map +1 -1
  175. package/dist/utils.d.ts.map +1 -1
  176. package/dist/web.d.ts +3 -0
  177. package/dist/writer.d.cts.map +1 -1
  178. package/dist/writer.d.ts.map +1 -1
  179. package/package.json +4 -4
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","names":["Command","Interrupt","BaseLangGraphErrorFields","BaseLangGraphError","Error","GraphBubbleUp","GraphRecursionError","GraphValueError","GraphInterrupt","NodeInterrupt","ParentCommand","isParentCommand","isGraphBubbleUp","isGraphInterrupt","EmptyInputError","EmptyChannelError","InvalidUpdateError","MultipleSubgraphsError","UnreachableNodeError","RemoteException","StateGraphInputError","getSubgraphsSeenSet"],"sources":["../src/errors.d.ts"],"sourcesContent":["import { Command, Interrupt } from \"./constants.js\";\nexport type BaseLangGraphErrorFields = {\n lc_error_code?: \"GRAPH_RECURSION_LIMIT\" | \"INVALID_CONCURRENT_GRAPH_UPDATE\" | \"INVALID_GRAPH_NODE_RETURN_VALUE\" | \"MISSING_CHECKPOINTER\" | \"MULTIPLE_SUBGRAPHS\" | \"UNREACHABLE_NODE\";\n};\n/** @category Errors */\nexport declare class BaseLangGraphError extends Error {\n lc_error_code?: string;\n constructor(message?: string, fields?: BaseLangGraphErrorFields);\n}\nexport declare class GraphBubbleUp extends BaseLangGraphError {\n get is_bubble_up(): boolean;\n}\nexport declare class GraphRecursionError extends BaseLangGraphError {\n constructor(message?: string, fields?: BaseLangGraphErrorFields);\n static get unminifiable_name(): string;\n}\nexport declare class GraphValueError extends BaseLangGraphError {\n constructor(message?: string, fields?: BaseLangGraphErrorFields);\n static get unminifiable_name(): string;\n}\nexport declare class GraphInterrupt extends GraphBubbleUp {\n interrupts: Interrupt[];\n constructor(interrupts?: Interrupt[], fields?: BaseLangGraphErrorFields);\n static get unminifiable_name(): string;\n}\n/** Raised by a node to interrupt execution. */\nexport declare class NodeInterrupt extends GraphInterrupt {\n constructor(message: any, fields?: BaseLangGraphErrorFields);\n static get unminifiable_name(): string;\n}\nexport declare class ParentCommand extends GraphBubbleUp {\n command: Command;\n constructor(command: Command);\n static get unminifiable_name(): string;\n}\nexport declare function isParentCommand(e?: unknown): e is ParentCommand;\nexport declare function isGraphBubbleUp(e?: unknown): e is GraphBubbleUp;\nexport declare function isGraphInterrupt(e?: unknown): e is GraphInterrupt;\nexport declare class EmptyInputError extends BaseLangGraphError {\n constructor(message?: string, fields?: BaseLangGraphErrorFields);\n static get unminifiable_name(): string;\n}\nexport declare class EmptyChannelError extends BaseLangGraphError {\n constructor(message?: string, fields?: BaseLangGraphErrorFields);\n static get unminifiable_name(): string;\n}\nexport declare class InvalidUpdateError extends BaseLangGraphError {\n constructor(message?: string, fields?: BaseLangGraphErrorFields);\n static get unminifiable_name(): string;\n}\n/**\n * @deprecated This exception type is no longer thrown.\n */\nexport declare class MultipleSubgraphsError extends BaseLangGraphError {\n constructor(message?: string, fields?: BaseLangGraphErrorFields);\n static get unminifiable_name(): string;\n}\nexport declare class UnreachableNodeError extends BaseLangGraphError {\n constructor(message?: string, fields?: BaseLangGraphErrorFields);\n static get unminifiable_name(): string;\n}\n/**\n * Exception raised when an error occurs in the remote graph.\n */\nexport declare class RemoteException extends BaseLangGraphError {\n constructor(message?: string, fields?: BaseLangGraphErrorFields);\n static get unminifiable_name(): string;\n}\n/**\n * Error thrown when invalid input is provided to a StateGraph.\n *\n * This typically means that the input to the StateGraph constructor or builder\n * did not match the required types. A valid input should be a\n * StateDefinition, an Annotation.Root, or a Zod schema.\n *\n * @example\n * // Example of incorrect usage:\n * try {\n * new StateGraph({ foo: \"bar\" }); // Not a valid input\n * } catch (err) {\n * if (err instanceof StateGraphInputError) {\n * console.error(err.message);\n * }\n * }\n */\nexport declare class StateGraphInputError extends BaseLangGraphError {\n /**\n * Create a new StateGraphInputError.\n * @param message - Optional custom error message.\n * @param fields - Optional additional error fields.\n */\n constructor(message?: string, fields?: BaseLangGraphErrorFields);\n /**\n * The unminifiable (static, human-readable) error name for this error class.\n */\n static get unminifiable_name(): string;\n}\n/**\n * Used for subgraph detection.\n */\nexport declare const getSubgraphsSeenSet: () => any;\n"],"mappings":";;;KACYE,wBAAAA;;AAAZ,CAAA;AAIA;AAAuC,cAAlBC,kBAAAA,SAA2BC,KAAAA,CAAT;eAEIF,CAAAA,EAAAA,MAAAA;aAFKE,CAAAA,OAAAA,CAAAA,EAAAA,MAAAA,EAAAA,MAAAA,CAAAA,EAELF,wBAFKE;;AAI3BC,cAAAA,aAAAA,SAAsBF,kBAAAA,CAAkB;EAGxCG,IAAAA,YAAAA,CAAAA,CAAAA,EAAAA,OAAmB;;AACGJ,cADtBI,mBAAAA,SAA4BH,kBAAAA,CACND;aADMC,CAAAA,OAAA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C1C,WAAA,CAAY,OAAA,WAAkB,MAAA,GAAS,wBAAA;EAAA,WAK5B,iBAAA,CAAA;AAAA;AAAA,cAKA,oBAAA,SAA6B,kBAAA;EACxC,WAAA,CAAY,OAAA,WAAkB,MAAA,GAAS,wBAAA;EAAA,WAK5B,iBAAA,CAAA;AAAA;;;;cAQA,eAAA,SAAwB,kBAAA;EACnC,WAAA,CAAY,OAAA,WAAkB,MAAA,GAAS,wBAAA;EAAA,WAK5B,iBAAA,CAAA;AAAA;;AAlHb;;;;;;;;;;;;AAYA;;;;cA4Ha,oBAAA,SAA6B,kBAAA;EA5HP;;;;;EAkIjC,WAAA,CAAY,OAAA,WAAkB,MAAA,GAAS,wBAAA;EA/HvC;;;EAAA,WAyIW,iBAAA,CAAA;AAAA;;AA9Hb;;cAsIa,mBAAA"}
@@ -8,7 +8,6 @@ import { EntrypointFinal, EntrypointFinalSaveT, EntrypointFunc, EntrypointReturn
8
8
  import { BaseCache, BaseCheckpointSaver, BaseStore } from "@langchain/langgraph-checkpoint";
9
9
 
10
10
  //#region src/func/index.d.ts
11
-
12
11
  /**
13
12
  * Options for the {@link task} function
14
13
  */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","names":["BaseCache","BaseCheckpointSaver","BaseStore","Pregel","PregelNode","END","PREVIOUS","START","EphemeralValue","CachePolicy","RetryPolicy","LastValue","EntrypointFinal","EntrypointReturnT","EntrypointFinalSaveT","EntrypointFunc","TaskFunc","TaskOptions","task","ArgsT","OutputT","Promise","EntrypointOptions","EntrypointFunction","InputT","Record","Awaited","ValueT","SaveT","entrypoint","getPreviousState","StateT"],"sources":["../../src/func/index.d.ts"],"sourcesContent":["import { BaseCache, BaseCheckpointSaver, BaseStore } from \"@langchain/langgraph-checkpoint\";\nimport { Pregel } from \"../pregel/index.js\";\nimport { PregelNode } from \"../pregel/read.js\";\nimport { END, PREVIOUS, START } from \"../constants.js\";\nimport { EphemeralValue } from \"../channels/ephemeral_value.js\";\nimport type { CachePolicy, RetryPolicy } from \"../pregel/utils/index.js\";\nimport { LastValue } from \"../channels/last_value.js\";\nimport { EntrypointFinal, EntrypointReturnT, EntrypointFinalSaveT, EntrypointFunc, TaskFunc } from \"./types.js\";\n/**\n * Options for the {@link task} function\n */\nexport interface TaskOptions {\n /**\n * The name of the task, analogous to the node name in {@link StateGraph}.\n */\n name: string;\n /**\n * The retry policy for the task. Configures how many times and under what conditions\n * the task should be retried if it fails.\n */\n retry?: RetryPolicy;\n /**\n * The cache policy for the task. Configures how the task should be cached.\n */\n cachePolicy?: CachePolicy;\n}\n/**\n * Define a LangGraph task using the `task` function.\n *\n * Tasks can only be called from within an {@link entrypoint} or from within a StateGraph.\n * A task can be called like a regular function with the following differences:\n *\n * - When a checkpointer is enabled, the function inputs and outputs must be serializable.\n * - The wrapped function can only be called from within an entrypoint or StateGraph.\n * - Calling the function produces a promise. This makes it easy to parallelize tasks.\n *\n * @typeParam ArgsT - The type of arguments the task function accepts\n * @typeParam OutputT - The type of value the task function returns\n * @param optionsOrName - Either an {@link TaskOptions} object, or a string for the name of the task\n * @param func - The function that executes this task\n * @returns A proxy function that accepts the same arguments as the original and always returns the result as a Promise\n *\n * @example basic example\n * ```typescript\n * const addOne = task(\"add\", async (a: number) => a + 1);\n *\n * const workflow = entrypoint(\"example\", async (numbers: number[]) => {\n * const promises = numbers.map(n => addOne(n));\n * const results = await Promise.all(promises);\n * return results;\n * });\n *\n * // Call the entrypoint\n * await workflow.invoke([1, 2, 3]); // Returns [2, 3, 4]\n * ```\n *\n * @example using a retry policy\n * ```typescript\n * const addOne = task({\n * name: \"add\",\n * retry: { maxAttempts: 3 }\n * },\n * async (a: number) => a + 1\n * );\n *\n * const workflow = entrypoint(\"example\", async (numbers: number[]) => {\n * const promises = numbers.map(n => addOne(n));\n * const results = await Promise.all(promises);\n * return results;\n * });\n * ```\n * @category Functional API\n */\nexport declare function task<ArgsT extends unknown[], OutputT>(optionsOrName: TaskOptions | string, func: TaskFunc<ArgsT, OutputT>): (...args: ArgsT) => Promise<OutputT>;\n/**\n * Options for the {@link entrypoint} function\n */\nexport type EntrypointOptions = {\n /**\n * The name of the {@link entrypoint}, analogous to the node name in {@link StateGraph}.\n * This name is used for logging, debugging, and checkpoint identification.\n */\n name: string;\n /**\n * The checkpointer for the {@link entrypoint}. Used to save and restore state between\n * invocations of the workflow.\n */\n checkpointer?: BaseCheckpointSaver;\n /**\n * The store for the {@link entrypoint}. Used to persist data across workflow runs.\n */\n store?: BaseStore;\n /**\n * The cache for the {@link entrypoint}. Used to cache values between workflow runs.\n */\n cache?: BaseCache;\n};\n/**\n * Type declaration for the entrypoint function with its properties\n * @category Functional API\n */\nexport interface EntrypointFunction {\n <InputT, OutputT>(optionsOrName: EntrypointOptions | string, func: EntrypointFunc<InputT, OutputT>): Pregel<Record<string, PregelNode<InputT, EntrypointReturnT<OutputT>>>, {\n [START]: EphemeralValue<InputT>;\n [END]: LastValue<EntrypointReturnT<OutputT>>;\n [PREVIOUS]: LastValue<EntrypointFinalSaveT<OutputT>>;\n }, Record<string, unknown>, InputT, EntrypointReturnT<OutputT>, any, Awaited<EntrypointReturnT<OutputT>>>;\n /**\n * A helper utility for use with the functional API that returns a value to the caller,\n * as well as a separate state value to persist to the checkpoint. This allows workflows\n * to maintain state between runs while returning different values to the caller.\n *\n * @typeParam ValueT - The type of the value to return to the caller\n * @typeParam SaveT - The type of the state to save to the checkpoint\n * @param options.value - The value to return to the caller\n * @param options.save - The value to save to the checkpoint\n * @returns An object with the value and save properties\n *\n * @example\n * ```typescript\n * return entrypoint.final({\n * value: \"result for caller\",\n * save: { counter: currentCount + 1 }\n * });\n * ```\n */\n final<ValueT, SaveT>(options: {\n value?: ValueT;\n save?: SaveT;\n }): EntrypointFinal<ValueT, SaveT>;\n}\n/**\n * Define a LangGraph workflow using the `entrypoint` function.\n *\n * ### Function signature\n *\n * The wrapped function must accept at most **two parameters**. The first parameter\n * is the input to the function. The second (optional) parameter is a\n * {@link LangGraphRunnableConfig} object. If you wish to pass multiple parameters to\n * the function, you can pass them as an object.\n *\n * ### Helper functions\n *\n * #### Streaming\n * To write data to the \"custom\" stream, use the {@link getWriter} function, or the\n * {@link LangGraphRunnableConfig.writer} property.\n *\n * #### State management\n * The {@link getPreviousState} function can be used to access the previous state\n * that was returned from the last invocation of the entrypoint on the same thread id.\n *\n * If you wish to save state other than the return value, you can use the\n * {@link entrypoint.final} function.\n *\n * @typeParam InputT - The type of input the entrypoint accepts\n * @typeParam OutputT - The type of output the entrypoint produces\n * @param optionsOrName - Either an {@link EntrypointOptions} object, or a string for the name of the entrypoint\n * @param func - The function that executes this entrypoint\n * @returns A {@link Pregel} instance that can be run to execute the workflow\n *\n * @example Using entrypoint and tasks\n * ```typescript\n * import { task, entrypoint } from \"@langchain/langgraph\";\n * import { MemorySaver } from \"@langchain/langgraph-checkpoint\";\n * import { interrupt, Command } from \"@langchain/langgraph\";\n *\n * const composeEssay = task(\"compose\", async (topic: string) => {\n * await new Promise(r => setTimeout(r, 1000)); // Simulate slow operation\n * return `An essay about ${topic}`;\n * });\n *\n * const reviewWorkflow = entrypoint({\n * name: \"review\",\n * checkpointer: new MemorySaver()\n * }, async (topic: string) => {\n * const essay = await composeEssay(topic);\n * const humanReview = await interrupt({\n * question: \"Please provide a review\",\n * essay\n * });\n * return {\n * essay,\n * review: humanReview\n * };\n * });\n *\n * // Example configuration for the workflow\n * const config = {\n * configurable: {\n * thread_id: \"some_thread\"\n * }\n * };\n *\n * // Topic for the essay\n * const topic = \"cats\";\n *\n * // Stream the workflow to generate the essay and await human review\n * for await (const result of reviewWorkflow.stream(topic, config)) {\n * console.log(result);\n * }\n *\n * // Example human review provided after the interrupt\n * const humanReview = \"This essay is great.\";\n *\n * // Resume the workflow with the provided human review\n * for await (const result of reviewWorkflow.stream(new Command({ resume: humanReview }), config)) {\n * console.log(result);\n * }\n * ```\n *\n * @example Accessing the previous return value\n * ```typescript\n * import { entrypoint, getPreviousState } from \"@langchain/langgraph\";\n * import { MemorySaver } from \"@langchain/langgraph-checkpoint\";\n *\n * const accumulator = entrypoint({\n * name: \"accumulator\",\n * checkpointer: new MemorySaver()\n * }, async (input: string) => {\n * const previous = getPreviousState<number>();\n * return previous !== undefined ? `${previous } ${input}` : input;\n * });\n *\n * const config = {\n * configurable: {\n * thread_id: \"some_thread\"\n * }\n * };\n * await accumulator.invoke(\"hello\", config); // returns \"hello\"\n * await accumulator.invoke(\"world\", config); // returns \"hello world\"\n * ```\n *\n * @example Using entrypoint.final to save a value\n * ```typescript\n * import { entrypoint, getPreviousState } from \"@langchain/langgraph\";\n * import { MemorySaver } from \"@langchain/langgraph-checkpoint\";\n *\n * const myWorkflow = entrypoint({\n * name: \"accumulator\",\n * checkpointer: new MemorySaver()\n * }, async (num: number) => {\n * const previous = getPreviousState<number>();\n *\n * // This will return the previous value to the caller, saving\n * // 2 * num to the checkpoint, which will be used in the next invocation\n * // for the `previous` parameter.\n * return entrypoint.final({\n * value: previous ?? 0,\n * save: 2 * num\n * });\n * });\n *\n * const config = {\n * configurable: {\n * thread_id: \"some_thread\"\n * }\n * };\n *\n * await myWorkflow.invoke(3, config); // 0 (previous was undefined)\n * await myWorkflow.invoke(1, config); // 6 (previous was 3 * 2 from the previous invocation)\n * ```\n * @category Functional API\n */\nexport declare const entrypoint: EntrypointFunction;\n/**\n * A helper utility function for use with the functional API that returns the previous\n * state from the checkpoint from the last invocation of the current thread.\n *\n * This function allows workflows to access state that was saved in previous runs\n * using {@link entrypoint.final}.\n *\n * @typeParam StateT - The type of the state that was previously saved\n * @returns The previous saved state from the last invocation of the current thread\n *\n * @example\n * ```typescript\n * const previousState = getPreviousState<{ counter: number }>();\n * const newCount = (previousState?.counter ?? 0) + 1;\n * ```\n * @category Functional API\n */\nexport declare function getPreviousState<StateT>(): StateT;\n"],"mappings":";;;;;;;;;;;;;AAWA;AAA4B,UAAXiB,WAAAA,CAAW;;;;EA8DJC,IAAAA,EAAAA,MAAI;EAAA;;;;OAA8EF,CAAAA,EArD9FN,WAqD8F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;;;;EA5BL,IAAA;EA8B+C;;;;EAzB/C,YAAA,GAAe,mBAAA;EA4Bb;;;EAxBF,KAAA,GAAQ,SAAA;EA6BE;;;EAxBV,KAAA,GAAQ,SAAA;AAAA;;;;;UAOO,kBAAA;EAAA,kBAEb,aAAA,EAAe,iBAAA,WACf,IAAA,EAAM,cAAA,CAAe,MAAA,EAAQ,OAAA,IAC5B,MAAA,CACD,MAAA,SAAe,UAAA,CAAW,MAAA,EAAQ,iBAAA,CAAkB,OAAA;IAAA,CAEjD,KAAA,GAAQ,cAAA,CAAe,MAAA;IAAA,CACvB,GAAA,GAAM,SAAA,CAAU,iBAAA,CAAkB,OAAA;IAAA,CAClC,QAAA,GAAW,SAAA,CAAU,oBAAA,CAAqB,OAAA;EAAA,GAE7C,MAAA,mBACA,MAAA,EACA,iBAAA,CAAkB,OAAA,QAIlB,OAAA,CAAQ,iBAAA,CAAkB,OAAA;EAdL;;;;;;;;;;;;;;;;;;;EAoCvB,KAAA,gBAAqB,OAAA;IACnB,KAAA,GAAQ,MAAA;IACR,IAAA,GAAO,KAAA;EAAA,IACL,eAAA,CAAgB,MAAA,EAAQ,KAAA;AAAA;;;;;;;;;;;;;;;;;AAuI9B;;;;;AAqHA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cArHa,UAAA,EAAU,kBAAA;;;;;;;;;;;;;;;;;;iBAqHP,gBAAA,QAAA,CAAA,GAA4B,MAAA"}
@@ -8,7 +8,6 @@ import { EntrypointFinal, EntrypointFinalSaveT, EntrypointFunc, EntrypointReturn
8
8
  import { BaseCache, BaseCheckpointSaver, BaseStore } from "@langchain/langgraph-checkpoint";
9
9
 
10
10
  //#region src/func/index.d.ts
11
-
12
11
  /**
13
12
  * Options for the {@link task} function
14
13
  */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":["BaseCache","BaseCheckpointSaver","BaseStore","Pregel","PregelNode","END","PREVIOUS","START","EphemeralValue","CachePolicy","RetryPolicy","LastValue","EntrypointFinal","EntrypointReturnT","EntrypointFinalSaveT","EntrypointFunc","TaskFunc","TaskOptions","task","ArgsT","OutputT","Promise","EntrypointOptions","EntrypointFunction","InputT","Record","Awaited","ValueT","SaveT","entrypoint","getPreviousState","StateT"],"sources":["../../src/func/index.d.ts"],"sourcesContent":["import { BaseCache, BaseCheckpointSaver, BaseStore } from \"@langchain/langgraph-checkpoint\";\nimport { Pregel } from \"../pregel/index.js\";\nimport { PregelNode } from \"../pregel/read.js\";\nimport { END, PREVIOUS, START } from \"../constants.js\";\nimport { EphemeralValue } from \"../channels/ephemeral_value.js\";\nimport type { CachePolicy, RetryPolicy } from \"../pregel/utils/index.js\";\nimport { LastValue } from \"../channels/last_value.js\";\nimport { EntrypointFinal, EntrypointReturnT, EntrypointFinalSaveT, EntrypointFunc, TaskFunc } from \"./types.js\";\n/**\n * Options for the {@link task} function\n */\nexport interface TaskOptions {\n /**\n * The name of the task, analogous to the node name in {@link StateGraph}.\n */\n name: string;\n /**\n * The retry policy for the task. Configures how many times and under what conditions\n * the task should be retried if it fails.\n */\n retry?: RetryPolicy;\n /**\n * The cache policy for the task. Configures how the task should be cached.\n */\n cachePolicy?: CachePolicy;\n}\n/**\n * Define a LangGraph task using the `task` function.\n *\n * Tasks can only be called from within an {@link entrypoint} or from within a StateGraph.\n * A task can be called like a regular function with the following differences:\n *\n * - When a checkpointer is enabled, the function inputs and outputs must be serializable.\n * - The wrapped function can only be called from within an entrypoint or StateGraph.\n * - Calling the function produces a promise. This makes it easy to parallelize tasks.\n *\n * @typeParam ArgsT - The type of arguments the task function accepts\n * @typeParam OutputT - The type of value the task function returns\n * @param optionsOrName - Either an {@link TaskOptions} object, or a string for the name of the task\n * @param func - The function that executes this task\n * @returns A proxy function that accepts the same arguments as the original and always returns the result as a Promise\n *\n * @example basic example\n * ```typescript\n * const addOne = task(\"add\", async (a: number) => a + 1);\n *\n * const workflow = entrypoint(\"example\", async (numbers: number[]) => {\n * const promises = numbers.map(n => addOne(n));\n * const results = await Promise.all(promises);\n * return results;\n * });\n *\n * // Call the entrypoint\n * await workflow.invoke([1, 2, 3]); // Returns [2, 3, 4]\n * ```\n *\n * @example using a retry policy\n * ```typescript\n * const addOne = task({\n * name: \"add\",\n * retry: { maxAttempts: 3 }\n * },\n * async (a: number) => a + 1\n * );\n *\n * const workflow = entrypoint(\"example\", async (numbers: number[]) => {\n * const promises = numbers.map(n => addOne(n));\n * const results = await Promise.all(promises);\n * return results;\n * });\n * ```\n * @category Functional API\n */\nexport declare function task<ArgsT extends unknown[], OutputT>(optionsOrName: TaskOptions | string, func: TaskFunc<ArgsT, OutputT>): (...args: ArgsT) => Promise<OutputT>;\n/**\n * Options for the {@link entrypoint} function\n */\nexport type EntrypointOptions = {\n /**\n * The name of the {@link entrypoint}, analogous to the node name in {@link StateGraph}.\n * This name is used for logging, debugging, and checkpoint identification.\n */\n name: string;\n /**\n * The checkpointer for the {@link entrypoint}. Used to save and restore state between\n * invocations of the workflow.\n */\n checkpointer?: BaseCheckpointSaver;\n /**\n * The store for the {@link entrypoint}. Used to persist data across workflow runs.\n */\n store?: BaseStore;\n /**\n * The cache for the {@link entrypoint}. Used to cache values between workflow runs.\n */\n cache?: BaseCache;\n};\n/**\n * Type declaration for the entrypoint function with its properties\n * @category Functional API\n */\nexport interface EntrypointFunction {\n <InputT, OutputT>(optionsOrName: EntrypointOptions | string, func: EntrypointFunc<InputT, OutputT>): Pregel<Record<string, PregelNode<InputT, EntrypointReturnT<OutputT>>>, {\n [START]: EphemeralValue<InputT>;\n [END]: LastValue<EntrypointReturnT<OutputT>>;\n [PREVIOUS]: LastValue<EntrypointFinalSaveT<OutputT>>;\n }, Record<string, unknown>, InputT, EntrypointReturnT<OutputT>, any, Awaited<EntrypointReturnT<OutputT>>>;\n /**\n * A helper utility for use with the functional API that returns a value to the caller,\n * as well as a separate state value to persist to the checkpoint. This allows workflows\n * to maintain state between runs while returning different values to the caller.\n *\n * @typeParam ValueT - The type of the value to return to the caller\n * @typeParam SaveT - The type of the state to save to the checkpoint\n * @param options.value - The value to return to the caller\n * @param options.save - The value to save to the checkpoint\n * @returns An object with the value and save properties\n *\n * @example\n * ```typescript\n * return entrypoint.final({\n * value: \"result for caller\",\n * save: { counter: currentCount + 1 }\n * });\n * ```\n */\n final<ValueT, SaveT>(options: {\n value?: ValueT;\n save?: SaveT;\n }): EntrypointFinal<ValueT, SaveT>;\n}\n/**\n * Define a LangGraph workflow using the `entrypoint` function.\n *\n * ### Function signature\n *\n * The wrapped function must accept at most **two parameters**. The first parameter\n * is the input to the function. The second (optional) parameter is a\n * {@link LangGraphRunnableConfig} object. If you wish to pass multiple parameters to\n * the function, you can pass them as an object.\n *\n * ### Helper functions\n *\n * #### Streaming\n * To write data to the \"custom\" stream, use the {@link getWriter} function, or the\n * {@link LangGraphRunnableConfig.writer} property.\n *\n * #### State management\n * The {@link getPreviousState} function can be used to access the previous state\n * that was returned from the last invocation of the entrypoint on the same thread id.\n *\n * If you wish to save state other than the return value, you can use the\n * {@link entrypoint.final} function.\n *\n * @typeParam InputT - The type of input the entrypoint accepts\n * @typeParam OutputT - The type of output the entrypoint produces\n * @param optionsOrName - Either an {@link EntrypointOptions} object, or a string for the name of the entrypoint\n * @param func - The function that executes this entrypoint\n * @returns A {@link Pregel} instance that can be run to execute the workflow\n *\n * @example Using entrypoint and tasks\n * ```typescript\n * import { task, entrypoint } from \"@langchain/langgraph\";\n * import { MemorySaver } from \"@langchain/langgraph-checkpoint\";\n * import { interrupt, Command } from \"@langchain/langgraph\";\n *\n * const composeEssay = task(\"compose\", async (topic: string) => {\n * await new Promise(r => setTimeout(r, 1000)); // Simulate slow operation\n * return `An essay about ${topic}`;\n * });\n *\n * const reviewWorkflow = entrypoint({\n * name: \"review\",\n * checkpointer: new MemorySaver()\n * }, async (topic: string) => {\n * const essay = await composeEssay(topic);\n * const humanReview = await interrupt({\n * question: \"Please provide a review\",\n * essay\n * });\n * return {\n * essay,\n * review: humanReview\n * };\n * });\n *\n * // Example configuration for the workflow\n * const config = {\n * configurable: {\n * thread_id: \"some_thread\"\n * }\n * };\n *\n * // Topic for the essay\n * const topic = \"cats\";\n *\n * // Stream the workflow to generate the essay and await human review\n * for await (const result of reviewWorkflow.stream(topic, config)) {\n * console.log(result);\n * }\n *\n * // Example human review provided after the interrupt\n * const humanReview = \"This essay is great.\";\n *\n * // Resume the workflow with the provided human review\n * for await (const result of reviewWorkflow.stream(new Command({ resume: humanReview }), config)) {\n * console.log(result);\n * }\n * ```\n *\n * @example Accessing the previous return value\n * ```typescript\n * import { entrypoint, getPreviousState } from \"@langchain/langgraph\";\n * import { MemorySaver } from \"@langchain/langgraph-checkpoint\";\n *\n * const accumulator = entrypoint({\n * name: \"accumulator\",\n * checkpointer: new MemorySaver()\n * }, async (input: string) => {\n * const previous = getPreviousState<number>();\n * return previous !== undefined ? `${previous } ${input}` : input;\n * });\n *\n * const config = {\n * configurable: {\n * thread_id: \"some_thread\"\n * }\n * };\n * await accumulator.invoke(\"hello\", config); // returns \"hello\"\n * await accumulator.invoke(\"world\", config); // returns \"hello world\"\n * ```\n *\n * @example Using entrypoint.final to save a value\n * ```typescript\n * import { entrypoint, getPreviousState } from \"@langchain/langgraph\";\n * import { MemorySaver } from \"@langchain/langgraph-checkpoint\";\n *\n * const myWorkflow = entrypoint({\n * name: \"accumulator\",\n * checkpointer: new MemorySaver()\n * }, async (num: number) => {\n * const previous = getPreviousState<number>();\n *\n * // This will return the previous value to the caller, saving\n * // 2 * num to the checkpoint, which will be used in the next invocation\n * // for the `previous` parameter.\n * return entrypoint.final({\n * value: previous ?? 0,\n * save: 2 * num\n * });\n * });\n *\n * const config = {\n * configurable: {\n * thread_id: \"some_thread\"\n * }\n * };\n *\n * await myWorkflow.invoke(3, config); // 0 (previous was undefined)\n * await myWorkflow.invoke(1, config); // 6 (previous was 3 * 2 from the previous invocation)\n * ```\n * @category Functional API\n */\nexport declare const entrypoint: EntrypointFunction;\n/**\n * A helper utility function for use with the functional API that returns the previous\n * state from the checkpoint from the last invocation of the current thread.\n *\n * This function allows workflows to access state that was saved in previous runs\n * using {@link entrypoint.final}.\n *\n * @typeParam StateT - The type of the state that was previously saved\n * @returns The previous saved state from the last invocation of the current thread\n *\n * @example\n * ```typescript\n * const previousState = getPreviousState<{ counter: number }>();\n * const newCount = (previousState?.counter ?? 0) + 1;\n * ```\n * @category Functional API\n */\nexport declare function getPreviousState<StateT>(): StateT;\n"],"mappings":";;;;;;;;;;;;;AAWA;AAA4B,UAAXiB,WAAAA,CAAW;;;;EA8DJC,IAAAA,EAAAA,MAAI;EAAA;;;;OAA8EF,CAAAA,EArD9FN,WAqD8FM;;;;EAAsD,WAAA,CAAA,EAjD9IP,WAiD8I;AAIhK;;;;;;AAwBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkKA;AAkBA;;;;;iBAhNwBS,sDAAsDD,4BAA4BD,SAASG,OAAOC,qBAAqBD,UAAUE,QAAQD;;;;KAIrJE,iBAAAA;;;;;;;;;;iBAUOrB;;;;UAIPC;;;;UAIAF;;;;;;UAMKuB,kBAAAA;mCACoBD,kCAAkCP,eAAeS,QAAQJ,WAAWjB,OAAOsB,eAAerB,WAAWoB,QAAQX,kBAAkBO;KAC3Jb,KAAAA,GAAQC,eAAegB;KACvBnB,GAAAA,GAAMM,UAAUE,kBAAkBO;KAClCd,QAAAA,GAAWK,UAAUG,qBAAqBM;KAC5CK,yBAAyBD,QAAQX,kBAAkBO,eAAeM,QAAQb,kBAAkBO;;;;;;;;;;;;;;;;;;;;;YAqBnFO;WACDC;MACPhB,gBAAgBe,QAAQC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAsIX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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cArHa,UAAA,EAAU,kBAAA;;;;;;;;;;;;;;;;;;iBAqHP,gBAAA,QAAA,CAAA,GAA4B,MAAA"}
@@ -1,7 +1,6 @@
1
1
  import { LangGraphRunnableConfig } from "../pregel/runnable_types.cjs";
2
2
 
3
3
  //#region src/func/types.d.ts
4
-
5
4
  /**
6
5
  * Allows the entrypoint function to return a value to the caller, as well as a separate state value to persist to the checkpoint
7
6
  */
@@ -16,12 +15,6 @@ type EntrypointFinal<ValueT, SaveT> = {
16
15
  save?: SaveT;
17
16
  __lg_type: "__pregel_final";
18
17
  };
19
- /**
20
- * Checks if a value is an EntrypointFinal - use this instead of `instanceof`, as value may have been deserialized
21
- * @param value The value to check
22
- * @returns Whether the value is an EntrypointFinal
23
- */
24
-
25
18
  /**
26
19
  * The return type of an entrypoint function.
27
20
  */
@@ -30,10 +23,6 @@ type EntrypointReturnT<OutputT> = OutputT extends EntrypointFinal<infer ValueT,
30
23
  * The value to be saved when a function returns an EntrypointFinal.
31
24
  */
32
25
  type EntrypointFinalSaveT<OutputT> = OutputT extends EntrypointFinal<unknown, infer SaveT> | Promise<EntrypointFinal<unknown, infer SaveT>> ? SaveT : OutputT;
33
- /**
34
- * The value to be returned when a function returns an EntrypointFinal.
35
- */
36
-
37
26
  /**
38
27
  * Checks if an AsyncGenerator exists in the ES target/lib that we're compiling to.
39
28
  *
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.cts","names":["LangGraphRunnableConfig","EntrypointFinal","ValueT","SaveT","isEntrypointFinal","EntrypointReturnT","OutputT","Promise","EntrypointFinalSaveT","EntrypointFinalValueT","AsyncGeneratorExists","AsyncGenerator","EntrypointFunc","InputT","Generator","TaskFunc","ArgsT"],"sources":["../../src/func/types.d.ts"],"sourcesContent":["import { LangGraphRunnableConfig } from \"../pregel/runnable_types.js\";\n/**\n * Allows the entrypoint function to return a value to the caller, as well as a separate state value to persist to the checkpoint\n */\nexport type EntrypointFinal<ValueT, SaveT> = {\n /**\n * The value to return to the caller\n */\n value?: ValueT;\n /**\n * The value to save to the checkpoint\n */\n save?: SaveT;\n __lg_type: \"__pregel_final\";\n};\n/**\n * Checks if a value is an EntrypointFinal - use this instead of `instanceof`, as value may have been deserialized\n * @param value The value to check\n * @returns Whether the value is an EntrypointFinal\n */\nexport declare function isEntrypointFinal<ValueT, SaveT>(value: unknown): value is EntrypointFinal<ValueT, SaveT>;\n/**\n * The return type of an entrypoint function.\n */\nexport type EntrypointReturnT<OutputT> = OutputT extends EntrypointFinal<infer ValueT, unknown> | Promise<EntrypointFinal<infer ValueT, unknown>> ? ValueT : OutputT;\n/**\n * The value to be saved when a function returns an EntrypointFinal.\n */\nexport type EntrypointFinalSaveT<OutputT> = OutputT extends EntrypointFinal<unknown, infer SaveT> | Promise<EntrypointFinal<unknown, infer SaveT>> ? SaveT : OutputT;\n/**\n * The value to be returned when a function returns an EntrypointFinal.\n */\nexport type EntrypointFinalValueT<OutputT> = OutputT extends EntrypointFinal<infer ValueT, infer SaveT> | Promise<EntrypointFinal<infer ValueT, infer SaveT>> ? EntrypointFinal<ValueT, SaveT> : OutputT;\n/**\n * Checks if an AsyncGenerator exists in the ES target/lib that we're compiling to.\n *\n * This is necessary because `tsc --init` targets ES2016 by default, which doesn't include AsyncGenerators.\n *\n * This works because when `skipLibCheck` is true (and it is in the default `tsconfig.json` created by `tsc --init`),\n * TypeScript will replace any unresolved library types with `any`. So, when `AsyncGenerator` doesn't exist, this checks\n * if `any` extends `object`, which it doesn't. When that happens, this type resolves to the `false` literal, and we can\n * use it in the type predicates below to skip over the AsyncGenerator-specific logic.\n *\n * If we didn't have this, then the types below would be checking if the user's function extends `any` in place of the\n * `AsyncGenerator` type, and the type predicate would branch to `never`, disallowing any valid function from being passed\n * to `task` or `entrypoint`.\n */\ntype AsyncGeneratorExists = AsyncGenerator<unknown, unknown, unknown> extends object ? true : false;\n/**\n * Matches valid function signatures for entrypoints. Disallows generator functions.\n */\nexport type EntrypointFunc<InputT, OutputT> = [OutputT] extends never ? (input: InputT, config: LangGraphRunnableConfig) => never : AsyncGeneratorExists extends true ? OutputT extends AsyncGenerator<unknown, unknown, unknown> ? never : OutputT extends Generator<unknown, unknown, unknown> ? never : (input: InputT, config: LangGraphRunnableConfig) => OutputT : OutputT extends Generator<unknown, unknown, unknown> ? never : (input: InputT, config: LangGraphRunnableConfig) => OutputT;\n/**\n * Matches valid function signatures for tasks. Disallows generator functions.\n */\nexport type TaskFunc<ArgsT extends unknown[], OutputT> = [OutputT] extends [\n never\n] ? (...args: ArgsT) => never : AsyncGeneratorExists extends true ? OutputT extends AsyncGenerator<unknown, unknown, unknown> ? never : OutputT extends Generator<unknown, unknown, unknown> ? never : (...args: ArgsT) => OutputT : OutputT extends Generator<unknown, unknown, unknown> ? never : (...args: ArgsT) => OutputT;\nexport {};\n"],"mappings":";;;;;;AAIA;AAA2B,KAAfC,eAAe,CAAA,MAAA,EAAA,KAAA,CAAA,GAAA;;;;EAoBfI,KAAAA,CAAAA,EAhBAH,MAgBAG;EAAiB;;;MAA6EJ,CAAAA,EAZ/FE,KAY+FF;WAARM,EAAAA,gBAAAA;;;;AAIlG;;;;;;;AAA6JD,KAJjJD,iBAIiJC,CAAAA,OAAAA,CAAAA,GAJpHA,OAIoHA,SAJpGL,eAIoGK,CAAAA,KAAAA,OAAAA,EAAAA,OAAAA,CAAAA,GAJ3DC,OAI2DD,CAJnDL,eAImDK,CAAAA,KAAAA,OAAAA,EAAAA,OAAAA,CAAAA,CAAAA,GAJTJ,MAISI,GAJAA,OAIAA;;AAI4C;AAmBzM;AAA0B,KAvBdE,oBAuBc,CAAA,OAAA,CAAA,GAvBkBF,OAuBlB,SAvBkCL,eAuBlC,CAAA,OAAA,EAAA,KAAA,MAAA,CAAA,GAvB0EM,OAuB1E,CAvBkFN,eAuBl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CAEZ,IAAA,EAAM,KAAA,KAAU,OAAA"}
@@ -1,7 +1,6 @@
1
1
  import { LangGraphRunnableConfig } from "../pregel/runnable_types.js";
2
2
 
3
3
  //#region src/func/types.d.ts
4
-
5
4
  /**
6
5
  * Allows the entrypoint function to return a value to the caller, as well as a separate state value to persist to the checkpoint
7
6
  */
@@ -16,12 +15,6 @@ type EntrypointFinal<ValueT, SaveT> = {
16
15
  save?: SaveT;
17
16
  __lg_type: "__pregel_final";
18
17
  };
19
- /**
20
- * Checks if a value is an EntrypointFinal - use this instead of `instanceof`, as value may have been deserialized
21
- * @param value The value to check
22
- * @returns Whether the value is an EntrypointFinal
23
- */
24
-
25
18
  /**
26
19
  * The return type of an entrypoint function.
27
20
  */
@@ -30,10 +23,6 @@ type EntrypointReturnT<OutputT> = OutputT extends EntrypointFinal<infer ValueT,
30
23
  * The value to be saved when a function returns an EntrypointFinal.
31
24
  */
32
25
  type EntrypointFinalSaveT<OutputT> = OutputT extends EntrypointFinal<unknown, infer SaveT> | Promise<EntrypointFinal<unknown, infer SaveT>> ? SaveT : OutputT;
33
- /**
34
- * The value to be returned when a function returns an EntrypointFinal.
35
- */
36
-
37
26
  /**
38
27
  * Checks if an AsyncGenerator exists in the ES target/lib that we're compiling to.
39
28
  *
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","names":["LangGraphRunnableConfig","EntrypointFinal","ValueT","SaveT","isEntrypointFinal","EntrypointReturnT","OutputT","Promise","EntrypointFinalSaveT","EntrypointFinalValueT","AsyncGeneratorExists","AsyncGenerator","EntrypointFunc","InputT","Generator","TaskFunc","ArgsT"],"sources":["../../src/func/types.d.ts"],"sourcesContent":["import { LangGraphRunnableConfig } from \"../pregel/runnable_types.js\";\n/**\n * Allows the entrypoint function to return a value to the caller, as well as a separate state value to persist to the checkpoint\n */\nexport type EntrypointFinal<ValueT, SaveT> = {\n /**\n * The value to return to the caller\n */\n value?: ValueT;\n /**\n * The value to save to the checkpoint\n */\n save?: SaveT;\n __lg_type: \"__pregel_final\";\n};\n/**\n * Checks if a value is an EntrypointFinal - use this instead of `instanceof`, as value may have been deserialized\n * @param value The value to check\n * @returns Whether the value is an EntrypointFinal\n */\nexport declare function isEntrypointFinal<ValueT, SaveT>(value: unknown): value is EntrypointFinal<ValueT, SaveT>;\n/**\n * The return type of an entrypoint function.\n */\nexport type EntrypointReturnT<OutputT> = OutputT extends EntrypointFinal<infer ValueT, unknown> | Promise<EntrypointFinal<infer ValueT, unknown>> ? ValueT : OutputT;\n/**\n * The value to be saved when a function returns an EntrypointFinal.\n */\nexport type EntrypointFinalSaveT<OutputT> = OutputT extends EntrypointFinal<unknown, infer SaveT> | Promise<EntrypointFinal<unknown, infer SaveT>> ? SaveT : OutputT;\n/**\n * The value to be returned when a function returns an EntrypointFinal.\n */\nexport type EntrypointFinalValueT<OutputT> = OutputT extends EntrypointFinal<infer ValueT, infer SaveT> | Promise<EntrypointFinal<infer ValueT, infer SaveT>> ? EntrypointFinal<ValueT, SaveT> : OutputT;\n/**\n * Checks if an AsyncGenerator exists in the ES target/lib that we're compiling to.\n *\n * This is necessary because `tsc --init` targets ES2016 by default, which doesn't include AsyncGenerators.\n *\n * This works because when `skipLibCheck` is true (and it is in the default `tsconfig.json` created by `tsc --init`),\n * TypeScript will replace any unresolved library types with `any`. So, when `AsyncGenerator` doesn't exist, this checks\n * if `any` extends `object`, which it doesn't. When that happens, this type resolves to the `false` literal, and we can\n * use it in the type predicates below to skip over the AsyncGenerator-specific logic.\n *\n * If we didn't have this, then the types below would be checking if the user's function extends `any` in place of the\n * `AsyncGenerator` type, and the type predicate would branch to `never`, disallowing any valid function from being passed\n * to `task` or `entrypoint`.\n */\ntype AsyncGeneratorExists = AsyncGenerator<unknown, unknown, unknown> extends object ? true : false;\n/**\n * Matches valid function signatures for entrypoints. Disallows generator functions.\n */\nexport type EntrypointFunc<InputT, OutputT> = [OutputT] extends never ? (input: InputT, config: LangGraphRunnableConfig) => never : AsyncGeneratorExists extends true ? OutputT extends AsyncGenerator<unknown, unknown, unknown> ? never : OutputT extends Generator<unknown, unknown, unknown> ? never : (input: InputT, config: LangGraphRunnableConfig) => OutputT : OutputT extends Generator<unknown, unknown, unknown> ? never : (input: InputT, config: LangGraphRunnableConfig) => OutputT;\n/**\n * Matches valid function signatures for tasks. Disallows generator functions.\n */\nexport type TaskFunc<ArgsT extends unknown[], OutputT> = [OutputT] extends [\n never\n] ? (...args: ArgsT) => never : AsyncGeneratorExists extends true ? OutputT extends AsyncGenerator<unknown, unknown, unknown> ? never : OutputT extends Generator<unknown, unknown, unknown> ? never : (...args: ArgsT) => OutputT : OutputT extends Generator<unknown, unknown, unknown> ? never : (...args: ArgsT) => OutputT;\nexport {};\n"],"mappings":";;;;;;AAIA;AAA2B,KAAfC,eAAe,CAAA,MAAA,EAAA,KAAA,CAAA,GAAA;;;;EAoBfI,KAAAA,CAAAA,EAhBAH,MAgBAG;EAAiB;;;MAA6EJ,CAAAA,EAZ/FE,KAY+FF;WAARM,EAAAA,gBAAAA;;;;AAIlG;;;;;;;AAA6JD,KAJjJD,iBAIiJC,CAAAA,OAAAA,CAAAA,GAJpHA,OAIoHA,SAJpGL,eAIoGK,CAAAA,KAAAA,OAAAA,EAAAA,OAAAA,CAAAA,GAJ3DC,OAI2DD,CAJnDL,eAImDK,CAAAA,KAAAA,OAAAA,EAAAA,OAAAA,CAAAA,CAAAA,GAJTJ,MAISI,GAJAA,OAIAA;;AAI4C;AAmBzM;AAA0B,KAvBdE,oBAuBc,CAAA,OAAA,CAAA,GAvBkBF,OAuBlB,SAvBkCL,eAuBlC,CAAA,OAAA,EAAA,KAAA,MAAA,CAAA,GAvB0EM,OAuB1E,CAvBkFN,eAuBlF,CAAA,OAAA,EAAA,KAAA,MAAA,CAAA,CAAA,GAvB2HE,KAuB3H,GAvBmIG,OAuBnI;;;;;;;;;;;;;;;;;;AAI1B;KARKI,oBAAAA,GAAuBC,cAQR,CAAA,OAAA,EAAA,OAAA,EAAA,OAAA,CAAA,SAAA,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AgBQ,SAAhBR,CAAAA,OAAAA,EAAAA,OAAAA,EAAAA,OAAAA,CAAAA,GAAAA,KAAAA,GAAAA,CAAAA,GAAAA,IAAAA,EAAyEU,KAAzEV,EAAAA,GAAmFA,OAAnFA"}
1
+ {"version":3,"file":"types.d.ts","names":[],"sources":["../../src/func/types.ts"],"mappings":";;;;;AAKA;KAAY,eAAA;EAAe;;;EAIzB,KAAA,GAAQ,MAAA;EAAR;;;EAKA,IAAA,GAAO,KAAA;EAEP,SAAA;AAAA;;;;KAsBU,iBAAA,YAA6B,OAAA,SACrC,eAAA,0BACA,OAAA,CAAQ,eAAA,2BACR,MAAA,GACA,OAAA;;;;KAKQ,oBAAA,YAAgC,OAAA,SACxC,eAAA,yBACA,OAAA,CAAQ,eAAA,0BACR,KAAA,GACA,OAAA;;;;;AAJJ;;;;;;;;;;KA6BK,oBAAA,GAAuB,cAAA;;;;KAWhB,cAAA,qBAAmC,OAAA,mBAC1C,KAAA,EAAO,MAAA,EAAQ,MAAA,EAAQ,uBAAA,aACxB,oBAAA,gBACA,OAAA,SAAgB,cAAA,sCAEd,OAAA,SAAgB,SAAA,uCAEf,KAAA,EAAO,MAAA,EAAQ,MAAA,EAAQ,uBAAA,KAA4B,OAAA,GACtD,OAAA,SAAgB,SAAA,uCAEf,KAAA,EAAO,MAAA,EAAQ,MAAA,EAAQ,uBAAA,KAA4B,OAAA;;;;KAK5C,QAAA,sCAA8C,OAAA,wBAGlD,IAAA,EAAM,KAAA,aACV,oBAAA,gBACA,OAAA,SAAgB,cAAA,sCAEd,OAAA,SAAgB,SAAA,0CAEZ,IAAA,EAAM,KAAA,KAAU,OAAA,GACtB,OAAA,SAAgB,SAAA,0CAEZ,IAAA,EAAM,KAAA,KAAU,OAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"annotation.d.cts","names":["RunnableLike","BaseChannel","BinaryOperator","BinaryOperatorAggregate","LastValue","SingleReducer","ValueType","UpdateType","StateDefinition","ExtractValueType","C","ReturnType","ExtractUpdateType","StateType","SD","key","NodeType","Partial","AnnotationFunction","S","AnnotationRoot","Annotation","getChannel","V","U"],"sources":["../../src/graph/annotation.d.ts"],"sourcesContent":["import { RunnableLike } from \"../pregel/runnable_types.js\";\nimport { BaseChannel } from \"../channels/base.js\";\nimport { BinaryOperator, BinaryOperatorAggregate } from \"../channels/binop.js\";\nimport { LastValue } from \"../channels/last_value.js\";\nexport type SingleReducer<ValueType, UpdateType = ValueType> = {\n reducer: BinaryOperator<ValueType, UpdateType>;\n default?: () => ValueType;\n} | {\n /**\n * @deprecated Use `reducer` instead\n */\n value: BinaryOperator<ValueType, UpdateType>;\n default?: () => ValueType;\n} | null;\nexport interface StateDefinition {\n [key: string]: BaseChannel | (() => BaseChannel);\n}\ntype ExtractValueType<C> = C extends BaseChannel ? C[\"ValueType\"] : C extends () => BaseChannel ? ReturnType<C>[\"ValueType\"] : never;\ntype ExtractUpdateType<C> = C extends BaseChannel ? C[\"UpdateType\"] : C extends () => BaseChannel ? ReturnType<C>[\"UpdateType\"] : never;\nexport type StateType<SD extends StateDefinition> = {\n [key in keyof SD]: ExtractValueType<SD[key]>;\n};\nexport type UpdateType<SD extends StateDefinition> = {\n [key in keyof SD]?: ExtractUpdateType<SD[key]>;\n};\nexport type NodeType<SD extends StateDefinition> = RunnableLike<StateType<SD>, UpdateType<SD> | Partial<StateType<SD>>>;\n/** @ignore */\nexport interface AnnotationFunction {\n <ValueType>(): LastValue<ValueType>;\n <ValueType, UpdateType = ValueType>(annotation: SingleReducer<ValueType, UpdateType>): BinaryOperatorAggregate<ValueType, UpdateType>;\n Root: <S extends StateDefinition>(sd: S) => AnnotationRoot<S>;\n}\n/**\n * Should not be instantiated directly. See {@link Annotation}.\n */\nexport declare class AnnotationRoot<SD extends StateDefinition> {\n lc_graph_name: string;\n State: StateType<SD>;\n Update: UpdateType<SD>;\n Node: NodeType<SD>;\n spec: SD;\n constructor(s: SD);\n static isInstance(value: unknown): value is AnnotationRoot<StateDefinition>;\n}\n/**\n * Helper that instantiates channels within a StateGraph state.\n *\n * Can be used as a field in an {@link Annotation.Root} wrapper in one of two ways:\n * 1. **Directly**: Creates a channel that stores the most recent value returned from a node.\n * 2. **With a reducer**: Creates a channel that applies the reducer on a node's return value.\n *\n * @example\n * ```ts\n * import { StateGraph, Annotation } from \"@langchain/langgraph\";\n *\n * // Define a state with a single string key named \"currentOutput\"\n * const SimpleAnnotation = Annotation.Root({\n * currentOutput: Annotation<string>,\n * });\n *\n * const graphBuilder = new StateGraph(SimpleAnnotation);\n *\n * // A node in the graph that returns an object with a \"currentOutput\" key\n * // replaces the value in the state. You can get the state type as shown below:\n * const myNode = (state: typeof SimpleAnnotation.State) => {\n * return {\n * currentOutput: \"some_new_value\",\n * };\n * }\n *\n * const graph = graphBuilder\n * .addNode(\"myNode\", myNode)\n * ...\n * .compile();\n * ```\n *\n * @example\n * ```ts\n * import { type BaseMessage, AIMessage } from \"@langchain/core/messages\";\n * import { StateGraph, Annotation } from \"@langchain/langgraph\";\n *\n * // Define a state with a single key named \"messages\" that will\n * // combine a returned BaseMessage or arrays of BaseMessages\n * const AnnotationWithReducer = Annotation.Root({\n * messages: Annotation<BaseMessage[]>({\n * // Different types are allowed for updates\n * reducer: (left: BaseMessage[], right: BaseMessage | BaseMessage[]) => {\n * if (Array.isArray(right)) {\n * return left.concat(right);\n * }\n * return left.concat([right]);\n * },\n * default: () => [],\n * }),\n * });\n *\n * const graphBuilder = new StateGraph(AnnotationWithReducer);\n *\n * // A node in the graph that returns an object with a \"messages\" key\n * // will update the state by combining the existing value with the returned one.\n * const myNode = (state: typeof AnnotationWithReducer.State) => {\n * return {\n * messages: [new AIMessage(\"Some new response\")],\n * };\n * };\n *\n * const graph = graphBuilder\n * .addNode(\"myNode\", myNode)\n * ...\n * .compile();\n * ```\n * @namespace\n * @property Root\n * Helper function that instantiates a StateGraph state. See {@link Annotation} for usage.\n */\nexport declare const Annotation: AnnotationFunction;\nexport declare function getChannel<V, U = V>(reducer: SingleReducer<V,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;;;;AAIA;;;;;;cAqHa,UAAA,EAAY,kBAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"annotation.d.ts","names":["RunnableLike","BaseChannel","BinaryOperator","BinaryOperatorAggregate","LastValue","SingleReducer","ValueType","UpdateType","StateDefinition","ExtractValueType","C","ReturnType","ExtractUpdateType","StateType","SD","key","NodeType","Partial","AnnotationFunction","S","AnnotationRoot","Annotation","getChannel","V","U"],"sources":["../../src/graph/annotation.d.ts"],"sourcesContent":["import { RunnableLike } from \"../pregel/runnable_types.js\";\nimport { BaseChannel } from \"../channels/base.js\";\nimport { BinaryOperator, BinaryOperatorAggregate } from \"../channels/binop.js\";\nimport { LastValue } from \"../channels/last_value.js\";\nexport type SingleReducer<ValueType, UpdateType = ValueType> = {\n reducer: BinaryOperator<ValueType, UpdateType>;\n default?: () => ValueType;\n} | {\n /**\n * @deprecated Use `reducer` instead\n */\n value: BinaryOperator<ValueType, UpdateType>;\n default?: () => ValueType;\n} | null;\nexport interface StateDefinition {\n [key: string]: BaseChannel | (() => BaseChannel);\n}\ntype ExtractValueType<C> = C extends BaseChannel ? C[\"ValueType\"] : C extends () => BaseChannel ? ReturnType<C>[\"ValueType\"] : never;\ntype ExtractUpdateType<C> = C extends BaseChannel ? C[\"UpdateType\"] : C extends () => BaseChannel ? ReturnType<C>[\"UpdateType\"] : never;\nexport type StateType<SD extends StateDefinition> = {\n [key in keyof SD]: ExtractValueType<SD[key]>;\n};\nexport type UpdateType<SD extends StateDefinition> = {\n [key in keyof SD]?: ExtractUpdateType<SD[key]>;\n};\nexport type NodeType<SD extends StateDefinition> = RunnableLike<StateType<SD>, UpdateType<SD> | Partial<StateType<SD>>>;\n/** @ignore */\nexport interface AnnotationFunction {\n <ValueType>(): LastValue<ValueType>;\n <ValueType, UpdateType = ValueType>(annotation: SingleReducer<ValueType, UpdateType>): BinaryOperatorAggregate<ValueType, UpdateType>;\n Root: <S extends StateDefinition>(sd: S) => AnnotationRoot<S>;\n}\n/**\n * Should not be instantiated directly. See {@link Annotation}.\n */\nexport declare class AnnotationRoot<SD extends StateDefinition> {\n lc_graph_name: string;\n State: StateType<SD>;\n Update: UpdateType<SD>;\n Node: NodeType<SD>;\n spec: SD;\n constructor(s: SD);\n static isInstance(value: unknown): value is AnnotationRoot<StateDefinition>;\n}\n/**\n * Helper that instantiates channels within a StateGraph state.\n *\n * Can be used as a field in an {@link Annotation.Root} wrapper in one of two ways:\n * 1. **Directly**: Creates a channel that stores the most recent value returned from a node.\n * 2. **With a reducer**: Creates a channel that applies the reducer on a node's return value.\n *\n * @example\n * ```ts\n * import { StateGraph, Annotation } from \"@langchain/langgraph\";\n *\n * // Define a state with a single string key named \"currentOutput\"\n * const SimpleAnnotation = Annotation.Root({\n * currentOutput: Annotation<string>,\n * });\n *\n * const graphBuilder = new StateGraph(SimpleAnnotation);\n *\n * // A node in the graph that returns an object with a \"currentOutput\" key\n * // replaces the value in the state. You can get the state type as shown below:\n * const myNode = (state: typeof SimpleAnnotation.State) => {\n * return {\n * currentOutput: \"some_new_value\",\n * };\n * }\n *\n * const graph = graphBuilder\n * .addNode(\"myNode\", myNode)\n * ...\n * .compile();\n * ```\n *\n * @example\n * ```ts\n * import { type BaseMessage, AIMessage } from \"@langchain/core/messages\";\n * import { StateGraph, Annotation } from \"@langchain/langgraph\";\n *\n * // Define a state with a single key named \"messages\" that will\n * // combine a returned BaseMessage or arrays of BaseMessages\n * const AnnotationWithReducer = Annotation.Root({\n * messages: Annotation<BaseMessage[]>({\n * // Different types are allowed for updates\n * reducer: (left: BaseMessage[], right: BaseMessage | BaseMessage[]) => {\n * if (Array.isArray(right)) {\n * return left.concat(right);\n * }\n * return left.concat([right]);\n * },\n * default: () => [],\n * }),\n * });\n *\n * const graphBuilder = new StateGraph(AnnotationWithReducer);\n *\n * // A node in the graph that returns an object with a \"messages\" key\n * // will update the state by combining the existing value with the returned one.\n * const myNode = (state: typeof AnnotationWithReducer.State) => {\n * return {\n * messages: [new AIMessage(\"Some new response\")],\n * };\n * };\n *\n * const graph = graphBuilder\n * .addNode(\"myNode\", myNode)\n * ...\n * .compile();\n * ```\n * @namespace\n * @property Root\n * Helper function that instantiates a StateGraph state. See {@link Annotation} for usage.\n */\nexport declare const Annotation: AnnotationFunction;\nexport declare function getChannel<V, U = V>(reducer: SingleReducer<V, U>): BaseChannel<V, U>;\nexport {};\n"],"mappings":";;;;;;KAIYK,sCAAsCC;WACrCJ,eAAeI,WAAWC;EAD3BF,OAAAA,CAAAA,EAAAA,GAAAA,GAEQC,SAFK;CAAA,GAAA;;;;OACZJ,EAMFA,cANEA,CAMaI,SANbJ,EAMwBK,UANxBL,CAAAA;SACOI,CAAAA,EAAAA,GAAAA,GAMAA,SANAA;QAKMA;AAAWC,UAGpBC,eAAAA,CAHoBD;MAA1BL,EAAAA,MAAAA,CAAAA,EAIQD,WAJRC,GAAAA,CAAAA,GAAAA,GAI6BD,WAJ7BC,CAAAA;;KAMNO,gBALwB,CAAA,CAAA,CAAA,GAKFC,CALE,SAKQT,WALR,GAKsBS,CALtB,CAAA,WAAA,CAAA,GAKuCA,CALvC,UAAA,GAAA,GAKuDT,WALvD,IAKqEU,UALrE,CAKgFD,CALhF,CAAA,CAAA,WAAA,CAAA,GAAA,KAAA;AAE7B,KAIKE,iBAJ2B,CAAA,CAAA,CAAA,GAIJF,CAJI,SAIMT,WAJN,GAIoBS,CAJpB,CAAA,YAAA,CAAA,GAIsCA,CAJtC,UAAA,GAAA,GAIsDT,WAJtD,IAIoEU,UAJpE,CAI+ED,CAJ/E,CAAA,CAAA,YAAA,CAAA,GAAA,KAAA;AAAA,KAKpBG,SALoB,CAAA,WAKCL,eALD,CAAA,GAAA,UACbP,MAKDa,EALCb,GAKIQ,gBALJR,CAKqBa,EALrBb,CAKwBc,GALxBd,CAAAA,CAAAA;AAAgC,KAOvCM,UAPuC,CAAA,WAOjBC,eAPiB,CAAA,GAAA,UAE9CC,MAMaK,EANbL,IAMmBG,iBANH,CAMqBE,EANrB,CAMwBC,GANxB,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AA,CAAY,CAAA,EAAG,EAAA;EAAA,OAIR,UAAA,CAAW,KAAA,YAAiB,KAAA,IAAS,cAAA,CAAe,eAAA;AAAA;;;AAtD5D;;;;;;;;;;;;;;;;;;;;;;AAKe;;;;;;;;;;;;;;;;;;;;;;AAShB;;;;;;;;;;;;;;;;;;;AAIA;;;;;;cAqHa,UAAA,EAAY,kBAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"graph.d.cts","names":["Runnable","RunnableConfig","Graph","DrawableGraph","All","BaseCheckpointSaver","RunnableLike","LangGraphRunnableConfig","PregelNode","Pregel","PregelParams","BaseChannel","END","Send","START","RunnableCallable","StateDefinition","StateType","BranchOptions","N","IO","BranchPathReturnValue","CallOptions","Record","Promise","NodeAction","S","U","C","Branch","Omit","NodeSpec","RunInput","RunOutput","AddNodeOptions","Nodes","NodeSpecType","Set","K","NodeInput","NodeOutput","checkpointer","interruptBefore","interruptAfter","name","CompiledGraph","State","Update","ContextType","InputType","OutputType","NodeReturnType","CommandType","StreamCustomType","builder"],"sources":["../../src/graph/graph.d.ts"],"sourcesContent":["import { Runnable, RunnableConfig } from \"@langchain/core/runnables\";\nimport { Graph as DrawableGraph } from \"@langchain/core/runnables/graph\";\nimport { All, BaseCheckpointSaver } from \"@langchain/langgraph-checkpoint\";\nimport type { RunnableLike, LangGraphRunnableConfig } from \"../pregel/runnable_types.js\";\nimport { PregelNode } from \"../pregel/read.js\";\nimport { Pregel } from \"../pregel/index.js\";\nimport type { PregelParams } from \"../pregel/types.js\";\nimport { BaseChannel } from \"../channels/base.js\";\nimport { END, Send, START } from \"../constants.js\";\nimport { RunnableCallable } from \"../utils.js\";\nimport { StateDefinition, StateType } from \"./annotation.js\";\nexport interface BranchOptions<IO, N extends string, CallOptions extends LangGraphRunnableConfig = LangGraphRunnableConfig> {\n source: N;\n path: RunnableLike<IO, BranchPathReturnValue, CallOptions>;\n pathMap?: Record<string, N | typeof END> | (N | typeof END)[];\n}\nexport type BranchPathReturnValue = string | Send | (string | Send)[] | Promise<string | Send | (string | Send)[]>;\ntype NodeAction<S, U, C extends StateDefinition> = RunnableLike<S, U extends object ? U & Record<string, any> : U, LangGraphRunnableConfig<StateType<C>>>;\nexport declare class Branch<IO, N extends string, CallOptions extends LangGraphRunnableConfig = LangGraphRunnableConfig> {\n path: Runnable<IO, BranchPathReturnValue, CallOptions>;\n ends?: Record<string, N | typeof END>;\n constructor(options: Omit<BranchOptions<IO, N, CallOptions>, \"source\">);\n run(writer: (dests: (string | Send)[], config: LangGraphRunnableConfig) => Runnable | void | Promise<void>, reader?: (config: CallOptions) => IO): RunnableCallable<unknown, unknown>;\n _route(input: IO, config: CallOptions, writer: (dests: (string | Send)[], config: LangGraphRunnableConfig) => Runnable | void | Promise<void>, reader?: (config: CallOptions) => IO): Promise<Runnable | any>;\n}\nexport type NodeSpec<RunInput, RunOutput> = {\n runnable: Runnable<RunInput, RunOutput>;\n metadata?: Record<string, unknown>;\n subgraphs?: Pregel<any, any>[];\n ends?: string[];\n defer?: boolean;\n};\nexport type AddNodeOptions<Nodes extends string = string> = {\n metadata?: Record<string, unknown>;\n subgraphs?: Pregel<any, any>[];\n ends?: Nodes[];\n defer?: boolean;\n};\nexport declare class Graph<N extends string = typeof START | typeof END, RunInput = any, RunOutput = any, NodeSpecType extends NodeSpec<RunInput, RunOutput> = NodeSpec<RunInput, RunOutput>, C extends StateDefinition = StateDefinition> {\n nodes: Record<N, NodeSpecType>;\n edges: Set<[N | typeof START, N | typeof END]>;\n branches: Record<string, Record<string, Branch<RunInput, N, any>>>;\n entryPoint?: string;\n compiled: boolean;\n constructor();\n protected warnIfCompiled(message: string): void;\n get allEdges(): Set<[string, string]>;\n addNode<K extends string, NodeInput = RunInput, NodeOutput = RunOutput>(nodes: Record<K, NodeAction<NodeInput, NodeOutput, C>> | [\n key: K,\n action: NodeAction<NodeInput, NodeOutput, C>,\n options?: AddNodeOptions\n ][]): Graph<N | K, RunInput, RunOutput>;\n addNode<K extends string, NodeInput = RunInput, NodeOutput = RunOutput>(key: K, action: NodeAction<NodeInput, NodeOutput, C>, options?: AddNodeOptions): Graph<N | K, RunInput, RunOutput>;\n addEdge(startKey: N | typeof START, endKey: N | typeof END): this;\n addConditionalEdges(source: BranchOptions<RunInput, N, LangGraphRunnableConfig<StateType<C>>>): this;\n addConditionalEdges(source: N, path: RunnableLike<RunInput, BranchPathReturnValue, LangGraphRunnableConfig<StateType<C>>>, pathMap?: BranchOptions<RunInput, N, LangGraphRunnableConfig<StateType<C>>>[\"pathMap\"]): this;\n /**\n * @deprecated use `addEdge(START, key)` instead\n */\n setEntryPoint(key: N): this;\n /**\n * @deprecated use `addEdge(key, END)` instead\n */\n setFinishPoint(key: N): this;\n compile({ checkpointer, interruptBefore, interruptAfter, name }?: {\n checkpointer?: BaseCheckpointSaver | false;\n interruptBefore?: N[] | All;\n interruptAfter?: N[] | All;\n name?: string;\n }): CompiledGraph<N>;\n validate(interrupt?: string[]): void;\n}\nexport declare class CompiledGraph<N extends string, State = any, Update = any, ContextType extends Record<string, any> = Record<string, any>, InputType = any, OutputType = any, NodeReturnType = unknown, CommandType = unknown, StreamCustomType = any> extends Pregel<Record<N | typeof START, PregelNode<State, Update>>, Record<N | typeof START | typeof END | string, BaseChannel>, ContextType & Record<string, any>, InputType, OutputType, InputType, OutputType, NodeReturnType, CommandType, StreamCustomType> {\n \"~NodeType\": N;\n \"~NodeReturnType\": NodeReturnType;\n \"~RunInput\": Update;\n \"~RunOutput\": State;\n builder: Graph<N, State, Update>;\n constructor({ builder, ...rest }: {\n builder: Graph<N, State, Update>;\n } & PregelParams<Record<N | typeof START, PregelNode<State, Update>>, Record<N | typeof START | typeof END | string, BaseChannel>>);\n attachNode(key: N, node: NodeSpec<State, Update>): void;\n attachEdge(start: N | typeof START, end: N | typeof END): void;\n attachBranch(start: N | typeof START, name: string, branch: Branch<State, N>): void;\n /**\n * Returns a drawable representation of the computation graph.\n */\n getGraphAsync(config?: RunnableConfig & {\n xray?: boolean | number;\n }): Promise<DrawableGraph>;\n /**\n * Returns a drawable representation of the computation graph.\n *\n * @deprecated Use getGraphAsync instead. The async method will be the default in the next minor core release.\n */\n getGraph(config?: RunnableConfig & {\n xray?: boolean | number;\n }): DrawableGraph;\n}\nexport {};\n"],"mappings":";;;;;;;;;;;;;UAWiBkB,wDAAwDX,0BAA0BA;UACvFY;EADKD,IAAAA,EAEPZ,cAFoB,CAEPc,EAFO,EAEHC,qBAFG,EAEoBC,WAFpB,CAAA;EAAA,OAAA,CAAA,EAGhBC,MAHgB,CAAA,MAAA,EAGDJ,CAHC,GAAA,OAGUP,GAHV,CAAA,GAAA,CAGkBO,CAHlB,GAAA,OAG6BP,GAH7B,CAAA,EAAA;;AAAqEL,KAKvFc,qBAAAA,GALuFd,MAAAA,GAKtDM,IALsDN,GAAAA,CAAAA,MAAAA,GAKrCM,IALqCN,CAAAA,EAAAA,GAK3BiB,OAL2BjB,CAAAA,MAAAA,GAKVM,IALUN,GAAAA,CAAAA,MAAAA,GAKOM,IALPN,CAAAA,EAAAA,CAAAA;KAM9FkB,UALON,CAAAA,CAAAA,EAAAA,CAAAA,EAAAA,UAKoBH,eALpBG,CAAAA,GAKuCb,cALvCa,CAKoDO,CALpDP,EAKuDQ,CALvDR,SAAAA,MAAAA,GAK0EQ,CAL1ER,GAK8EI,MAL9EJ,CAAAA,MAAAA,EAAAA,GAAAA,CAAAA,GAKoGQ,CALpGR,EAKuGZ,uBALvGY,CAK+HF,SAL/HE,CAKyIS,CALzIT,CAAAA,CAAAA,CAAAA;AACWC,cAKFS,MALET,CAAAA,EAAAA,EAAAA,UAAAA,MAAAA,EAAAA,oBAK+Cb,uBAL/Ca,GAKyEb,uBALzEa,CAAAA,CAAAA;MAAIC,EAMjBrB,QANiBqB,CAMRD,EANQC,EAMJA,qBANIA,EAMmBC,WANnBD,CAAAA;MAAuBC,CAAAA,EAOvCC,MAPuCD,CAAAA,MAAAA,EAOxBH,CAPwBG,GAAAA,OAObV,GAPaU,CAAAA;aAAxChB,CA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A,UACA,MAAA,EAAQ,MAAA,CAAO,KAAA,EAAO,CAAA;EAvkBJ;;;EAgnBL,aAAA,CACb,MAAA,GAAS,cAAA;IAAmB,IAAA;EAAA,IAC3B,OAAA,CAAQ,KAAA;EAhnBY;;;;;EAqzBd,QAAA,CACP,MAAA,GAAS,cAAA;IAAmB,IAAA;EAAA,IAC3B,KAAA;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"graph.d.ts","names":["Runnable","RunnableConfig","Graph","DrawableGraph","All","BaseCheckpointSaver","RunnableLike","LangGraphRunnableConfig","PregelNode","Pregel","PregelParams","BaseChannel","END","Send","START","RunnableCallable","StateDefinition","StateType","BranchOptions","N","IO","BranchPathReturnValue","CallOptions","Record","Promise","NodeAction","S","U","C","Branch","Omit","NodeSpec","RunInput","RunOutput","AddNodeOptions","Nodes","NodeSpecType","Set","K","NodeInput","NodeOutput","checkpointer","interruptBefore","interruptAfter","name","CompiledGraph","State","Update","ContextType","InputType","OutputType","NodeReturnType","CommandType","StreamCustomType","builder"],"sources":["../../src/graph/graph.d.ts"],"sourcesContent":["import { Runnable, RunnableConfig } from \"@langchain/core/runnables\";\nimport { Graph as DrawableGraph } from \"@langchain/core/runnables/graph\";\nimport { All, BaseCheckpointSaver } from \"@langchain/langgraph-checkpoint\";\nimport type { RunnableLike, LangGraphRunnableConfig } from \"../pregel/runnable_types.js\";\nimport { PregelNode } from \"../pregel/read.js\";\nimport { Pregel } from \"../pregel/index.js\";\nimport type { PregelParams } from \"../pregel/types.js\";\nimport { BaseChannel } from \"../channels/base.js\";\nimport { END, Send, START } from \"../constants.js\";\nimport { RunnableCallable } from \"../utils.js\";\nimport { StateDefinition, StateType } from \"./annotation.js\";\nexport interface BranchOptions<IO, N extends string, CallOptions extends LangGraphRunnableConfig = LangGraphRunnableConfig> {\n source: N;\n path: RunnableLike<IO, BranchPathReturnValue, CallOptions>;\n pathMap?: Record<string, N | typeof END> | (N | typeof END)[];\n}\nexport type BranchPathReturnValue = string | Send | (string | Send)[] | Promise<string | Send | (string | Send)[]>;\ntype NodeAction<S, U, C extends StateDefinition> = RunnableLike<S, U extends object ? U & Record<string, any> : U, LangGraphRunnableConfig<StateType<C>>>;\nexport declare class Branch<IO, N extends string, CallOptions extends LangGraphRunnableConfig = LangGraphRunnableConfig> {\n path: Runnable<IO, BranchPathReturnValue, CallOptions>;\n ends?: Record<string, N | typeof END>;\n constructor(options: Omit<BranchOptions<IO, N, CallOptions>, \"source\">);\n run(writer: (dests: (string | Send)[], config: LangGraphRunnableConfig) => Runnable | void | Promise<void>, reader?: (config: CallOptions) => IO): RunnableCallable<unknown, unknown>;\n _route(input: IO, config: CallOptions, writer: (dests: (string | Send)[], config: LangGraphRunnableConfig) => Runnable | void | Promise<void>, reader?: (config: CallOptions) => IO): Promise<Runnable | any>;\n}\nexport type NodeSpec<RunInput, RunOutput> = {\n runnable: Runnable<RunInput, RunOutput>;\n metadata?: Record<string, unknown>;\n subgraphs?: Pregel<any, any>[];\n ends?: string[];\n defer?: boolean;\n};\nexport type AddNodeOptions<Nodes extends string = string> = {\n metadata?: Record<string, unknown>;\n subgraphs?: Pregel<any, any>[];\n ends?: Nodes[];\n defer?: boolean;\n};\nexport declare class Graph<N extends string = typeof START | typeof END, RunInput = any, RunOutput = any, NodeSpecType extends NodeSpec<RunInput, RunOutput> = NodeSpec<RunInput, RunOutput>, C extends StateDefinition = StateDefinition> {\n nodes: Record<N, NodeSpecType>;\n edges: Set<[N | typeof START, N | typeof END]>;\n branches: Record<string, Record<string, Branch<RunInput, N, any>>>;\n entryPoint?: string;\n compiled: boolean;\n constructor();\n protected warnIfCompiled(message: string): void;\n get allEdges(): Set<[string, string]>;\n addNode<K extends string, NodeInput = RunInput, NodeOutput = RunOutput>(nodes: Record<K, NodeAction<NodeInput, NodeOutput, C>> | [\n key: K,\n action: NodeAction<NodeInput, NodeOutput, C>,\n options?: AddNodeOptions\n ][]): Graph<N | K, RunInput, RunOutput>;\n addNode<K extends string, NodeInput = RunInput, NodeOutput = RunOutput>(key: K, action: NodeAction<NodeInput, NodeOutput, C>, options?: AddNodeOptions): Graph<N | K, RunInput, RunOutput>;\n addEdge(startKey: N | typeof START, endKey: N | typeof END): this;\n addConditionalEdges(source: BranchOptions<RunInput, N, LangGraphRunnableConfig<StateType<C>>>): this;\n addConditionalEdges(source: N, path: RunnableLike<RunInput, BranchPathReturnValue, LangGraphRunnableConfig<StateType<C>>>, pathMap?: BranchOptions<RunInput, N, LangGraphRunnableConfig<StateType<C>>>[\"pathMap\"]): this;\n /**\n * @deprecated use `addEdge(START, key)` instead\n */\n setEntryPoint(key: N): this;\n /**\n * @deprecated use `addEdge(key, END)` instead\n */\n setFinishPoint(key: N): this;\n compile({ checkpointer, interruptBefore, interruptAfter, name }?: {\n checkpointer?: BaseCheckpointSaver | false;\n interruptBefore?: N[] | All;\n interruptAfter?: N[] | All;\n name?: string;\n }): CompiledGraph<N>;\n validate(interrupt?: string[]): void;\n}\nexport declare class CompiledGraph<N extends string, State = any, Update = any, ContextType extends Record<string, any> = Record<string, any>, InputType = any, OutputType = any, NodeReturnType = unknown, CommandType = unknown, StreamCustomType = any> extends Pregel<Record<N | typeof START, PregelNode<State, Update>>, Record<N | typeof START | typeof END | string, BaseChannel>, ContextType & Record<string, any>, InputType, OutputType, InputType, OutputType, NodeReturnType, CommandType, StreamCustomType> {\n \"~NodeType\": N;\n \"~NodeReturnType\": NodeReturnType;\n \"~RunInput\": Update;\n \"~RunOutput\": State;\n builder: Graph<N, State, Update>;\n constructor({ builder, ...rest }: {\n builder: Graph<N, State, Update>;\n } & PregelParams<Record<N | typeof START, PregelNode<State, Update>>, Record<N | typeof START | typeof END | string, BaseChannel>>);\n attachNode(key: N, node: NodeSpec<State, Update>): void;\n attachEdge(start: N | typeof START, end: N | typeof END): void;\n attachBranch(start: N | typeof START, name: string, branch: Branch<State, N>): void;\n /**\n * Returns a drawable representation of the computation graph.\n */\n getGraphAsync(config?: RunnableConfig & {\n xray?: boolean | number;\n }): Promise<DrawableGraph>;\n /**\n * Returns a drawable representation of the computation graph.\n *\n * @deprecated Use getGraphAsync instead. The async method will be the default in the next minor core release.\n */\n getGraph(config?: RunnableConfig & {\n xray?: boolean | number;\n }): DrawableGraph;\n}\nexport {};\n"],"mappings":";;;;;;;;;;;;;UAWiBkB,wDAAwDX,0BAA0BA;UACvFY;EADKD,IAAAA,EAEPZ,cAFoB,CAEPc,EAFO,EAEHC,qBAFG,EAEoBC,WAFpB,CAAA;EAAA,OAAA,CAAA,EAGhBC,MAHgB,CAAA,MAAA,EAGDJ,CAHC,GAAA,OAGUP,GAHV,CAAA,GAAA,CAGkBO,CAHlB,GAAA,OAG6BP,GAH7B,CAAA,EAAA;;AAAqEL,KAKvFc,qBAAAA,GALuFd,MAAAA,GAKtDM,IALsDN,GAAAA,CAAAA,MAAAA,GAKrCM,IALqCN,CAAAA,EAAAA,GAK3BiB,OAL2BjB,CAAAA,MAAAA,GAKVM,IALUN,GAAAA,CAAAA,MAAAA,GAKOM,IALPN,CAAAA,EAAAA,CAAAA;KAM9FkB,UALON,CAAAA,CAAAA,EAAAA,CAAAA,EAAAA,UAKoBH,eALpBG,CAAAA,GAKuCb,cALvCa,CAKoDO,CALpDP,EAKuDQ,CALvDR,SAAAA,MAAAA,GAK0EQ,CAL1ER,GAK8EI,MAL9EJ,CAAAA,MAAAA,EAAAA,GAAAA,CAAAA,GAKoGQ,CALpGR,EAKuGZ,uBALvGY,CAK+HF,SAL/HE,CAKyIS,CALzIT,CAAAA,CAAAA,CAAAA;AACWC,cAKFS,MALET,CAAAA,EAAAA,EAAAA,UAAAA,MAAAA,EAAAA,oBAK+Cb,uBAL/Ca,GAKyEb,uBALzEa,CAAAA,CAAAA;MAAIC,EAMjBrB,QANiBqB,CAMRD,EANQC,EAMJA,qBANIA,EAMmBC,WANnBD,CAAAA;MAAuBC,CAAAA,EAOvCC,MAPuCD,CAAAA,MAAAA,EAOxBH,CAPwBG,GAAAA,OAObV,GAPaU,CAAAA;aAAxChB,CA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A,UACA,MAAA,EAAQ,MAAA,CAAO,KAAA,EAAO,CAAA;EAvkBJ;;;EAgnBL,aAAA,CACb,MAAA,GAAS,cAAA;IAAmB,IAAA;EAAA,IAC3B,OAAA,CAAQ,KAAA;EAhnBY;;;;;EAqzBd,QAAA,CACP,MAAA,GAAS,cAAA;IAAmB,IAAA;EAAA,IAC3B,KAAA;AAAA"}
@@ -0,0 +1,7 @@
1
+ import { Annotation, AnnotationRoot, NodeType, SingleReducer, StateDefinition, StateType, UpdateType } from "./annotation.js";
2
+ import { CommandInstance, CommandParams } from "../constants.js";
3
+ import { CompiledGraph, Graph } from "./graph.js";
4
+ import { ConditionalEdgeRouter, ConditionalEdgeRouterTypes, ContextSchemaInit, ExtractStateType, ExtractUpdateType, GraphNode, GraphNodeReturnValue, GraphNodeTypes, StateDefinitionInit, StateGraphInit, StateGraphOptions } from "./types.js";
5
+ import { CompiledStateGraph, StateGraph, StateGraphArgs } from "./state.js";
6
+ import { Messages, REMOVE_ALL_MESSAGES, messagesStateReducer } from "./messages_reducer.js";
7
+ import { MessageGraph, pushMessage } from "./message.js";
@@ -1 +1 @@
1
- {"version":3,"file":"message.d.cts","names":["BaseMessage","BaseMessageLike","RunnableConfig","StateGraph","Messages","MessageGraph","pushMessage","_langchain_core_messages0","MessageToolSet","MessageStructure","MessageType"],"sources":["../../src/graph/message.d.ts"],"sourcesContent":["import { BaseMessage, BaseMessageLike } from \"@langchain/core/messages\";\nimport type { RunnableConfig } from \"@langchain/core/runnables\";\nimport { StateGraph } from \"./state.js\";\nimport { type Messages } from \"./messages_reducer.js\";\n/** @ignore */\nexport declare class MessageGraph extends StateGraph<BaseMessage[], BaseMessage[], Messages> {\n constructor();\n}\n/**\n * Manually push a message to a message stream.\n *\n * This is useful when you need to push a manually created message before the node\n * has finished executing.\n *\n * When a message is pushed, it will be automatically persisted to the state after the node has finished executing.\n * To disable persisting, set `options.stateKey` to `null`.\n *\n * @param message The message to push. The message must have an ID set, otherwise an error will be thrown.\n * @param options RunnableConfig / Runtime coming from node context.\n */\nexport declare function pushMessage(message: BaseMessage | BaseMessageLike, options?: RunnableConfig & {\n /**\n * The key of the state to push the message to. Set to `null` to avoid persisting.\n * @default \"messages\"\n */\n stateKey?: string | null;\n}): BaseMessage<import(\"@langchain/core/messages\").MessageStructure<import(\"@langchain/core/messages\").MessageToolSet>, import(\"@langchain/core/messages\").MessageType>;\n"],"mappings":";;;;;;;;cAKqBK,YAAAA,SAAqBF,WAAWH,eAAeA,eAAeI;;AAAnF;;;;;;;AAeA;;;;;;AAMqHG,iBAN7FD,WAAAA,CAM2BG,OAAAA,EANNT,WAMMS,GANQR,eAMRQ,EAAAA,QAAAA,EANmCP,cAMnCO,GAAAA;;;;;;IAA/CT,YAAiHO,yBAAAA,CAAlEE,iBANiDF,yBAAAA,CAMGC,cAAAA,GAApCD,yBAAAA,CAAwFG,WAAAA"}
1
+ {"version":3,"file":"message.d.cts","names":[],"sources":["../../src/graph/message.ts"],"mappings":";;;;;;;;cAYa,YAAA,SAAqB,UAAA,CAChC,WAAA,IACA,WAAA,IACA,QAAA;EAEA,WAAA,CAAA;AAAA;;;;;;;;;;;;;iBAwBc,WAAA,CACd,OAAA,EAAS,WAAA,GAAc,eAAA,EACvB,OAAA,GAAU,cAAA;EA1BV;;AAwBF;;EAOI,QAAA;AAAA,IACD,WAAA,CAAA,yBAAA,CAAA,gBAAA,CANuB,yBAAA,CAMvB,cAAA,GAAA,yBAAA,CAAA,WAAA"}
@@ -1,7 +1,7 @@
1
1
  import { StateGraph } from "./state.js";
2
2
  import { Messages } from "./messages_reducer.js";
3
3
  import { RunnableConfig } from "@langchain/core/runnables";
4
- import * as _langchain_core_messages14 from "@langchain/core/messages";
4
+ import * as _langchain_core_messages0 from "@langchain/core/messages";
5
5
  import { BaseMessage, BaseMessageLike } from "@langchain/core/messages";
6
6
 
7
7
  //#region src/graph/message.d.ts
@@ -27,7 +27,7 @@ declare function pushMessage(message: BaseMessage | BaseMessageLike, options?: R
27
27
  * @default "messages"
28
28
  */
29
29
  stateKey?: string | null;
30
- }): BaseMessage<_langchain_core_messages14.MessageStructure<_langchain_core_messages14.MessageToolSet>, _langchain_core_messages14.MessageType>;
30
+ }): BaseMessage<_langchain_core_messages0.MessageStructure<_langchain_core_messages0.MessageToolSet>, _langchain_core_messages0.MessageType>;
31
31
  //#endregion
32
32
  export { MessageGraph, pushMessage };
33
33
  //# sourceMappingURL=message.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"message.d.ts","names":["BaseMessage","BaseMessageLike","RunnableConfig","StateGraph","Messages","MessageGraph","pushMessage","_langchain_core_messages14","MessageToolSet","MessageStructure","MessageType"],"sources":["../../src/graph/message.d.ts"],"sourcesContent":["import { BaseMessage, BaseMessageLike } from \"@langchain/core/messages\";\nimport type { RunnableConfig } from \"@langchain/core/runnables\";\nimport { StateGraph } from \"./state.js\";\nimport { type Messages } from \"./messages_reducer.js\";\n/** @ignore */\nexport declare class MessageGraph extends StateGraph<BaseMessage[], BaseMessage[], Messages> {\n constructor();\n}\n/**\n * Manually push a message to a message stream.\n *\n * This is useful when you need to push a manually created message before the node\n * has finished executing.\n *\n * When a message is pushed, it will be automatically persisted to the state after the node has finished executing.\n * To disable persisting, set `options.stateKey` to `null`.\n *\n * @param message The message to push. The message must have an ID set, otherwise an error will be thrown.\n * @param options RunnableConfig / Runtime coming from node context.\n */\nexport declare function pushMessage(message: BaseMessage | BaseMessageLike, options?: RunnableConfig & {\n /**\n * The key of the state to push the message to. Set to `null` to avoid persisting.\n * @default \"messages\"\n */\n stateKey?: string | null;\n}): BaseMessage<import(\"@langchain/core/messages\").MessageStructure<import(\"@langchain/core/messages\").MessageToolSet>, import(\"@langchain/core/messages\").MessageType>;\n"],"mappings":";;;;;;;;cAKqBK,YAAAA,SAAqBF,WAAWH,eAAeA,eAAeI;;AAAnF;;;;;;;AAeA;;;;;;AAMqHG,iBAN7FD,WAAAA,CAM2BG,OAAAA,EANNT,WAMMS,GANQR,eAMRQ,EAAAA,QAAAA,EANmCP,cAMnCO,GAAAA;;;;;;IAA/CT,YAAiHO,0BAAAA,CAAlEE,iBANiDF,0BAAAA,CAMGC,cAAAA,GAApCD,0BAAAA,CAAwFG,WAAAA"}
1
+ {"version":3,"file":"message.d.ts","names":[],"sources":["../../src/graph/message.ts"],"mappings":";;;;;;;;cAYa,YAAA,SAAqB,UAAA,CAChC,WAAA,IACA,WAAA,IACA,QAAA;EAEA,WAAA,CAAA;AAAA;;;;;;;;;;;;;iBAwBc,WAAA,CACd,OAAA,EAAS,WAAA,GAAc,eAAA,EACvB,OAAA,GAAU,cAAA;EA1BV;;AAwBF;;EAOI,QAAA;AAAA,IACD,WAAA,CAAA,yBAAA,CAAA,gBAAA,CANuB,yBAAA,CAMvB,cAAA,GAAA,yBAAA,CAAA,WAAA"}
@@ -4,11 +4,10 @@ import { AnnotationRoot } from "./annotation.cjs";
4
4
  import { Messages } from "./messages_reducer.cjs";
5
5
  import { z } from "zod/v3";
6
6
  import * as _langchain_core_utils_types0 from "@langchain/core/utils/types";
7
- import * as _langchain_core_messages29 from "@langchain/core/messages";
7
+ import * as _langchain_core_messages0 from "@langchain/core/messages";
8
8
  import { BaseMessage } from "@langchain/core/messages";
9
9
 
10
10
  //#region src/graph/messages_annotation.d.ts
11
-
12
11
  /**
13
12
  * Prebuilt state annotation that combines returned messages.
14
13
  * Can handle standard messages and special modifiers like {@link RemoveMessage}
@@ -45,7 +44,7 @@ import { BaseMessage } from "@langchain/core/messages";
45
44
  * ```
46
45
  */
47
46
  declare const MessagesAnnotation: AnnotationRoot<{
48
- messages: BinaryOperatorAggregate<BaseMessage<_langchain_core_messages29.MessageStructure<_langchain_core_messages29.MessageToolSet>, _langchain_core_messages29.MessageType>[], Messages>;
47
+ messages: BinaryOperatorAggregate<BaseMessage<_langchain_core_messages0.MessageStructure<_langchain_core_messages0.MessageToolSet>, _langchain_core_messages0.MessageType>[], Messages>;
49
48
  }>;
50
49
  /**
51
50
  * Prebuilt schema meta for Zod state definition.
@@ -101,11 +100,11 @@ declare const MessagesZodMeta: SchemaMeta<BaseMessage[], Messages>;
101
100
  * ```
102
101
  */
103
102
  declare const MessagesZodState: z.ZodObject<{
104
- messages: ReducedZodChannel<z.ZodType<BaseMessage<_langchain_core_messages29.MessageStructure<_langchain_core_messages29.MessageToolSet>, _langchain_core_messages29.MessageType>[], z.ZodTypeDef, BaseMessage<_langchain_core_messages29.MessageStructure<_langchain_core_messages29.MessageToolSet>, _langchain_core_messages29.MessageType>[]>, _langchain_core_utils_types0.InteropZodType<Messages>>;
103
+ messages: ReducedZodChannel<z.ZodType<BaseMessage<_langchain_core_messages0.MessageStructure<_langchain_core_messages0.MessageToolSet>, _langchain_core_messages0.MessageType>[], z.ZodTypeDef, BaseMessage<_langchain_core_messages0.MessageStructure<_langchain_core_messages0.MessageToolSet>, _langchain_core_messages0.MessageType>[]>, _langchain_core_utils_types0.InteropZodType<Messages>>;
105
104
  }, "strip", z.ZodTypeAny, {
106
- messages: BaseMessage<_langchain_core_messages29.MessageStructure<_langchain_core_messages29.MessageToolSet>, _langchain_core_messages29.MessageType>[];
105
+ messages: BaseMessage<_langchain_core_messages0.MessageStructure<_langchain_core_messages0.MessageToolSet>, _langchain_core_messages0.MessageType>[];
107
106
  }, {
108
- messages: BaseMessage<_langchain_core_messages29.MessageStructure<_langchain_core_messages29.MessageToolSet>, _langchain_core_messages29.MessageType>[];
107
+ messages: BaseMessage<_langchain_core_messages0.MessageStructure<_langchain_core_messages0.MessageToolSet>, _langchain_core_messages0.MessageType>[];
109
108
  }>;
110
109
  //#endregion
111
110
  export { MessagesAnnotation, MessagesZodMeta, MessagesZodState };
@@ -1 +1 @@
1
- {"version":3,"file":"messages_annotation.d.cts","names":["___web_js7","__annotation_js0","_langchain_core_utils_types0","__zod_meta_js0","BaseMessage","z","Messages","SchemaMeta","MessagesAnnotation","_langchain_core_messages29","MessageToolSet","MessageStructure","MessageType","BinaryOperatorAggregate","AnnotationRoot","MessagesZodMeta","MessagesZodState","ZodTypeDef","ZodType","InteropZodType","ReducedZodChannel","ZodTypeAny","ZodObject"],"sources":["../../src/graph/messages_annotation.d.ts"],"sourcesContent":["import { BaseMessage } from \"@langchain/core/messages\";\nimport { z } from \"zod/v3\";\nimport { Messages } from \"./messages_reducer.js\";\nimport { SchemaMeta } from \"./zod/meta.js\";\n/**\n * Prebuilt state annotation that combines returned messages.\n * Can handle standard messages and special modifiers like {@link RemoveMessage}\n * instances.\n *\n * Specifically, importing and using the prebuilt MessagesAnnotation like this:\n *\n * @example\n * ```ts\n * import { MessagesAnnotation, StateGraph } from \"@langchain/langgraph\";\n *\n * const graph = new StateGraph(MessagesAnnotation)\n * .addNode(...)\n * ...\n * ```\n *\n * Is equivalent to initializing your state manually like this:\n *\n * @example\n * ```ts\n * import { BaseMessage } from \"@langchain/core/messages\";\n * import { Annotation, StateGraph, messagesStateReducer } from \"@langchain/langgraph\";\n *\n * export const StateAnnotation = Annotation.Root({\n * messages: Annotation<BaseMessage[]>({\n * reducer: messagesStateReducer,\n * default: () => [],\n * }),\n * });\n *\n * const graph = new StateGraph(StateAnnotation)\n * .addNode(...)\n * ...\n * ```\n */\nexport declare const MessagesAnnotation: import(\"./annotation.js\").AnnotationRoot<{\n messages: import(\"../web.js\").BinaryOperatorAggregate<BaseMessage<import(\"@langchain/core/messages\").MessageStructure<import(\"@langchain/core/messages\").MessageToolSet>, import(\"@langchain/core/messages\").MessageType>[], Messages>;\n}>;\n/**\n * Prebuilt schema meta for Zod state definition.\n *\n * @example\n * ```ts\n * import { z } from \"zod/v4-mini\";\n * import { MessagesZodState, StateGraph } from \"@langchain/langgraph\";\n *\n * const AgentState = z.object({\n * messages: z.custom<BaseMessage[]>().register(registry, MessagesZodMeta),\n * });\n * ```\n */\nexport declare const MessagesZodMeta: SchemaMeta<BaseMessage[], Messages>;\n/**\n * Prebuilt state object that uses Zod to combine returned messages.\n * This utility is synonymous with the `MessagesAnnotation` annotation,\n * but uses Zod as the way to express messages state.\n *\n * You can use import and use this prebuilt schema like this:\n *\n * @example\n * ```ts\n * import { MessagesZodState, StateGraph } from \"@langchain/langgraph\";\n *\n * const graph = new StateGraph(MessagesZodState)\n * .addNode(...)\n * ...\n * ```\n *\n * Which is equivalent to initializing the schema object manually like this:\n *\n * @example\n * ```ts\n * import { z } from \"zod\";\n * import type { BaseMessage, BaseMessageLike } from \"@langchain/core/messages\";\n * import { StateGraph, messagesStateReducer } from \"@langchain/langgraph\";\n * import \"@langchain/langgraph/zod\";\n *\n * const AgentState = z.object({\n * messages: z\n * .custom<BaseMessage[]>()\n * .default(() => [])\n * .langgraph.reducer(\n * messagesStateReducer,\n * z.custom<BaseMessageLike | BaseMessageLike[]>()\n * ),\n * });\n * const graph = new StateGraph(AgentState)\n * .addNode(...)\n * ...\n * ```\n */\nexport declare const MessagesZodState: z.ZodObject<{\n messages: import(\"./zod/meta.js\").ReducedZodChannel<z.ZodType<BaseMessage<import(\"@langchain/core/messages\").MessageStructure<import(\"@langchain/core/messages\").MessageToolSet>, import(\"@langchain/core/messages\").MessageType>[], z.ZodTypeDef, BaseMessage<import(\"@langchain/core/messages\").MessageStructure<import(\"@langchain/core/messages\").MessageToolSet>, import(\"@langchain/core/messages\").MessageType>[]>, import(\"@langchain/core/utils/types\").InteropZodType<Messages>>;\n}, \"strip\", z.ZodTypeAny, {\n messages: BaseMessage<import(\"@langchain/core/messages\").MessageStructure<import(\"@langchain/core/messages\").MessageToolSet>, import(\"@langchain/core/messages\").MessageType>[];\n}, {\n messages: BaseMessage<import(\"@langchain/core/messages\").MessageStructure<import(\"@langchain/core/messages\").MessageToolSet>, import(\"@langchain/core/messages\").MessageType>[];\n}>;\n"],"mappings":";;;;;;;;;;;;;;;;;AAuCA;;;;;;;;;;AAgBA;;;;;;AAwCA;;;;;;;;;;;;;AAC4dE,cAzDvcM,kBAyDgbW,EAxD5YlB,cAwD4YkB,CAAAA;UAAchB,EAxD1OH,uBAwD0OG,CAxDzZC,WAwDyZD,CAxDxSM,0BAAAA,CAAlEE,gBAwD0WR,CAvDjdM,0BAAAA,CAD2JC,cAAAA,CAwDsTP,EAxD1VM,0BAAAA,CAAwFG,WAAAA,CAwDkQT,EAAAA,EAxDlPG,QAwDkPH,CAAAA;;;;;;;;;;;;;;;cAzC9bY,iBAAiBR,WAAWH,eAAeE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAwC3CU,kBAAkBX,CAAAA,CAAEiB;YAC0anB,kBAA3ZE,CAAAA,CAAEa,QAAQd,YAAiHK,0BAAAA,CAAlEE,iBAK/GF,0BAAAA,CALmKC,cAAAA,GAApCD,0BAAAA,CAAwFG,WAAAA,KAAgBP,CAAAA,CAAEY,YAAYb,YAAiHK,0BAAAA,CAAlEE,iBAAjDF,0BAAAA,CAAqGC,cAAAA,GAApCD,0BAAAA,CAAwFG,WAAAA,MAA8EV,4BAAAA,CAAvBiB,eAAeb;YACxcD,CAAAA,CAAEgB;YACAjB,YAAiHK,0BAAAA,CAAlEE,iBADrCF,0BAAAA,CACyFC,cAAAA,GAApCD,0BAAAA,CAAwFG,WAAAA;;YAEvJR,YAAiHK,0BAAAA,CAAlEE,iBAFpCF,0BAAAA,CAEwFC,cAAAA,GAApCD,0BAAAA,CAAwFG,WAAAA"}
1
+ {"version":3,"file":"messages_annotation.d.cts","names":[],"sources":["../../src/graph/messages_annotation.ts"],"mappings":";;;;;;;;;;;;;;;;AA2CA;;;;;;;;;;;;;;;;;;;;;;AAoBA;;;;;;;cApBa,kBAAA;2FAKX,yBAAA,CAAA,cAAA;;;;;AA4DF;;;;;;;;;;cA7Ca,eAAA,EAAiB,UAAA,CAAW,WAAA,IAAe,QAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA6C3C,gBAAA,EAAgB,CAAA,CAAA,SAAA;+FAE3B,yBAAA,CAAA,cAAA"}
@@ -2,13 +2,13 @@ import { BinaryOperatorAggregate } from "../channels/binop.js";
2
2
  import { ReducedZodChannel, SchemaMeta } from "./zod/meta.js";
3
3
  import { AnnotationRoot } from "./annotation.js";
4
4
  import { Messages } from "./messages_reducer.js";
5
+ import "../web.js";
5
6
  import * as _langchain_core_messages0 from "@langchain/core/messages";
6
7
  import { BaseMessage } from "@langchain/core/messages";
7
8
  import * as _langchain_core_utils_types0 from "@langchain/core/utils/types";
8
9
  import { z } from "zod/v3";
9
10
 
10
11
  //#region src/graph/messages_annotation.d.ts
11
-
12
12
  /**
13
13
  * Prebuilt state annotation that combines returned messages.
14
14
  * Can handle standard messages and special modifiers like {@link RemoveMessage}
@@ -1 +1 @@
1
- {"version":3,"file":"messages_annotation.d.ts","names":["___web_js0","__annotation_js0","_langchain_core_utils_types0","__zod_meta_js0","BaseMessage","z","Messages","SchemaMeta","MessagesAnnotation","_langchain_core_messages0","MessageToolSet","MessageStructure","MessageType","BinaryOperatorAggregate","AnnotationRoot","MessagesZodMeta","MessagesZodState","ZodTypeDef","ZodType","InteropZodType","ReducedZodChannel","ZodTypeAny","ZodObject"],"sources":["../../src/graph/messages_annotation.d.ts"],"sourcesContent":["import { BaseMessage } from \"@langchain/core/messages\";\nimport { z } from \"zod/v3\";\nimport { Messages } from \"./messages_reducer.js\";\nimport { SchemaMeta } from \"./zod/meta.js\";\n/**\n * Prebuilt state annotation that combines returned messages.\n * Can handle standard messages and special modifiers like {@link RemoveMessage}\n * instances.\n *\n * Specifically, importing and using the prebuilt MessagesAnnotation like this:\n *\n * @example\n * ```ts\n * import { MessagesAnnotation, StateGraph } from \"@langchain/langgraph\";\n *\n * const graph = new StateGraph(MessagesAnnotation)\n * .addNode(...)\n * ...\n * ```\n *\n * Is equivalent to initializing your state manually like this:\n *\n * @example\n * ```ts\n * import { BaseMessage } from \"@langchain/core/messages\";\n * import { Annotation, StateGraph, messagesStateReducer } from \"@langchain/langgraph\";\n *\n * export const StateAnnotation = Annotation.Root({\n * messages: Annotation<BaseMessage[]>({\n * reducer: messagesStateReducer,\n * default: () => [],\n * }),\n * });\n *\n * const graph = new StateGraph(StateAnnotation)\n * .addNode(...)\n * ...\n * ```\n */\nexport declare const MessagesAnnotation: import(\"./annotation.js\").AnnotationRoot<{\n messages: import(\"../web.js\").BinaryOperatorAggregate<BaseMessage<import(\"@langchain/core/messages\").MessageStructure<import(\"@langchain/core/messages\").MessageToolSet>, import(\"@langchain/core/messages\").MessageType>[], Messages>;\n}>;\n/**\n * Prebuilt schema meta for Zod state definition.\n *\n * @example\n * ```ts\n * import { z } from \"zod/v4-mini\";\n * import { MessagesZodState, StateGraph } from \"@langchain/langgraph\";\n *\n * const AgentState = z.object({\n * messages: z.custom<BaseMessage[]>().register(registry, MessagesZodMeta),\n * });\n * ```\n */\nexport declare const MessagesZodMeta: SchemaMeta<BaseMessage[], Messages>;\n/**\n * Prebuilt state object that uses Zod to combine returned messages.\n * This utility is synonymous with the `MessagesAnnotation` annotation,\n * but uses Zod as the way to express messages state.\n *\n * You can use import and use this prebuilt schema like this:\n *\n * @example\n * ```ts\n * import { MessagesZodState, StateGraph } from \"@langchain/langgraph\";\n *\n * const graph = new StateGraph(MessagesZodState)\n * .addNode(...)\n * ...\n * ```\n *\n * Which is equivalent to initializing the schema object manually like this:\n *\n * @example\n * ```ts\n * import { z } from \"zod\";\n * import type { BaseMessage, BaseMessageLike } from \"@langchain/core/messages\";\n * import { StateGraph, messagesStateReducer } from \"@langchain/langgraph\";\n * import \"@langchain/langgraph/zod\";\n *\n * const AgentState = z.object({\n * messages: z\n * .custom<BaseMessage[]>()\n * .default(() => [])\n * .langgraph.reducer(\n * messagesStateReducer,\n * z.custom<BaseMessageLike | BaseMessageLike[]>()\n * ),\n * });\n * const graph = new StateGraph(AgentState)\n * .addNode(...)\n * ...\n * ```\n */\nexport declare const MessagesZodState: z.ZodObject<{\n messages: import(\"./zod/meta.js\").ReducedZodChannel<z.ZodType<BaseMessage<import(\"@langchain/core/messages\").MessageStructure<import(\"@langchain/core/messages\").MessageToolSet>, import(\"@langchain/core/messages\").MessageType>[], z.ZodTypeDef, BaseMessage<import(\"@langchain/core/messages\").MessageStructure<import(\"@langchain/core/messages\").MessageToolSet>, import(\"@langchain/core/messages\").MessageType>[]>, import(\"@langchain/core/utils/types\").InteropZodType<Messages>>;\n}, \"strip\", z.ZodTypeAny, {\n messages: BaseMessage<import(\"@langchain/core/messages\").MessageStructure<import(\"@langchain/core/messages\").MessageToolSet>, import(\"@langchain/core/messages\").MessageType>[];\n}, {\n messages: BaseMessage<import(\"@langchain/core/messages\").MessageStructure<import(\"@langchain/core/messages\").MessageToolSet>, import(\"@langchain/core/messages\").MessageType>[];\n}>;\n"],"mappings":";;;;;;;;;;;;;;;;;AAuCA;;;;;;;;;;AAgBA;;;;;;AAwCA;;;;;;;;;;;;;AAC4dE,cAzDvcM,kBAyDgbW,EAxD5YlB,cAwD4YkB,CAAAA;UAAchB,EAxD1OH,uBAwD0OG,CAxDzZC,WAwDyZD,CAxDxSM,yBAAAA,CAAlEE,gBAwD0WR,CAvDjdM,yBAAAA,CAD2JC,cAAAA,CAwDsTP,EAxD1VM,yBAAAA,CAAwFG,WAAAA,CAwDkQT,EAAAA,EAxDlPG,QAwDkPH,CAAAA;;;;;;;;;;;;;;;cAzC9bY,iBAAiBR,WAAWH,eAAeE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAwC3CU,kBAAkBX,CAAAA,CAAEiB;YAC0anB,kBAA3ZE,CAAAA,CAAEa,QAAQd,YAAiHK,yBAAAA,CAAlEE,iBAK/GF,yBAAAA,CALmKC,cAAAA,GAApCD,yBAAAA,CAAwFG,WAAAA,KAAgBP,CAAAA,CAAEY,YAAYb,YAAiHK,yBAAAA,CAAlEE,iBAAjDF,yBAAAA,CAAqGC,cAAAA,GAApCD,yBAAAA,CAAwFG,WAAAA,MAA8EV,4BAAAA,CAAvBiB,eAAeb;YACxcD,CAAAA,CAAEgB;YACAjB,YAAiHK,yBAAAA,CAAlEE,iBADrCF,yBAAAA,CACyFC,cAAAA,GAApCD,yBAAAA,CAAwFG,WAAAA;;YAEvJR,YAAiHK,yBAAAA,CAAlEE,iBAFpCF,yBAAAA,CAEwFC,cAAAA,GAApCD,yBAAAA,CAAwFG,WAAAA"}
1
+ {"version":3,"file":"messages_annotation.d.ts","names":[],"sources":["../../src/graph/messages_annotation.ts"],"mappings":";;;;;;;;;;;;;;;;;;AA2CA;;;;;;;;;;;;;;;;;;;;;;AAoBA;;;;;;cApBa,kBAAA;2FAKX,yBAAA,CAAA,cAAA;;;;;;AA4DF;;;;;;;;;cA7Ca,eAAA,EAAiB,UAAA,CAAW,WAAA,IAAe,QAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA6C3C,gBAAA,EAAgB,CAAA,CAAA,SAAA;+FAE3B,yBAAA,CAAA,cAAA"}
@@ -1,7 +1,6 @@
1
1
  import { BaseMessage, BaseMessageLike } from "@langchain/core/messages";
2
2
 
3
3
  //#region src/graph/messages_reducer.d.ts
4
-
5
4
  /**
6
5
  * Special value that signifies the intent to remove all previous messages in the state reducer.
7
6
  * Used as the unique identifier for a `RemoveMessage` instance which, when encountered,
@@ -1 +1 @@
1
- {"version":3,"file":"messages_reducer.d.cts","names":["BaseMessage","BaseMessageLike","REMOVE_ALL_MESSAGES","Messages","Array","messagesStateReducer"],"sources":["../../src/graph/messages_reducer.d.ts"],"sourcesContent":["import { BaseMessage, BaseMessageLike } from \"@langchain/core/messages\";\n/**\n * Special value that signifies the intent to remove all previous messages in the state reducer.\n * Used as the unique identifier for a `RemoveMessage` instance which, when encountered,\n * causes all prior messages to be discarded, leaving only those following this marker.\n */\nexport declare const REMOVE_ALL_MESSAGES = \"__remove_all__\";\n/**\n * Type that represents an acceptable input for the messages state reducer.\n *\n * - Can be a single `BaseMessage` or `BaseMessageLike`.\n * - Can be an array of `BaseMessage` or `BaseMessageLike`.\n */\nexport type Messages = Array<BaseMessage | BaseMessageLike> | BaseMessage | BaseMessageLike;\n/**\n * Reducer function for combining two sets of messages in LangGraph's state system.\n *\n * This reducer handles several tasks:\n * 1. Normalizes both `left` and `right` message inputs to arrays.\n * 2. Coerces any message-like objects into real `BaseMessage` instances.\n * 3. Ensures all messages have unique, stable IDs by generating missing ones.\n * 4. If a `RemoveMessage` instance is encountered in `right` with the ID `REMOVE_ALL_MESSAGES`,\n * all previous messages are discarded and only the subsequent messages in `right` are returned.\n * 5. Otherwise, merges `left` and `right` messages together following these rules:\n * - If a message in `right` shares an ID with a message in `left`:\n * - If it is a `RemoveMessage`, that message (by ID) is marked for removal.\n * - If it is a normal message, it replaces the message with the same ID from `left`.\n * - If a message in `right` **does not exist** in `left`:\n * - If it is a `RemoveMessage`, this is considered an error (cannot remove non-existent ID).\n * - Otherwise, the message is appended.\n * - Messages flagged for removal are omitted from the final output.\n *\n * @param left - The existing array (or single message) of messages from current state.\n * @param right - The new array (or single message) of messages to be applied.\n * @returns A new array of `BaseMessage` objects representing the updated state.\n *\n * @throws Error if a `RemoveMessage` is used to delete a message with an ID that does not exist in the merged list.\n *\n * @example\n * ```ts\n * const msg1 = new AIMessage(\"hello\");\n * const msg2 = new HumanMessage(\"hi\");\n * const removal = new RemoveMessage({ id: msg1.id });\n * const newState = messagesStateReducer([msg1], [msg2, removal]);\n * // newState will only contain msg2 (msg1 is removed)\n * ```\n */\nexport declare function messagesStateReducer(left: Messages, right: Messages): BaseMessage[];\n"],"mappings":";;;;;;AAMA;AAOA;;AAA6BA,cAPRE,mBAAAA,GAOQF,gBAAAA;;;;;;AAkC7B;AAA4C,KAlChCG,QAAAA,GAAWC,KAkCqB,CAlCfJ,WAkCe,GAlCDC,eAkCC,CAAA,GAlCkBD,WAkClB,GAlCgCC,eAkChC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAApBI,oBAAAA,OAA2BF,iBAAiBA,WAAWH"}
1
+ {"version":3,"file":"messages_reducer.d.cts","names":[],"sources":["../../src/graph/messages_reducer.ts"],"mappings":";;;;;AAaA;;;cAAa,mBAAA;;AAQb;;;;;KAAY,QAAA,GACR,KAAA,CAAM,WAAA,GAAc,eAAA,IACpB,WAAA,GACA,eAAA;;;;;;;;;;;;AAmCJ;;;;;;;;;;;;;;;;;;;;;;iBAAgB,oBAAA,CACd,IAAA,EAAM,QAAA,EACN,KAAA,EAAO,QAAA,GACN,WAAA"}
@@ -1,7 +1,6 @@
1
1
  import { BaseMessage, BaseMessageLike } from "@langchain/core/messages";
2
2
 
3
3
  //#region src/graph/messages_reducer.d.ts
4
-
5
4
  /**
6
5
  * Special value that signifies the intent to remove all previous messages in the state reducer.
7
6
  * Used as the unique identifier for a `RemoveMessage` instance which, when encountered,