@langchain/langgraph 1.3.7 → 1.4.0

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 (199) hide show
  1. package/dist/channels/base.cjs +78 -2
  2. package/dist/channels/base.cjs.map +1 -1
  3. package/dist/channels/base.d.cts +35 -2
  4. package/dist/channels/base.d.cts.map +1 -1
  5. package/dist/channels/base.d.ts +35 -2
  6. package/dist/channels/base.d.ts.map +1 -1
  7. package/dist/channels/base.js +77 -4
  8. package/dist/channels/base.js.map +1 -1
  9. package/dist/channels/delta.cjs +136 -0
  10. package/dist/channels/delta.cjs.map +1 -0
  11. package/dist/channels/delta.d.cts +99 -0
  12. package/dist/channels/delta.d.cts.map +1 -0
  13. package/dist/channels/delta.d.ts +99 -0
  14. package/dist/channels/delta.d.ts.map +1 -0
  15. package/dist/channels/delta.js +136 -0
  16. package/dist/channels/delta.js.map +1 -0
  17. package/dist/channels/index.cjs +5 -0
  18. package/dist/channels/index.d.cts +3 -2
  19. package/dist/channels/index.d.ts +3 -2
  20. package/dist/channels/index.js +3 -2
  21. package/dist/constants.cjs +62 -4
  22. package/dist/constants.cjs.map +1 -1
  23. package/dist/constants.d.cts +33 -2
  24. package/dist/constants.d.cts.map +1 -1
  25. package/dist/constants.d.ts +33 -2
  26. package/dist/constants.d.ts.map +1 -1
  27. package/dist/constants.js +59 -5
  28. package/dist/constants.js.map +1 -1
  29. package/dist/errors.cjs +128 -0
  30. package/dist/errors.cjs.map +1 -1
  31. package/dist/errors.d.cts +86 -1
  32. package/dist/errors.d.cts.map +1 -1
  33. package/dist/errors.d.ts +86 -1
  34. package/dist/errors.d.ts.map +1 -1
  35. package/dist/errors.js +123 -1
  36. package/dist/errors.js.map +1 -1
  37. package/dist/func/index.cjs +9 -2
  38. package/dist/func/index.cjs.map +1 -1
  39. package/dist/func/index.d.cts +14 -0
  40. package/dist/func/index.d.cts.map +1 -1
  41. package/dist/func/index.d.ts +14 -0
  42. package/dist/func/index.d.ts.map +1 -1
  43. package/dist/func/index.js +9 -2
  44. package/dist/func/index.js.map +1 -1
  45. package/dist/graph/graph.cjs +44 -7
  46. package/dist/graph/graph.cjs.map +1 -1
  47. package/dist/graph/graph.d.cts +24 -2
  48. package/dist/graph/graph.d.cts.map +1 -1
  49. package/dist/graph/graph.d.ts +24 -2
  50. package/dist/graph/graph.d.ts.map +1 -1
  51. package/dist/graph/graph.js +44 -7
  52. package/dist/graph/graph.js.map +1 -1
  53. package/dist/graph/index.d.ts +3 -3
  54. package/dist/graph/messages_reducer.cjs +55 -0
  55. package/dist/graph/messages_reducer.cjs.map +1 -1
  56. package/dist/graph/messages_reducer.d.cts +28 -1
  57. package/dist/graph/messages_reducer.d.cts.map +1 -1
  58. package/dist/graph/messages_reducer.d.ts +28 -1
  59. package/dist/graph/messages_reducer.d.ts.map +1 -1
  60. package/dist/graph/messages_reducer.js +56 -2
  61. package/dist/graph/messages_reducer.js.map +1 -1
  62. package/dist/graph/state.cjs +174 -7
  63. package/dist/graph/state.cjs.map +1 -1
  64. package/dist/graph/state.d.cts +193 -17
  65. package/dist/graph/state.d.cts.map +1 -1
  66. package/dist/graph/state.d.ts +193 -17
  67. package/dist/graph/state.d.ts.map +1 -1
  68. package/dist/graph/state.js +175 -8
  69. package/dist/graph/state.js.map +1 -1
  70. package/dist/graph/zod/schema.cjs +5 -0
  71. package/dist/graph/zod/schema.cjs.map +1 -1
  72. package/dist/graph/zod/schema.d.cts.map +1 -1
  73. package/dist/graph/zod/schema.d.ts.map +1 -1
  74. package/dist/graph/zod/schema.js +5 -0
  75. package/dist/graph/zod/schema.js.map +1 -1
  76. package/dist/index.cjs +11 -0
  77. package/dist/index.cjs.map +1 -1
  78. package/dist/index.d.cts +11 -8
  79. package/dist/index.d.ts +11 -8
  80. package/dist/index.js +5 -3
  81. package/dist/index.js.map +1 -1
  82. package/dist/prebuilt/react_agent_executor.d.cts +1 -1
  83. package/dist/pregel/algo.cjs +182 -21
  84. package/dist/pregel/algo.cjs.map +1 -1
  85. package/dist/pregel/algo.d.cts +1 -1
  86. package/dist/pregel/algo.d.cts.map +1 -1
  87. package/dist/pregel/algo.d.ts +1 -1
  88. package/dist/pregel/algo.d.ts.map +1 -1
  89. package/dist/pregel/algo.js +185 -25
  90. package/dist/pregel/algo.js.map +1 -1
  91. package/dist/pregel/call.cjs +2 -1
  92. package/dist/pregel/call.cjs.map +1 -1
  93. package/dist/pregel/call.js +2 -1
  94. package/dist/pregel/call.js.map +1 -1
  95. package/dist/pregel/index.cjs +15 -3
  96. package/dist/pregel/index.cjs.map +1 -1
  97. package/dist/pregel/index.d.cts.map +1 -1
  98. package/dist/pregel/index.d.ts.map +1 -1
  99. package/dist/pregel/index.js +17 -5
  100. package/dist/pregel/index.js.map +1 -1
  101. package/dist/pregel/loop.cjs +362 -41
  102. package/dist/pregel/loop.cjs.map +1 -1
  103. package/dist/pregel/loop.js +365 -44
  104. package/dist/pregel/loop.js.map +1 -1
  105. package/dist/pregel/messages-v2.cjs +1 -1
  106. package/dist/pregel/messages-v2.js +1 -1
  107. package/dist/pregel/messages.cjs +1 -1
  108. package/dist/pregel/messages.js +1 -1
  109. package/dist/pregel/read.cjs +15 -5
  110. package/dist/pregel/read.cjs.map +1 -1
  111. package/dist/pregel/read.d.cts +9 -0
  112. package/dist/pregel/read.d.cts.map +1 -1
  113. package/dist/pregel/read.d.ts +9 -0
  114. package/dist/pregel/read.d.ts.map +1 -1
  115. package/dist/pregel/read.js +15 -5
  116. package/dist/pregel/read.js.map +1 -1
  117. package/dist/pregel/remote-run-stream.cjs +107 -0
  118. package/dist/pregel/remote-run-stream.cjs.map +1 -0
  119. package/dist/pregel/remote-run-stream.d.cts +33 -0
  120. package/dist/pregel/remote-run-stream.d.cts.map +1 -0
  121. package/dist/pregel/remote-run-stream.d.ts +33 -0
  122. package/dist/pregel/remote-run-stream.d.ts.map +1 -0
  123. package/dist/pregel/remote-run-stream.js +107 -0
  124. package/dist/pregel/remote-run-stream.js.map +1 -0
  125. package/dist/pregel/remote.cjs +61 -1
  126. package/dist/pregel/remote.cjs.map +1 -1
  127. package/dist/pregel/remote.d.cts +17 -0
  128. package/dist/pregel/remote.d.cts.map +1 -1
  129. package/dist/pregel/remote.d.ts +17 -0
  130. package/dist/pregel/remote.d.ts.map +1 -1
  131. package/dist/pregel/remote.js +61 -1
  132. package/dist/pregel/remote.js.map +1 -1
  133. package/dist/pregel/replay.cjs +62 -0
  134. package/dist/pregel/replay.cjs.map +1 -0
  135. package/dist/pregel/replay.js +62 -0
  136. package/dist/pregel/replay.js.map +1 -0
  137. package/dist/pregel/retry.cjs +8 -6
  138. package/dist/pregel/retry.cjs.map +1 -1
  139. package/dist/pregel/retry.js +8 -6
  140. package/dist/pregel/retry.js.map +1 -1
  141. package/dist/pregel/runnable_types.d.cts +20 -0
  142. package/dist/pregel/runnable_types.d.cts.map +1 -1
  143. package/dist/pregel/runnable_types.d.ts +20 -0
  144. package/dist/pregel/runnable_types.d.ts.map +1 -1
  145. package/dist/pregel/runner.cjs +48 -7
  146. package/dist/pregel/runner.cjs.map +1 -1
  147. package/dist/pregel/runner.js +50 -9
  148. package/dist/pregel/runner.js.map +1 -1
  149. package/dist/pregel/runtime.cjs +64 -0
  150. package/dist/pregel/runtime.cjs.map +1 -0
  151. package/dist/pregel/runtime.d.cts +57 -0
  152. package/dist/pregel/runtime.d.cts.map +1 -0
  153. package/dist/pregel/runtime.d.ts +57 -0
  154. package/dist/pregel/runtime.d.ts.map +1 -0
  155. package/dist/pregel/runtime.js +64 -0
  156. package/dist/pregel/runtime.js.map +1 -0
  157. package/dist/pregel/stream.cjs +2 -0
  158. package/dist/pregel/stream.cjs.map +1 -1
  159. package/dist/pregel/stream.js +2 -0
  160. package/dist/pregel/stream.js.map +1 -1
  161. package/dist/pregel/timeout.cjs +216 -0
  162. package/dist/pregel/timeout.cjs.map +1 -0
  163. package/dist/pregel/timeout.js +216 -0
  164. package/dist/pregel/timeout.js.map +1 -0
  165. package/dist/pregel/types.cjs +3 -1
  166. package/dist/pregel/types.cjs.map +1 -1
  167. package/dist/pregel/types.d.cts +13 -0
  168. package/dist/pregel/types.d.cts.map +1 -1
  169. package/dist/pregel/types.d.ts +14 -1
  170. package/dist/pregel/types.d.ts.map +1 -1
  171. package/dist/pregel/types.js +3 -1
  172. package/dist/pregel/types.js.map +1 -1
  173. package/dist/pregel/utils/config.cjs +3 -1
  174. package/dist/pregel/utils/config.cjs.map +1 -1
  175. package/dist/pregel/utils/config.d.cts.map +1 -1
  176. package/dist/pregel/utils/config.d.ts.map +1 -1
  177. package/dist/pregel/utils/config.js +3 -1
  178. package/dist/pregel/utils/config.js.map +1 -1
  179. package/dist/pregel/utils/index.cjs +1 -0
  180. package/dist/pregel/utils/index.cjs.map +1 -1
  181. package/dist/pregel/utils/index.d.cts +6 -1
  182. package/dist/pregel/utils/index.d.cts.map +1 -1
  183. package/dist/pregel/utils/index.d.ts +6 -1
  184. package/dist/pregel/utils/index.d.ts.map +1 -1
  185. package/dist/pregel/utils/index.js +1 -0
  186. package/dist/pregel/utils/index.js.map +1 -1
  187. package/dist/pregel/utils/timeout.cjs +34 -0
  188. package/dist/pregel/utils/timeout.cjs.map +1 -0
  189. package/dist/pregel/utils/timeout.d.cts +45 -0
  190. package/dist/pregel/utils/timeout.d.cts.map +1 -0
  191. package/dist/pregel/utils/timeout.d.ts +45 -0
  192. package/dist/pregel/utils/timeout.d.ts.map +1 -0
  193. package/dist/pregel/utils/timeout.js +34 -0
  194. package/dist/pregel/utils/timeout.js.map +1 -0
  195. package/dist/web.cjs +11 -0
  196. package/dist/web.d.cts +11 -8
  197. package/dist/web.d.ts +11 -8
  198. package/dist/web.js +5 -3
  199. package/package.json +5 -5
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["START","CONFIG_KEY_CHECKPOINT_MAP"],"sources":["../../../src/pregel/utils/index.ts"],"sourcesContent":["import { Callbacks } from \"@langchain/core/callbacks/manager\";\nimport { RunnableConfig } from \"@langchain/core/runnables\";\nimport type {\n ChannelVersions,\n CheckpointMetadata,\n} from \"@langchain/langgraph-checkpoint\";\nimport { CONFIG_KEY_CHECKPOINT_MAP, START } from \"../../constants.js\";\n\nexport function getNullChannelVersion(currentVersions: ChannelVersions) {\n // Short circuit for commonly used channels such as __start__\n // (used by StateGraph)\n const startVersion = typeof currentVersions[START];\n if (startVersion === \"number\") return 0;\n if (startVersion === \"string\") return \"\";\n\n // Defer back to obtaining a first key from channel versions\n for (const key in currentVersions) {\n if (!Object.prototype.hasOwnProperty.call(currentVersions, key)) continue;\n const versionType = typeof currentVersions[key];\n if (versionType === \"number\") return 0;\n if (versionType === \"string\") return \"\";\n break;\n }\n\n return undefined;\n}\n\nexport function getNewChannelVersions(\n previousVersions: ChannelVersions,\n currentVersions: ChannelVersions\n): ChannelVersions {\n // Get new channel versions\n if (Object.keys(previousVersions).length > 0) {\n const nullVersion = getNullChannelVersion(currentVersions);\n return Object.fromEntries(\n Object.entries(currentVersions).filter(\n ([k, v]) => v > (previousVersions[k] ?? nullVersion)\n )\n );\n } else {\n return currentVersions;\n }\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function _coerceToDict(value: any, defaultKey: string) {\n return value &&\n !Array.isArray(value) &&\n // eslint-disable-next-line no-instanceof/no-instanceof\n !(value instanceof Date) &&\n typeof value === \"object\"\n ? value\n : { [defaultKey]: value };\n}\n\nexport type RetryPolicy = {\n /**\n * Amount of time that must elapse before the first retry occurs in milliseconds.\n * @default 500\n */\n initialInterval?: number;\n\n /**\n * Multiplier by which the interval increases after each retry.\n * @default 2\n */\n backoffFactor?: number;\n\n /**\n * Maximum amount of time that may elapse between retries in milliseconds.\n * @default 128000\n */\n maxInterval?: number;\n\n /**\n * Maximum amount of time that may elapse between retries.\n * @default 3\n */\n maxAttempts?: number;\n\n /** Whether to add random jitter to the interval between retries. */\n jitter?: boolean;\n\n /** A function that returns True for exceptions that should trigger a retry. */\n retryOn?: (e: any) => boolean; // eslint-disable-line @typescript-eslint/no-explicit-any\n\n /** Whether to log a warning when a retry is attempted. Defaults to true. */\n logWarning?: boolean;\n};\n\n/**\n * Configuration for caching nodes.\n */\nexport type CachePolicy = {\n /**\n * A function used to generate a cache key from node's input.\n * @returns A key for the cache.\n */\n keyFunc?: (args: unknown[]) => string;\n\n /**\n * The time to live for the cache in seconds.\n * If not defined, the entry will never expire.\n */\n ttl?: number;\n};\n\nexport function patchConfigurable(\n config: RunnableConfig | undefined,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n patch: Record<string, any>\n): RunnableConfig {\n if (config === null) {\n return { configurable: patch };\n } else if (config?.configurable === undefined) {\n return { ...config, configurable: patch };\n } else {\n return {\n ...config,\n configurable: { ...config.configurable, ...patch },\n };\n }\n}\n\nexport function patchCheckpointMap(\n config: RunnableConfig,\n metadata?: CheckpointMetadata\n): RunnableConfig {\n const parents = metadata?.parents ?? {};\n\n if (Object.keys(parents).length > 0) {\n return patchConfigurable(config, {\n [CONFIG_KEY_CHECKPOINT_MAP]: {\n ...parents,\n [config.configurable?.checkpoint_ns ?? \"\"]:\n config.configurable?.checkpoint_id,\n },\n });\n } else {\n return config;\n }\n}\n\n/**\n * Combine multiple abort signals into a single abort signal.\n * @param signals - The abort signals to combine.\n * @returns A combined abort signal and a dispose function to remove the abort listener if unused.\n */\nexport function combineAbortSignals(...x: (AbortSignal | undefined)[]): {\n signal: AbortSignal | undefined;\n dispose?: () => void;\n} {\n const signals = [...new Set(x.filter(Boolean))] as AbortSignal[];\n\n if (signals.length === 0) {\n return { signal: undefined, dispose: undefined };\n }\n\n if (signals.length === 1) {\n return { signal: signals[0], dispose: undefined };\n }\n\n const combinedController = new AbortController();\n const listener = () => {\n const reason = signals.find((s) => s.aborted)?.reason;\n combinedController.abort(reason);\n signals.forEach((s) => s.removeEventListener(\"abort\", listener));\n };\n\n signals.forEach((s) => s.addEventListener(\"abort\", listener, { once: true }));\n\n const hasAlreadyAbortedSignal = signals.find((s) => s.aborted);\n if (hasAlreadyAbortedSignal) {\n combinedController.abort(hasAlreadyAbortedSignal.reason);\n }\n\n return {\n signal: combinedController.signal,\n dispose: () => {\n signals.forEach((s) => s.removeEventListener(\"abort\", listener));\n },\n };\n}\n\n/**\n * Combine multiple callbacks into a single callback.\n * @param callback1 - The first callback to combine.\n * @param callback2 - The second callback to combine.\n * @returns A single callback that is a combination of the input callbacks.\n */\nexport const combineCallbacks = (\n callback1?: Callbacks,\n callback2?: Callbacks\n): Callbacks | undefined => {\n if (!callback1 && !callback2) {\n return undefined;\n }\n\n if (!callback1) {\n return callback2;\n }\n\n if (!callback2) {\n return callback1;\n }\n if (Array.isArray(callback1) && Array.isArray(callback2)) {\n return [...callback1, ...callback2];\n }\n if (Array.isArray(callback1)) {\n return [...callback1, callback2] as Callbacks;\n }\n if (Array.isArray(callback2)) {\n return [callback1, ...callback2];\n }\n return [callback1, callback2] as Callbacks;\n};\n"],"mappings":";;AAQA,SAAgB,sBAAsB,iBAAkC;CAGtE,MAAM,eAAe,OAAO,gBAAgBA,kBAAAA;AAC5C,KAAI,iBAAiB,SAAU,QAAO;AACtC,KAAI,iBAAiB,SAAU,QAAO;AAGtC,MAAK,MAAM,OAAO,iBAAiB;AACjC,MAAI,CAAC,OAAO,UAAU,eAAe,KAAK,iBAAiB,IAAI,CAAE;EACjE,MAAM,cAAc,OAAO,gBAAgB;AAC3C,MAAI,gBAAgB,SAAU,QAAO;AACrC,MAAI,gBAAgB,SAAU,QAAO;AACrC;;;AAMJ,SAAgB,sBACd,kBACA,iBACiB;AAEjB,KAAI,OAAO,KAAK,iBAAiB,CAAC,SAAS,GAAG;EAC5C,MAAM,cAAc,sBAAsB,gBAAgB;AAC1D,SAAO,OAAO,YACZ,OAAO,QAAQ,gBAAgB,CAAC,QAC7B,CAAC,GAAG,OAAO,KAAK,iBAAiB,MAAM,aACzC,CACF;OAED,QAAO;;AAKX,SAAgB,cAAc,OAAY,YAAoB;AAC5D,QAAO,SACL,CAAC,MAAM,QAAQ,MAAM,IAErB,EA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B;EAC3B,eAAe;AACb,WAAQ,SAAS,MAAM,EAAE,oBAAoB,SAAS,SAAS,CAAC;;EAEnE;;;;;;;;AASH,MAAa,oBACX,WACA,cAC0B;AAC1B,KAAI,CAAC,aAAa,CAAC,UACjB;AAGF,KAAI,CAAC,UACH,QAAO;AAGT,KAAI,CAAC,UACH,QAAO;AAET,KAAI,MAAM,QAAQ,UAAU,IAAI,MAAM,QAAQ,UAAU,CACtD,QAAO,CAAC,GAAG,WAAW,GAAG,UAAU;AAErC,KAAI,MAAM,QAAQ,UAAU,CAC1B,QAAO,CAAC,GAAG,WAAW,UAAU;AAElC,KAAI,MAAM,QAAQ,UAAU,CAC1B,QAAO,CAAC,WAAW,GAAG,UAAU;AAElC,QAAO,CAAC,WAAW,UAAU"}
1
+ {"version":3,"file":"index.cjs","names":["START","CONFIG_KEY_CHECKPOINT_MAP"],"sources":["../../../src/pregel/utils/index.ts"],"sourcesContent":["import { Callbacks } from \"@langchain/core/callbacks/manager\";\nimport { RunnableConfig } from \"@langchain/core/runnables\";\nimport type {\n ChannelVersions,\n CheckpointMetadata,\n} from \"@langchain/langgraph-checkpoint\";\nimport { CONFIG_KEY_CHECKPOINT_MAP, START } from \"../../constants.js\";\n\nexport function getNullChannelVersion(currentVersions: ChannelVersions) {\n // Short circuit for commonly used channels such as __start__\n // (used by StateGraph)\n const startVersion = typeof currentVersions[START];\n if (startVersion === \"number\") return 0;\n if (startVersion === \"string\") return \"\";\n\n // Defer back to obtaining a first key from channel versions\n for (const key in currentVersions) {\n if (!Object.prototype.hasOwnProperty.call(currentVersions, key)) continue;\n const versionType = typeof currentVersions[key];\n if (versionType === \"number\") return 0;\n if (versionType === \"string\") return \"\";\n break;\n }\n\n return undefined;\n}\n\nexport function getNewChannelVersions(\n previousVersions: ChannelVersions,\n currentVersions: ChannelVersions\n): ChannelVersions {\n // Get new channel versions\n if (Object.keys(previousVersions).length > 0) {\n const nullVersion = getNullChannelVersion(currentVersions);\n return Object.fromEntries(\n Object.entries(currentVersions).filter(\n ([k, v]) => v > (previousVersions[k] ?? nullVersion)\n )\n );\n } else {\n return currentVersions;\n }\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function _coerceToDict(value: any, defaultKey: string) {\n return value &&\n !Array.isArray(value) &&\n // eslint-disable-next-line no-instanceof/no-instanceof\n !(value instanceof Date) &&\n typeof value === \"object\"\n ? value\n : { [defaultKey]: value };\n}\n\nexport type RetryPolicy = {\n /**\n * Amount of time that must elapse before the first retry occurs in milliseconds.\n * @default 500\n */\n initialInterval?: number;\n\n /**\n * Multiplier by which the interval increases after each retry.\n * @default 2\n */\n backoffFactor?: number;\n\n /**\n * Maximum amount of time that may elapse between retries in milliseconds.\n * @default 128000\n */\n maxInterval?: number;\n\n /**\n * Maximum amount of time that may elapse between retries.\n * @default 3\n */\n maxAttempts?: number;\n\n /**\n * Whether to add random jitter to the interval between retries.\n * @default true\n */\n jitter?: boolean;\n\n /** A function that returns True for exceptions that should trigger a retry. */\n retryOn?: (e: any) => boolean; // eslint-disable-line @typescript-eslint/no-explicit-any\n\n /** Whether to log a warning when a retry is attempted. Defaults to true. */\n logWarning?: boolean;\n};\n\nexport type { TimeoutPolicy } from \"./timeout.js\";\nexport { coerceTimeoutPolicy } from \"./timeout.js\";\n\n/**\n * Configuration for caching nodes.\n */\nexport type CachePolicy = {\n /**\n * A function used to generate a cache key from node's input.\n * @returns A key for the cache.\n */\n keyFunc?: (args: unknown[]) => string;\n\n /**\n * The time to live for the cache in seconds.\n * If not defined, the entry will never expire.\n */\n ttl?: number;\n};\n\nexport function patchConfigurable(\n config: RunnableConfig | undefined,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n patch: Record<string, any>\n): RunnableConfig {\n if (config === null) {\n return { configurable: patch };\n } else if (config?.configurable === undefined) {\n return { ...config, configurable: patch };\n } else {\n return {\n ...config,\n configurable: { ...config.configurable, ...patch },\n };\n }\n}\n\nexport function patchCheckpointMap(\n config: RunnableConfig,\n metadata?: CheckpointMetadata\n): RunnableConfig {\n const parents = metadata?.parents ?? {};\n\n if (Object.keys(parents).length > 0) {\n return patchConfigurable(config, {\n [CONFIG_KEY_CHECKPOINT_MAP]: {\n ...parents,\n [config.configurable?.checkpoint_ns ?? \"\"]:\n config.configurable?.checkpoint_id,\n },\n });\n } else {\n return config;\n }\n}\n\n/**\n * Combine multiple abort signals into a single abort signal.\n * @param signals - The abort signals to combine.\n * @returns A combined abort signal and a dispose function to remove the abort listener if unused.\n */\nexport function combineAbortSignals(...x: (AbortSignal | undefined)[]): {\n signal: AbortSignal | undefined;\n dispose?: () => void;\n} {\n const signals = [...new Set(x.filter(Boolean))] as AbortSignal[];\n\n if (signals.length === 0) {\n return { signal: undefined, dispose: undefined };\n }\n\n if (signals.length === 1) {\n return { signal: signals[0], dispose: undefined };\n }\n\n const combinedController = new AbortController();\n const listener = () => {\n const reason = signals.find((s) => s.aborted)?.reason;\n combinedController.abort(reason);\n signals.forEach((s) => s.removeEventListener(\"abort\", listener));\n };\n\n signals.forEach((s) => s.addEventListener(\"abort\", listener, { once: true }));\n\n const hasAlreadyAbortedSignal = signals.find((s) => s.aborted);\n if (hasAlreadyAbortedSignal) {\n combinedController.abort(hasAlreadyAbortedSignal.reason);\n }\n\n return {\n signal: combinedController.signal,\n dispose: () => {\n signals.forEach((s) => s.removeEventListener(\"abort\", listener));\n },\n };\n}\n\n/**\n * Combine multiple callbacks into a single callback.\n * @param callback1 - The first callback to combine.\n * @param callback2 - The second callback to combine.\n * @returns A single callback that is a combination of the input callbacks.\n */\nexport const combineCallbacks = (\n callback1?: Callbacks,\n callback2?: Callbacks\n): Callbacks | undefined => {\n if (!callback1 && !callback2) {\n return undefined;\n }\n\n if (!callback1) {\n return callback2;\n }\n\n if (!callback2) {\n return callback1;\n }\n if (Array.isArray(callback1) && Array.isArray(callback2)) {\n return [...callback1, ...callback2];\n }\n if (Array.isArray(callback1)) {\n return [...callback1, callback2] as Callbacks;\n }\n if (Array.isArray(callback2)) {\n return [call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TimeoutPolicy } from "./timeout.cjs";
1
2
  import { CheckpointMetadata } from "@langchain/langgraph-checkpoint";
2
3
  import { RunnableConfig } from "@langchain/core/runnables";
3
4
 
@@ -22,7 +23,11 @@ type RetryPolicy = {
22
23
  * Maximum amount of time that may elapse between retries.
23
24
  * @default 3
24
25
  */
25
- maxAttempts?: number; /** Whether to add random jitter to the interval between retries. */
26
+ maxAttempts?: number;
27
+ /**
28
+ * Whether to add random jitter to the interval between retries.
29
+ * @default true
30
+ */
26
31
  jitter?: boolean; /** A function that returns True for exceptions that should trigger a retry. */
27
32
  retryOn?: (e: any) => boolean; /** Whether to log a warning when a retry is attempted. Defaults to true. */
28
33
  logWarning?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","names":[],"sources":["../../../src/pregel/utils/index.ts"],"mappings":";;;;KAuDY,WAAA;EAAW;;;;EAKrB,eAAA;EAqBA;;;;EAfA,aAAA;EAqBU;AAMZ;;;EArBE,WAAA;EA0BA;;;;EApBA,WAAA;EAGA,MAAA;EAGA,OAAA,IAAW,CAAA;EAGX,UAAA;AAAA;;;;KAMU,WAAA;;;;;EAKV,OAAA,IAAW,IAAA;;;;;EAMX,GAAA;AAAA"}
1
+ {"version":3,"file":"index.d.cts","names":[],"sources":["../../../src/pregel/utils/index.ts"],"mappings":";;;;;KAuDY,WAAA;;;;;EAKV,eAAA;EAkBA;;;;EAZA,aAAA;EAwBU;;AASZ;;EA3BE,WAAA;EA2BqB;;;;EArBrB,WAAA;EAgCG;;;;EA1BH,MAAA;EAGA,OAAA,IAAW,CAAA;EAGX,UAAA;AAAA;;;;KASU,WAAA;;;;;EAKV,OAAA,IAAW,IAAA;;;;;EAMX,GAAA;AAAA"}
@@ -1,3 +1,4 @@
1
+ import { TimeoutPolicy } from "./timeout.js";
1
2
  import { CheckpointMetadata } from "@langchain/langgraph-checkpoint";
2
3
  import { RunnableConfig } from "@langchain/core/runnables";
3
4
  //#region src/pregel/utils/index.d.ts
@@ -21,7 +22,11 @@ type RetryPolicy = {
21
22
  * Maximum amount of time that may elapse between retries.
22
23
  * @default 3
23
24
  */
24
- maxAttempts?: number; /** Whether to add random jitter to the interval between retries. */
25
+ maxAttempts?: number;
26
+ /**
27
+ * Whether to add random jitter to the interval between retries.
28
+ * @default true
29
+ */
25
30
  jitter?: boolean; /** A function that returns True for exceptions that should trigger a retry. */
26
31
  retryOn?: (e: any) => boolean; /** Whether to log a warning when a retry is attempted. Defaults to true. */
27
32
  logWarning?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/pregel/utils/index.ts"],"mappings":";;;KAuDY,WAAA;;;;;EAKV,eAAA;EAkBA;;;;EAZA,aAAA;EAqBU;;AAMZ;;EArBE,WAAA;EAqBqB;;;;EAfrB,WAAA,WA0BG;EAvBH,MAAA;EAGA,OAAA,IAAW,CAAA;EAGX,UAAA;AAAA;;;;KAMU,WAAA;;;;;EAKV,OAAA,IAAW,IAAA;;;;;EAMX,GAAA;AAAA"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/pregel/utils/index.ts"],"mappings":";;;;KAuDY,WAAA;EAAW;;;;EAKrB,eAAA;EAYA;;;;EANA,aAAA;EAwBA;;;AASF;EA3BE,WAAA;;;;;EAMA,WAAA;EAgCG;;;;EA1BH,MAAA;EAGA,OAAA,IAAW,CAAA;EAGX,UAAA;AAAA;;;;KASU,WAAA;;;;;EAKV,OAAA,IAAW,IAAA;;;;;EAMX,GAAA;AAAA"}
@@ -1,3 +1,4 @@
1
+ import "./timeout.js";
1
2
  import { CONFIG_KEY_CHECKPOINT_MAP, START } from "../../constants.js";
2
3
  //#region src/pregel/utils/index.ts
3
4
  function getNullChannelVersion(currentVersions) {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../src/pregel/utils/index.ts"],"sourcesContent":["import { Callbacks } from \"@langchain/core/callbacks/manager\";\nimport { RunnableConfig } from \"@langchain/core/runnables\";\nimport type {\n ChannelVersions,\n CheckpointMetadata,\n} from \"@langchain/langgraph-checkpoint\";\nimport { CONFIG_KEY_CHECKPOINT_MAP, START } from \"../../constants.js\";\n\nexport function getNullChannelVersion(currentVersions: ChannelVersions) {\n // Short circuit for commonly used channels such as __start__\n // (used by StateGraph)\n const startVersion = typeof currentVersions[START];\n if (startVersion === \"number\") return 0;\n if (startVersion === \"string\") return \"\";\n\n // Defer back to obtaining a first key from channel versions\n for (const key in currentVersions) {\n if (!Object.prototype.hasOwnProperty.call(currentVersions, key)) continue;\n const versionType = typeof currentVersions[key];\n if (versionType === \"number\") return 0;\n if (versionType === \"string\") return \"\";\n break;\n }\n\n return undefined;\n}\n\nexport function getNewChannelVersions(\n previousVersions: ChannelVersions,\n currentVersions: ChannelVersions\n): ChannelVersions {\n // Get new channel versions\n if (Object.keys(previousVersions).length > 0) {\n const nullVersion = getNullChannelVersion(currentVersions);\n return Object.fromEntries(\n Object.entries(currentVersions).filter(\n ([k, v]) => v > (previousVersions[k] ?? nullVersion)\n )\n );\n } else {\n return currentVersions;\n }\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function _coerceToDict(value: any, defaultKey: string) {\n return value &&\n !Array.isArray(value) &&\n // eslint-disable-next-line no-instanceof/no-instanceof\n !(value instanceof Date) &&\n typeof value === \"object\"\n ? value\n : { [defaultKey]: value };\n}\n\nexport type RetryPolicy = {\n /**\n * Amount of time that must elapse before the first retry occurs in milliseconds.\n * @default 500\n */\n initialInterval?: number;\n\n /**\n * Multiplier by which the interval increases after each retry.\n * @default 2\n */\n backoffFactor?: number;\n\n /**\n * Maximum amount of time that may elapse between retries in milliseconds.\n * @default 128000\n */\n maxInterval?: number;\n\n /**\n * Maximum amount of time that may elapse between retries.\n * @default 3\n */\n maxAttempts?: number;\n\n /** Whether to add random jitter to the interval between retries. */\n jitter?: boolean;\n\n /** A function that returns True for exceptions that should trigger a retry. */\n retryOn?: (e: any) => boolean; // eslint-disable-line @typescript-eslint/no-explicit-any\n\n /** Whether to log a warning when a retry is attempted. Defaults to true. */\n logWarning?: boolean;\n};\n\n/**\n * Configuration for caching nodes.\n */\nexport type CachePolicy = {\n /**\n * A function used to generate a cache key from node's input.\n * @returns A key for the cache.\n */\n keyFunc?: (args: unknown[]) => string;\n\n /**\n * The time to live for the cache in seconds.\n * If not defined, the entry will never expire.\n */\n ttl?: number;\n};\n\nexport function patchConfigurable(\n config: RunnableConfig | undefined,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n patch: Record<string, any>\n): RunnableConfig {\n if (config === null) {\n return { configurable: patch };\n } else if (config?.configurable === undefined) {\n return { ...config, configurable: patch };\n } else {\n return {\n ...config,\n configurable: { ...config.configurable, ...patch },\n };\n }\n}\n\nexport function patchCheckpointMap(\n config: RunnableConfig,\n metadata?: CheckpointMetadata\n): RunnableConfig {\n const parents = metadata?.parents ?? {};\n\n if (Object.keys(parents).length > 0) {\n return patchConfigurable(config, {\n [CONFIG_KEY_CHECKPOINT_MAP]: {\n ...parents,\n [config.configurable?.checkpoint_ns ?? \"\"]:\n config.configurable?.checkpoint_id,\n },\n });\n } else {\n return config;\n }\n}\n\n/**\n * Combine multiple abort signals into a single abort signal.\n * @param signals - The abort signals to combine.\n * @returns A combined abort signal and a dispose function to remove the abort listener if unused.\n */\nexport function combineAbortSignals(...x: (AbortSignal | undefined)[]): {\n signal: AbortSignal | undefined;\n dispose?: () => void;\n} {\n const signals = [...new Set(x.filter(Boolean))] as AbortSignal[];\n\n if (signals.length === 0) {\n return { signal: undefined, dispose: undefined };\n }\n\n if (signals.length === 1) {\n return { signal: signals[0], dispose: undefined };\n }\n\n const combinedController = new AbortController();\n const listener = () => {\n const reason = signals.find((s) => s.aborted)?.reason;\n combinedController.abort(reason);\n signals.forEach((s) => s.removeEventListener(\"abort\", listener));\n };\n\n signals.forEach((s) => s.addEventListener(\"abort\", listener, { once: true }));\n\n const hasAlreadyAbortedSignal = signals.find((s) => s.aborted);\n if (hasAlreadyAbortedSignal) {\n combinedController.abort(hasAlreadyAbortedSignal.reason);\n }\n\n return {\n signal: combinedController.signal,\n dispose: () => {\n signals.forEach((s) => s.removeEventListener(\"abort\", listener));\n },\n };\n}\n\n/**\n * Combine multiple callbacks into a single callback.\n * @param callback1 - The first callback to combine.\n * @param callback2 - The second callback to combine.\n * @returns A single callback that is a combination of the input callbacks.\n */\nexport const combineCallbacks = (\n callback1?: Callbacks,\n callback2?: Callbacks\n): Callbacks | undefined => {\n if (!callback1 && !callback2) {\n return undefined;\n }\n\n if (!callback1) {\n return callback2;\n }\n\n if (!callback2) {\n return callback1;\n }\n if (Array.isArray(callback1) && Array.isArray(callback2)) {\n return [...callback1, ...callback2];\n }\n if (Array.isArray(callback1)) {\n return [...callback1, callback2] as Callbacks;\n }\n if (Array.isArray(callback2)) {\n return [callback1, ...callback2];\n }\n return [callback1, callback2] as Callbacks;\n};\n"],"mappings":";;AAQA,SAAgB,sBAAsB,iBAAkC;CAGtE,MAAM,eAAe,OAAO,gBAAgB;AAC5C,KAAI,iBAAiB,SAAU,QAAO;AACtC,KAAI,iBAAiB,SAAU,QAAO;AAGtC,MAAK,MAAM,OAAO,iBAAiB;AACjC,MAAI,CAAC,OAAO,UAAU,eAAe,KAAK,iBAAiB,IAAI,CAAE;EACjE,MAAM,cAAc,OAAO,gBAAgB;AAC3C,MAAI,gBAAgB,SAAU,QAAO;AACrC,MAAI,gBAAgB,SAAU,QAAO;AACrC;;;AAMJ,SAAgB,sBACd,kBACA,iBACiB;AAEjB,KAAI,OAAO,KAAK,iBAAiB,CAAC,SAAS,GAAG;EAC5C,MAAM,cAAc,sBAAsB,gBAAgB;AAC1D,SAAO,OAAO,YACZ,OAAO,QAAQ,gBAAgB,CAAC,QAC7B,CAAC,GAAG,OAAO,KAAK,iBAAiB,MAAM,aACzC,CACF;OAED,QAAO;;AAKX,SAAgB,cAAc,OAAY,YAAoB;AAC5D,QAAO,SACL,CAAC,MAAM,QAAQ,MAAM,IAErB,EAAE,iBAAiB,SACnB,OAAO,UAA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M,EAAE,oBAAoB,SAAS,SAAS,CAAC;;EAEnE;;;;;;;;AASH,MAAa,oBACX,WACA,cAC0B;AAC1B,KAAI,CAAC,aAAa,CAAC,UACjB;AAGF,KAAI,CAAC,UACH,QAAO;AAGT,KAAI,CAAC,UACH,QAAO;AAET,KAAI,MAAM,QAAQ,UAAU,IAAI,MAAM,QAAQ,UAAU,CACtD,QAAO,CAAC,GAAG,WAAW,GAAG,UAAU;AAErC,KAAI,MAAM,QAAQ,UAAU,CAC1B,QAAO,CAAC,GAAG,WAAW,UAAU;AAElC,KAAI,MAAM,QAAQ,UAAU,CAC1B,QAAO,CAAC,WAAW,GAAG,UAAU;AAElC,QAAO,CAAC,WAAW,UAAU"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../src/pregel/utils/index.ts"],"sourcesContent":["import { Callbacks } from \"@langchain/core/callbacks/manager\";\nimport { RunnableConfig } from \"@langchain/core/runnables\";\nimport type {\n ChannelVersions,\n CheckpointMetadata,\n} from \"@langchain/langgraph-checkpoint\";\nimport { CONFIG_KEY_CHECKPOINT_MAP, START } from \"../../constants.js\";\n\nexport function getNullChannelVersion(currentVersions: ChannelVersions) {\n // Short circuit for commonly used channels such as __start__\n // (used by StateGraph)\n const startVersion = typeof currentVersions[START];\n if (startVersion === \"number\") return 0;\n if (startVersion === \"string\") return \"\";\n\n // Defer back to obtaining a first key from channel versions\n for (const key in currentVersions) {\n if (!Object.prototype.hasOwnProperty.call(currentVersions, key)) continue;\n const versionType = typeof currentVersions[key];\n if (versionType === \"number\") return 0;\n if (versionType === \"string\") return \"\";\n break;\n }\n\n return undefined;\n}\n\nexport function getNewChannelVersions(\n previousVersions: ChannelVersions,\n currentVersions: ChannelVersions\n): ChannelVersions {\n // Get new channel versions\n if (Object.keys(previousVersions).length > 0) {\n const nullVersion = getNullChannelVersion(currentVersions);\n return Object.fromEntries(\n Object.entries(currentVersions).filter(\n ([k, v]) => v > (previousVersions[k] ?? nullVersion)\n )\n );\n } else {\n return currentVersions;\n }\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function _coerceToDict(value: any, defaultKey: string) {\n return value &&\n !Array.isArray(value) &&\n // eslint-disable-next-line no-instanceof/no-instanceof\n !(value instanceof Date) &&\n typeof value === \"object\"\n ? value\n : { [defaultKey]: value };\n}\n\nexport type RetryPolicy = {\n /**\n * Amount of time that must elapse before the first retry occurs in milliseconds.\n * @default 500\n */\n initialInterval?: number;\n\n /**\n * Multiplier by which the interval increases after each retry.\n * @default 2\n */\n backoffFactor?: number;\n\n /**\n * Maximum amount of time that may elapse between retries in milliseconds.\n * @default 128000\n */\n maxInterval?: number;\n\n /**\n * Maximum amount of time that may elapse between retries.\n * @default 3\n */\n maxAttempts?: number;\n\n /**\n * Whether to add random jitter to the interval between retries.\n * @default true\n */\n jitter?: boolean;\n\n /** A function that returns True for exceptions that should trigger a retry. */\n retryOn?: (e: any) => boolean; // eslint-disable-line @typescript-eslint/no-explicit-any\n\n /** Whether to log a warning when a retry is attempted. Defaults to true. */\n logWarning?: boolean;\n};\n\nexport type { TimeoutPolicy } from \"./timeout.js\";\nexport { coerceTimeoutPolicy } from \"./timeout.js\";\n\n/**\n * Configuration for caching nodes.\n */\nexport type CachePolicy = {\n /**\n * A function used to generate a cache key from node's input.\n * @returns A key for the cache.\n */\n keyFunc?: (args: unknown[]) => string;\n\n /**\n * The time to live for the cache in seconds.\n * If not defined, the entry will never expire.\n */\n ttl?: number;\n};\n\nexport function patchConfigurable(\n config: RunnableConfig | undefined,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n patch: Record<string, any>\n): RunnableConfig {\n if (config === null) {\n return { configurable: patch };\n } else if (config?.configurable === undefined) {\n return { ...config, configurable: patch };\n } else {\n return {\n ...config,\n configurable: { ...config.configurable, ...patch },\n };\n }\n}\n\nexport function patchCheckpointMap(\n config: RunnableConfig,\n metadata?: CheckpointMetadata\n): RunnableConfig {\n const parents = metadata?.parents ?? {};\n\n if (Object.keys(parents).length > 0) {\n return patchConfigurable(config, {\n [CONFIG_KEY_CHECKPOINT_MAP]: {\n ...parents,\n [config.configurable?.checkpoint_ns ?? \"\"]:\n config.configurable?.checkpoint_id,\n },\n });\n } else {\n return config;\n }\n}\n\n/**\n * Combine multiple abort signals into a single abort signal.\n * @param signals - The abort signals to combine.\n * @returns A combined abort signal and a dispose function to remove the abort listener if unused.\n */\nexport function combineAbortSignals(...x: (AbortSignal | undefined)[]): {\n signal: AbortSignal | undefined;\n dispose?: () => void;\n} {\n const signals = [...new Set(x.filter(Boolean))] as AbortSignal[];\n\n if (signals.length === 0) {\n return { signal: undefined, dispose: undefined };\n }\n\n if (signals.length === 1) {\n return { signal: signals[0], dispose: undefined };\n }\n\n const combinedController = new AbortController();\n const listener = () => {\n const reason = signals.find((s) => s.aborted)?.reason;\n combinedController.abort(reason);\n signals.forEach((s) => s.removeEventListener(\"abort\", listener));\n };\n\n signals.forEach((s) => s.addEventListener(\"abort\", listener, { once: true }));\n\n const hasAlreadyAbortedSignal = signals.find((s) => s.aborted);\n if (hasAlreadyAbortedSignal) {\n combinedController.abort(hasAlreadyAbortedSignal.reason);\n }\n\n return {\n signal: combinedController.signal,\n dispose: () => {\n signals.forEach((s) => s.removeEventListener(\"abort\", listener));\n },\n };\n}\n\n/**\n * Combine multiple callbacks into a single callback.\n * @param callback1 - The first callback to combine.\n * @param callback2 - The second callback to combine.\n * @returns A single callback that is a combination of the input callbacks.\n */\nexport const combineCallbacks = (\n callback1?: Callbacks,\n callback2?: Callbacks\n): Callbacks | undefined => {\n if (!callback1 && !callback2) {\n return undefined;\n }\n\n if (!callback1) {\n return callback2;\n }\n\n if (!callback2) {\n return callback1;\n }\n if (Array.isArray(callback1) && Array.isArray(callback2)) {\n return [...callback1, ...callback2];\n }\n if (Array.isArray(callback1)) {\n return [...callback1, callback2] as Callbacks;\n }\n if (Array.isArray(callback2)) {\n return [callback1, ...callback2];\n }\n return [callback1, callback2] as Callbacks;\n};\n"],"mappings":";;;AAQA,SAAgB,s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" || Number.isNaN(value) || value <= 0) throw new Error(`${field} must be greater than 0`);
5
+ return value;
6
+ }
7
+ /**
8
+ * Normalize a timeout value into a {@link TimeoutPolicy} with positive
9
+ * millisecond fields, or `undefined` if no timeout is configured.
10
+ *
11
+ * A bare number (or `undefined`) is treated as a hard {@link
12
+ * TimeoutPolicy.runTimeout}. Throws if any configured timeout is not greater
13
+ * than 0, or if `refreshOn` is not `"auto"` or `"heartbeat"`.
14
+ *
15
+ * @internal
16
+ */
17
+ function coerceTimeoutPolicy(value) {
18
+ if (value === void 0 || value === null) return;
19
+ const policy = typeof value === "number" ? { runTimeout: value } : value;
20
+ const refreshOn = policy.refreshOn ?? "auto";
21
+ if (refreshOn !== "auto" && refreshOn !== "heartbeat") throw new Error("refreshOn must be \"auto\" or \"heartbeat\"");
22
+ const runTimeout = _coerceTimeoutMs(policy.runTimeout, "runTimeout");
23
+ const idleTimeout = _coerceTimeoutMs(policy.idleTimeout, "idleTimeout");
24
+ if (runTimeout === void 0 && idleTimeout === void 0) return;
25
+ return {
26
+ runTimeout,
27
+ idleTimeout,
28
+ refreshOn
29
+ };
30
+ }
31
+ //#endregion
32
+ exports.coerceTimeoutPolicy = coerceTimeoutPolicy;
33
+
34
+ //# sourceMappingURL=timeout.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timeout.cjs","names":[],"sources":["../../../src/pregel/utils/timeout.ts"],"sourcesContent":["/**\n * Configuration for timing out node attempts.\n *\n * A timeout applies to a single attempt of a node/task. When a node has a\n * {@link RetryPolicy}, the timer resets for each retry attempt.\n *\n * Timeouts are expressed in **milliseconds**, matching other LangGraph.js\n * durations (e.g. {@link RetryPolicy} intervals and `stepTimeout`).\n *\n * @remarks\n * Cooperative cancellation: timeouts rely on aborting the node's\n * {@link AbortSignal} and dropping its buffered writes. A node that ignores its\n * `signal` and performs blocking work cannot be interrupted mid-operation, but\n * its writes are still discarded and `NodeTimeoutError` is raised.\n */\nexport type TimeoutPolicy = {\n /**\n * Hard wall-clock cap (in milliseconds) for a single node attempt.\n *\n * This timeout is never refreshed by progress signals or\n * `runtime.heartbeat()`.\n */\n runTimeout?: number;\n\n /**\n * Maximum time (in milliseconds) a single node attempt may go without\n * observable progress before timing out.\n *\n * Refreshed by writes, custom stream writer calls, child-task scheduling,\n * LangChain callback events emitted under the node's run, and explicit\n * `runtime.heartbeat()` calls (see {@link TimeoutPolicy.refreshOn}).\n */\n idleTimeout?: number;\n\n /**\n * Which signals refresh {@link TimeoutPolicy.idleTimeout}.\n *\n * - `\"auto\"` (default): refreshes on standard graph progress signals and\n * explicit heartbeats.\n * - `\"heartbeat\"`: refreshes only on explicit `runtime.heartbeat()` calls.\n */\n refreshOn?: \"auto\" | \"heartbeat\";\n};\n\nfunction _coerceTimeoutMs(\n value: number | undefined,\n field: string\n): number | undefined {\n if (value === undefined || value === null) {\n return undefined;\n }\n if (typeof value !== \"number\" || Number.isNaN(value) || value <= 0) {\n throw new Error(`${field} must be greater than 0`);\n }\n return value;\n}\n\n/**\n * Normalize a timeout value into a {@link TimeoutPolicy} with positive\n * millisecond fields, or `undefined` if no timeout is configured.\n *\n * A bare number (or `undefined`) is treated as a hard {@link\n * TimeoutPolicy.runTimeout}. Throws if any configured timeout is not greater\n * than 0, or if `refreshOn` is not `\"auto\"` or `\"heartbeat\"`.\n *\n * @internal\n */\nexport function coerceTimeoutPolicy(\n value?: number | TimeoutPolicy\n): TimeoutPolicy | undefined {\n if (value === undefined || value === null) {\n return undefined;\n }\n\n const policy: TimeoutPolicy =\n typeof value === \"number\" ? { runTimeout: value } : value;\n\n const refreshOn = policy.refreshOn ?? \"auto\";\n if (refreshOn !== \"auto\" && refreshOn !== \"heartbeat\") {\n throw new Error('refreshOn must be \"auto\" or \"heartbeat\"');\n }\n\n const runTimeout = _coerceTimeoutMs(policy.runTimeout, \"runTimeout\");\n const idleTimeout = _coerceTimeoutMs(policy.idleTimeout, \"idleTimeout\");\n\n if (runTimeout === undefined && idleTimeout === undefined) {\n return undefined;\n }\n\n return { runTimeout, idleTimeout, refreshOn };\n}\n"],"mappings":";AA4CA,SAAS,iBACP,OACA,OACoB;AACpB,KAAI,UAAU,KAAA,KAAa,UAAU,KACnC;AAEF,KAAI,OAAO,UAAU,YAAY,OAAO,MAAM,MAAM,IAAI,SAAS,EAC/D,OAAM,IAAI,MAAM,GAAG,MAAM,yBAAyB;AAEpD,QAAO;;;;;;;;;;;;AAaT,SAAgB,oBACd,OAC2B;AAC3B,KAAI,UAAU,KAAA,KAAa,UAAU,KACnC;CAGF,MAAM,SACJ,OAAO,UAAU,WAAW,EAAE,YAAY,OAAO,GAAG;CAEtD,MAAM,YAAY,OAAO,aAAa;AACtC,KAAI,cAAc,UAAU,cAAc,YACxC,OAAM,IAAI,MAAM,8CAA0C;CAG5D,MAAM,aAAa,iBAAiB,OAAO,YAAY,aAAa;CACpE,MAAM,cAAc,iBAAiB,OAAO,aAAa,cAAc;AAEvE,KAAI,eAAe,KAAA,KAAa,gBAAgB,KAAA,EAC9C;AAGF,QAAO;EAAE;EAAY;EAAa;EAAW"}
@@ -0,0 +1,45 @@
1
+ //#region src/pregel/utils/timeout.d.ts
2
+ /**
3
+ * Configuration for timing out node attempts.
4
+ *
5
+ * A timeout applies to a single attempt of a node/task. When a node has a
6
+ * {@link RetryPolicy}, the timer resets for each retry attempt.
7
+ *
8
+ * Timeouts are expressed in **milliseconds**, matching other LangGraph.js
9
+ * durations (e.g. {@link RetryPolicy} intervals and `stepTimeout`).
10
+ *
11
+ * @remarks
12
+ * Cooperative cancellation: timeouts rely on aborting the node's
13
+ * {@link AbortSignal} and dropping its buffered writes. A node that ignores its
14
+ * `signal` and performs blocking work cannot be interrupted mid-operation, but
15
+ * its writes are still discarded and `NodeTimeoutError` is raised.
16
+ */
17
+ type TimeoutPolicy = {
18
+ /**
19
+ * Hard wall-clock cap (in milliseconds) for a single node attempt.
20
+ *
21
+ * This timeout is never refreshed by progress signals or
22
+ * `runtime.heartbeat()`.
23
+ */
24
+ runTimeout?: number;
25
+ /**
26
+ * Maximum time (in milliseconds) a single node attempt may go without
27
+ * observable progress before timing out.
28
+ *
29
+ * Refreshed by writes, custom stream writer calls, child-task scheduling,
30
+ * LangChain callback events emitted under the node's run, and explicit
31
+ * `runtime.heartbeat()` calls (see {@link TimeoutPolicy.refreshOn}).
32
+ */
33
+ idleTimeout?: number;
34
+ /**
35
+ * Which signals refresh {@link TimeoutPolicy.idleTimeout}.
36
+ *
37
+ * - `"auto"` (default): refreshes on standard graph progress signals and
38
+ * explicit heartbeats.
39
+ * - `"heartbeat"`: refreshes only on explicit `runtime.heartbeat()` calls.
40
+ */
41
+ refreshOn?: "auto" | "heartbeat";
42
+ };
43
+ //#endregion
44
+ export { TimeoutPolicy };
45
+ //# sourceMappingURL=timeout.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timeout.d.cts","names":[],"sources":["../../../src/pregel/utils/timeout.ts"],"mappings":";;AAeA;;;;;;;;;;;;;;KAAY,aAAA;;;;;;;EAOV,UAAA;;;;;;;;;EAUA,WAAA;;;;;;;;EASA,SAAA;AAAA"}
@@ -0,0 +1,45 @@
1
+ //#region src/pregel/utils/timeout.d.ts
2
+ /**
3
+ * Configuration for timing out node attempts.
4
+ *
5
+ * A timeout applies to a single attempt of a node/task. When a node has a
6
+ * {@link RetryPolicy}, the timer resets for each retry attempt.
7
+ *
8
+ * Timeouts are expressed in **milliseconds**, matching other LangGraph.js
9
+ * durations (e.g. {@link RetryPolicy} intervals and `stepTimeout`).
10
+ *
11
+ * @remarks
12
+ * Cooperative cancellation: timeouts rely on aborting the node's
13
+ * {@link AbortSignal} and dropping its buffered writes. A node that ignores its
14
+ * `signal` and performs blocking work cannot be interrupted mid-operation, but
15
+ * its writes are still discarded and `NodeTimeoutError` is raised.
16
+ */
17
+ type TimeoutPolicy = {
18
+ /**
19
+ * Hard wall-clock cap (in milliseconds) for a single node attempt.
20
+ *
21
+ * This timeout is never refreshed by progress signals or
22
+ * `runtime.heartbeat()`.
23
+ */
24
+ runTimeout?: number;
25
+ /**
26
+ * Maximum time (in milliseconds) a single node attempt may go without
27
+ * observable progress before timing out.
28
+ *
29
+ * Refreshed by writes, custom stream writer calls, child-task scheduling,
30
+ * LangChain callback events emitted under the node's run, and explicit
31
+ * `runtime.heartbeat()` calls (see {@link TimeoutPolicy.refreshOn}).
32
+ */
33
+ idleTimeout?: number;
34
+ /**
35
+ * Which signals refresh {@link TimeoutPolicy.idleTimeout}.
36
+ *
37
+ * - `"auto"` (default): refreshes on standard graph progress signals and
38
+ * explicit heartbeats.
39
+ * - `"heartbeat"`: refreshes only on explicit `runtime.heartbeat()` calls.
40
+ */
41
+ refreshOn?: "auto" | "heartbeat";
42
+ };
43
+ //#endregion
44
+ export { TimeoutPolicy };
45
+ //# sourceMappingURL=timeout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timeout.d.ts","names":[],"sources":["../../../src/pregel/utils/timeout.ts"],"mappings":";;AAeA;;;;;;;;;;;;;;KAAY,aAAA;;;;;;;EAOV,UAAA;;;;;;;;;EAUA,WAAA;;;;;;;;EASA,SAAA;AAAA"}
@@ -0,0 +1,34 @@
1
+ //#region src/pregel/utils/timeout.ts
2
+ function _coerceTimeoutMs(value, field) {
3
+ if (value === void 0 || value === null) return;
4
+ if (typeof value !== "number" || Number.isNaN(value) || value <= 0) throw new Error(`${field} must be greater than 0`);
5
+ return value;
6
+ }
7
+ /**
8
+ * Normalize a timeout value into a {@link TimeoutPolicy} with positive
9
+ * millisecond fields, or `undefined` if no timeout is configured.
10
+ *
11
+ * A bare number (or `undefined`) is treated as a hard {@link
12
+ * TimeoutPolicy.runTimeout}. Throws if any configured timeout is not greater
13
+ * than 0, or if `refreshOn` is not `"auto"` or `"heartbeat"`.
14
+ *
15
+ * @internal
16
+ */
17
+ function coerceTimeoutPolicy(value) {
18
+ if (value === void 0 || value === null) return;
19
+ const policy = typeof value === "number" ? { runTimeout: value } : value;
20
+ const refreshOn = policy.refreshOn ?? "auto";
21
+ if (refreshOn !== "auto" && refreshOn !== "heartbeat") throw new Error("refreshOn must be \"auto\" or \"heartbeat\"");
22
+ const runTimeout = _coerceTimeoutMs(policy.runTimeout, "runTimeout");
23
+ const idleTimeout = _coerceTimeoutMs(policy.idleTimeout, "idleTimeout");
24
+ if (runTimeout === void 0 && idleTimeout === void 0) return;
25
+ return {
26
+ runTimeout,
27
+ idleTimeout,
28
+ refreshOn
29
+ };
30
+ }
31
+ //#endregion
32
+ export { coerceTimeoutPolicy };
33
+
34
+ //# sourceMappingURL=timeout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timeout.js","names":[],"sources":["../../../src/pregel/utils/timeout.ts"],"sourcesContent":["/**\n * Configuration for timing out node attempts.\n *\n * A timeout applies to a single attempt of a node/task. When a node has a\n * {@link RetryPolicy}, the timer resets for each retry attempt.\n *\n * Timeouts are expressed in **milliseconds**, matching other LangGraph.js\n * durations (e.g. {@link RetryPolicy} intervals and `stepTimeout`).\n *\n * @remarks\n * Cooperative cancellation: timeouts rely on aborting the node's\n * {@link AbortSignal} and dropping its buffered writes. A node that ignores its\n * `signal` and performs blocking work cannot be interrupted mid-operation, but\n * its writes are still discarded and `NodeTimeoutError` is raised.\n */\nexport type TimeoutPolicy = {\n /**\n * Hard wall-clock cap (in milliseconds) for a single node attempt.\n *\n * This timeout is never refreshed by progress signals or\n * `runtime.heartbeat()`.\n */\n runTimeout?: number;\n\n /**\n * Maximum time (in milliseconds) a single node attempt may go without\n * observable progress before timing out.\n *\n * Refreshed by writes, custom stream writer calls, child-task scheduling,\n * LangChain callback events emitted under the node's run, and explicit\n * `runtime.heartbeat()` calls (see {@link TimeoutPolicy.refreshOn}).\n */\n idleTimeout?: number;\n\n /**\n * Which signals refresh {@link TimeoutPolicy.idleTimeout}.\n *\n * - `\"auto\"` (default): refreshes on standard graph progress signals and\n * explicit heartbeats.\n * - `\"heartbeat\"`: refreshes only on explicit `runtime.heartbeat()` calls.\n */\n refreshOn?: \"auto\" | \"heartbeat\";\n};\n\nfunction _coerceTimeoutMs(\n value: number | undefined,\n field: string\n): number | undefined {\n if (value === undefined || value === null) {\n return undefined;\n }\n if (typeof value !== \"number\" || Number.isNaN(value) || value <= 0) {\n throw new Error(`${field} must be greater than 0`);\n }\n return value;\n}\n\n/**\n * Normalize a timeout value into a {@link TimeoutPolicy} with positive\n * millisecond fields, or `undefined` if no timeout is configured.\n *\n * A bare number (or `undefined`) is treated as a hard {@link\n * TimeoutPolicy.runTimeout}. Throws if any configured timeout is not greater\n * than 0, or if `refreshOn` is not `\"auto\"` or `\"heartbeat\"`.\n *\n * @internal\n */\nexport function coerceTimeoutPolicy(\n value?: number | TimeoutPolicy\n): TimeoutPolicy | undefined {\n if (value === undefined || value === null) {\n return undefined;\n }\n\n const policy: TimeoutPolicy =\n typeof value === \"number\" ? { runTimeout: value } : value;\n\n const refreshOn = policy.refreshOn ?? \"auto\";\n if (refreshOn !== \"auto\" && refreshOn !== \"heartbeat\") {\n throw new Error('refreshOn must be \"auto\" or \"heartbeat\"');\n }\n\n const runTimeout = _coerceTimeoutMs(policy.runTimeout, \"runTimeout\");\n const idleTimeout = _coerceTimeoutMs(policy.idleTimeout, \"idleTimeout\");\n\n if (runTimeout === undefined && idleTimeout === undefined) {\n return undefined;\n }\n\n return { runTimeout, idleTimeout, refreshOn };\n}\n"],"mappings":";AA4CA,SAAS,iBACP,OACA,OACoB;AACpB,KAAI,UAAU,KAAA,KAAa,UAAU,KACnC;AAEF,KAAI,OAAO,UAAU,YAAY,OAAO,MAAM,MAAM,IAAI,SAAS,EAC/D,OAAM,IAAI,MAAM,GAAG,MAAM,yBAAyB;AAEpD,QAAO;;;;;;;;;;;;AAaT,SAAgB,oBACd,OAC2B;AAC3B,KAAI,UAAU,KAAA,KAAa,UAAU,KACnC;CAGF,MAAM,SACJ,OAAO,UAAU,WAAW,EAAE,YAAY,OAAO,GAAG;CAEtD,MAAM,YAAY,OAAO,aAAa;AACtC,KAAI,cAAc,UAAU,cAAc,YACxC,OAAM,IAAI,MAAM,8CAA0C;CAG5D,MAAM,aAAa,iBAAiB,OAAO,YAAY,aAAa;CACpE,MAAM,cAAc,iBAAiB,OAAO,aAAa,cAAc;AAEvE,KAAI,eAAe,KAAA,KAAa,gBAAgB,KAAA,EAC9C;AAGF,QAAO;EAAE;EAAY;EAAa;EAAW"}
package/dist/web.cjs CHANGED
@@ -5,6 +5,7 @@ const require_base = require("./channels/base.cjs");
5
5
  const require_binop = require("./channels/binop.cjs");
6
6
  const require_annotation = require("./graph/annotation.cjs");
7
7
  const require_config = require("./pregel/utils/config.cjs");
8
+ const require_runtime = require("./pregel/runtime.cjs");
8
9
  const require_convert = require("./stream/convert.cjs");
9
10
  const require_stream_channel = require("./stream/stream-channel.cjs");
10
11
  const require_lifecycle = require("./stream/transformers/lifecycle.cjs");
@@ -18,6 +19,7 @@ const require_interrupt = require("./interrupt.cjs");
18
19
  const require_graph = require("./graph/graph.cjs");
19
20
  const require_types$1 = require("./state/types.cjs");
20
21
  const require_adapter = require("./state/adapter.cjs");
22
+ const require_delta = require("./channels/delta.cjs");
21
23
  const require_untracked_value = require("./channels/untracked_value.cjs");
22
24
  require("./channels/index.cjs");
23
25
  const require_reduced = require("./state/values/reduced.cjs");
@@ -66,12 +68,14 @@ Object.defineProperty(exports, "ChatModelStreamImpl", {
66
68
  exports.Command = require_constants.Command;
67
69
  exports.CommandInstance = require_constants.CommandInstance;
68
70
  exports.CompiledStateGraph = require_state.CompiledStateGraph;
71
+ exports.DeltaChannel = require_delta.DeltaChannel;
69
72
  exports.END = require_constants.END;
70
73
  exports.EmptyChannelError = require_errors.EmptyChannelError;
71
74
  exports.EmptyInputError = require_errors.EmptyInputError;
72
75
  exports.EventLog = require_stream_channel.StreamChannel;
73
76
  exports.Graph = require_graph.Graph;
74
77
  exports.GraphBubbleUp = require_errors.GraphBubbleUp;
78
+ exports.GraphDrained = require_errors.GraphDrained;
75
79
  exports.GraphInterrupt = require_errors.GraphInterrupt;
76
80
  exports.GraphRecursionError = require_errors.GraphRecursionError;
77
81
  exports.GraphRunStream = require_run_stream.GraphRunStream;
@@ -96,12 +100,15 @@ exports.MessagesValue = require_messages$1.MessagesValue;
96
100
  exports.MessagesZodMeta = require_messages_annotation.MessagesZodMeta;
97
101
  exports.MessagesZodState = require_messages_annotation.MessagesZodState;
98
102
  exports.MultipleSubgraphsError = require_errors.MultipleSubgraphsError;
103
+ exports.NodeError = require_errors.NodeError;
99
104
  exports.NodeInterrupt = require_errors.NodeInterrupt;
105
+ exports.NodeTimeoutError = require_errors.NodeTimeoutError;
100
106
  exports.Overwrite = require_constants.Overwrite;
101
107
  exports.ParentCommand = require_errors.ParentCommand;
102
108
  exports.REMOVE_ALL_MESSAGES = require_messages_reducer.REMOVE_ALL_MESSAGES;
103
109
  exports.ReducedValue = require_reduced.ReducedValue;
104
110
  exports.RemoteException = require_errors.RemoteException;
111
+ exports.RunControl = require_runtime.RunControl;
105
112
  exports.START = require_constants.START;
106
113
  exports.STREAM_EVENTS_V3_MODES = require_convert.STREAM_EVENTS_V3_MODES;
107
114
  exports.Send = require_constants.Send;
@@ -147,12 +154,16 @@ exports.interrupt = require_interrupt.interrupt;
147
154
  exports.isCheckpointEnvelope = require_convert.isCheckpointEnvelope;
148
155
  exports.isCommand = require_constants.isCommand;
149
156
  exports.isGraphBubbleUp = require_errors.isGraphBubbleUp;
157
+ exports.isGraphDrained = require_errors.isGraphDrained;
150
158
  exports.isGraphInterrupt = require_errors.isGraphInterrupt;
151
159
  exports.isInterrupted = require_constants.isInterrupted;
152
160
  exports.isNativeTransformer = require_types.isNativeTransformer;
161
+ exports.isNodeError = require_errors.isNodeError;
162
+ exports.isNodeTimeoutError = require_errors.isNodeTimeoutError;
153
163
  exports.isParentCommand = require_errors.isParentCommand;
154
164
  exports.isSerializableSchema = require_types$1.isSerializableSchema;
155
165
  exports.isStandardSchema = require_types$1.isStandardSchema;
166
+ exports.messagesDeltaReducer = require_messages_reducer.messagesDeltaReducer;
156
167
  exports.messagesStateReducer = require_messages_reducer.messagesStateReducer;
157
168
  exports.pushMessage = require_message.pushMessage;
158
169
  exports.task = require_index$3.task;
package/dist/web.d.cts CHANGED
@@ -1,5 +1,7 @@
1
1
  import { BaseChannel } from "./channels/base.cjs";
2
- import { COMMAND_SYMBOL, Command, CommandInstance, CommandParams, END, INTERRUPT, Interrupt, Overwrite, OverwriteValue, START, Send, isCommand, isInterrupted } from "./constants.cjs";
2
+ import { TimeoutPolicy } from "./pregel/utils/timeout.cjs";
3
+ import { COMMAND_SYMBOL, Command, CommandInstance, CommandParams, END, INTERRUPT, Interrupt, Overwrite, OverwriteValue, START, Send, SendOptions, isCommand, isInterrupted } from "./constants.cjs";
4
+ import { DeltaChannel, DeltaReducer } from "./channels/delta.cjs";
3
5
  import { BinaryOperator, BinaryOperatorAggregate } from "./channels/binop.cjs";
4
6
  import { AnyValue } from "./channels/any_value.cjs";
5
7
  import { LastValue } from "./channels/last_value.cjs";
@@ -8,6 +10,7 @@ import { EphemeralValue } from "./channels/ephemeral_value.cjs";
8
10
  import { NamedBarrierValue } from "./channels/named_barrier_value.cjs";
9
11
  import { Topic } from "./channels/topic.cjs";
10
12
  import { UntrackedValueChannel } from "./channels/untracked_value.cjs";
13
+ import { RunControl } from "./pregel/runtime.cjs";
11
14
  import { ExecutionInfo, LangGraphRunnableConfig, Runtime, ServerInfo } from "./pregel/runnable_types.cjs";
12
15
  import { Annotation, AnnotationRoot, NodeType, SingleReducer, StateDefinition, StateType, UpdateType } from "./graph/annotation.cjs";
13
16
  import { CachePolicy, RetryPolicy } from "./pregel/utils/index.cjs";
@@ -24,22 +27,22 @@ import { createValuesTransformer } from "./stream/transformers/values.cjs";
24
27
  import { CreateGraphRunStreamOptions, GraphRunStream, SubgraphRunStream, createGraphRunStream } from "./stream/run-stream.cjs";
25
28
  import { ChatModelStreamImpl } from "./stream/index.cjs";
26
29
  import { Pregel } from "./pregel/index.cjs";
27
- import { AddNodeOptions, CompiledGraph, CompiledGraphType, Graph, NodeSpec } from "./graph/graph.cjs";
28
- import { InferInterruptInputType, InferInterruptResumeType, interrupt } from "./interrupt.cjs";
29
- import { InferWriterType, writer } from "./writer.cjs";
30
+ import { BaseLangGraphError, BaseLangGraphErrorFields, EmptyChannelError, EmptyInputError, GraphBubbleUp, GraphDrained, GraphInterrupt, GraphRecursionError, GraphValueError, InvalidUpdateError, MultipleSubgraphsError, NodeError, NodeInterrupt, NodeTimeoutError, ParentCommand, RemoteException, StateGraphInputError, UnreachableNodeError, getSubgraphsSeenSet, isGraphBubbleUp, isGraphDrained, isGraphInterrupt, isNodeError, isNodeTimeoutError, isParentCommand } from "./errors.cjs";
30
31
  import { isSerializableSchema, isStandardSchema } from "./state/types.cjs";
31
32
  import { ReducedValue, ReducedValueInit } from "./state/values/reduced.cjs";
32
33
  import { UntrackedValue, UntrackedValueInit } from "./state/values/untracked.cjs";
33
34
  import { AnyStateSchema, InferStateSchemaUpdate, InferStateSchemaValue, StateSchema, StateSchemaField, StateSchemaFieldToChannel, StateSchemaFields, StateSchemaFieldsToStateDefinition } from "./state/schema.cjs";
34
35
  import { ConditionalEdgeRouter, ConditionalEdgeRouterTypes, ContextSchemaInit, ExtractStateType, ExtractUpdateType, GraphNode, GraphNodeReturnValue, GraphNodeTypes, StateDefinitionInit, StateGraphInit, StateGraphOptions, ToStateDefinition } from "./graph/types.cjs";
35
- import { CompiledStateGraph, StateGraph, StateGraphAddNodeOptions, StateGraphArgs, StateGraphArgsWithInputOutputSchemas, StateGraphArgsWithStateSchema, StateGraphNodeSpec } from "./graph/state.cjs";
36
- import { Messages, REMOVE_ALL_MESSAGES, messagesStateReducer } from "./graph/messages_reducer.cjs";
36
+ import { AddNodeOptions, CompiledGraph, CompiledGraphType, Graph, NodeSpec } from "./graph/graph.cjs";
37
+ import { InferInterruptInputType, InferInterruptResumeType, interrupt } from "./interrupt.cjs";
38
+ import { InferWriterType, writer } from "./writer.cjs";
39
+ import { CompiledStateGraph, NodePolicyOptions, StateGraph, StateGraphAddNodeOptions, StateGraphArgs, StateGraphArgsWithInputOutputSchemas, StateGraphArgsWithStateSchema, StateGraphNodeSpec } from "./graph/state.cjs";
40
+ import { Messages, REMOVE_ALL_MESSAGES, messagesDeltaReducer, messagesStateReducer } from "./graph/messages_reducer.cjs";
37
41
  import { MessageGraph, pushMessage } from "./graph/message.cjs";
38
- import { BaseLangGraphError, BaseLangGraphErrorFields, EmptyChannelError, EmptyInputError, GraphBubbleUp, GraphInterrupt, GraphRecursionError, GraphValueError, InvalidUpdateError, MultipleSubgraphsError, NodeInterrupt, ParentCommand, RemoteException, StateGraphInputError, UnreachableNodeError, getSubgraphsSeenSet, isGraphBubbleUp, isGraphInterrupt, isParentCommand } from "./errors.cjs";
39
42
  import { EntrypointOptions, TaskOptions, entrypoint, getPreviousState, task } from "./func/index.cjs";
40
43
  import { MessagesAnnotation, MessagesZodMeta, MessagesZodState } from "./graph/messages_annotation.cjs";
41
44
  import { getJsonSchemaFromSchema, getSchemaDefaultGetter } from "./state/adapter.cjs";
42
45
  import { MessagesValue } from "./state/prebuilt/messages.cjs";
43
46
  import { getConfig, getCurrentTaskInput, getStore, getWriter } from "./pregel/utils/config.cjs";
44
47
  import { AsyncBatchedStore, BaseCheckpointSaver, BaseStore, Checkpoint, CheckpointMetadata, CheckpointTuple, GetOperation, InMemoryStore, Item, ListNamespacesOperation, MatchCondition, MemorySaver, NameSpacePath, NamespaceMatchType, Operation, OperationResults, PutOperation, SearchOperation, copyCheckpoint, emptyCheckpoint } from "@langchain/langgraph-checkpoint";
45
- export { type AddNodeOptions, type AgentStatus, Annotation, type AnnotationRoot, AnyStateSchema, type AnyValue, AsyncBatchedStore, BaseChannel, BaseCheckpointSaver, BaseLangGraphError, BaseLangGraphErrorFields, BaseStore, type BinaryOperator, BinaryOperatorAggregate, COMMAND_SYMBOL, type CachePolicy, type ChatModelStream, ChatModelStreamImpl, type Checkpoint, type CheckpointMetadata, type CheckpointTuple, Command, CommandInstance, type CommandParams, type CompiledGraph, type CompiledGraphType, CompiledStateGraph, type ConditionalEdgeRouter, type ConditionalEdgeRouterTypes, type ContextSchemaInit, type ConvertToProtocolEventOptions, type CreateGraphRunStreamOptions, type DynamicBarrierValue, END, EmptyChannelError, EmptyInputError, type EntrypointOptions, type EphemeralValue, StreamChannel as EventLog, type ExecutionInfo, type ExtractStateType, type ExtractUpdateType, type GetOperation, type GetStateOptions, Graph, GraphBubbleUp, GraphInterrupt, type GraphNode, type GraphNodeReturnValue, type GraphNodeTypes, GraphRecursionError, GraphRunStream, GraphValueError, INTERRUPT, InMemoryStore, type InferExtensions, type InferInterruptInputType, type InferInterruptResumeType, InferStateSchemaUpdate, InferStateSchemaValue, type InferWriterType, type Interrupt, type InterruptPayload, InvalidUpdateError, type Item, type LangGraphRunnableConfig, type LastValue, type LifecycleCause, type LifecycleData, type LifecycleEntry, type LifecycleProjection, type LifecycleTransformerOptions, type ListNamespacesOperation, type MatchCondition, MemorySaver, MessageGraph, type Messages, MessagesAnnotation, type MessagesEventData, MessagesValue, MessagesZodMeta, MessagesZodState, type MultipleChannelSubscriptionOptions, MultipleSubgraphsError, type NameSpacePath, type NamedBarrierValue, type Namespace, type NamespaceMatchType, type NativeStreamTransformer, NodeInterrupt, type NodeSpec, type NodeType, type Operation, type OperationResults, Overwrite, type OverwriteValue, ParentCommand, type Pregel, type PregelNode, type PregelOptions, type PregelParams, type ProtocolEvent, type PutOperation, REMOVE_ALL_MESSAGES, ReducedValue, ReducedValueInit, RemoteException, type RetryPolicy, type Runtime, START, STREAM_EVENTS_V3_MODES, type SearchOperation, Send, type ServerInfo, type SingleChannelSubscriptionOptions, type SingleReducer, type StateDefinition, type StateDefinitionInit, StateGraph, type StateGraphAddNodeOptions, type StateGraphArgs, type StateGraphArgsWithInputOutputSchemas, type StateGraphArgsWithStateSchema, type StateGraphInit, StateGraphInputError, type StateGraphNodeSpec, type StateGraphOptions, StateSchema, StateSchemaField, StateSchemaFieldToChannel, StateSchemaFields, StateSchemaFieldsToStateDefinition, type StateSnapshot, type StateType, StreamChannel, type StreamEmitter, type StreamMode, type StreamOutputMap, type StreamTransformer, type SubgraphDiscoveryProjection, type SubgraphDiscoveryTransformerOptions, SubgraphRunStream, type TaskOptions, type ToStateDefinition, type ToolCallStatus, type ToolCallStream, type ToolsEventData, type Topic, UnreachableNodeError, UntrackedValue, UntrackedValueChannel, UntrackedValueInit, type UpdateType, type UpdatesEventData, type UsageInfo, type WaitForNames, messagesStateReducer as addMessages, convertToProtocolEvent, copyCheckpoint, createGraphRunStream, createLifecycleTransformer, createMessagesTransformer, createSubgraphDiscoveryTransformer, createValuesTransformer, emptyCheckpoint, entrypoint, filterLifecycleEntries, filterSubgraphHandles, getConfig, getCurrentTaskInput, getJsonSchemaFromSchema, getPreviousState, getSchemaDefaultGetter, getStore, getSubgraphsSeenSet, getWriter, interrupt, isCheckpointEnvelope, isCommand, isGraphBubbleUp, isGraphInterrupt, isInterrupted, isNativeTransformer, isParentCommand, isSerializableSchema, isStandardSchema, messagesStateReducer, pushMessage, task, writer };
48
+ export { type AddNodeOptions, type AgentStatus, Annotation, type AnnotationRoot, AnyStateSchema, type AnyValue, AsyncBatchedStore, BaseChannel, BaseCheckpointSaver, BaseLangGraphError, BaseLangGraphErrorFields, BaseStore, type BinaryOperator, BinaryOperatorAggregate, COMMAND_SYMBOL, type CachePolicy, type ChatModelStream, ChatModelStreamImpl, type Checkpoint, type CheckpointMetadata, type CheckpointTuple, Command, CommandInstance, type CommandParams, type CompiledGraph, type CompiledGraphType, CompiledStateGraph, type ConditionalEdgeRouter, type ConditionalEdgeRouterTypes, type ContextSchemaInit, type ConvertToProtocolEventOptions, type CreateGraphRunStreamOptions, DeltaChannel, type DeltaReducer, type DynamicBarrierValue, END, EmptyChannelError, EmptyInputError, type EntrypointOptions, type EphemeralValue, StreamChannel as EventLog, type ExecutionInfo, type ExtractStateType, type ExtractUpdateType, type GetOperation, type GetStateOptions, Graph, GraphBubbleUp, GraphDrained, GraphInterrupt, type GraphNode, type GraphNodeReturnValue, type GraphNodeTypes, GraphRecursionError, GraphRunStream, GraphValueError, INTERRUPT, InMemoryStore, type InferExtensions, type InferInterruptInputType, type InferInterruptResumeType, InferStateSchemaUpdate, InferStateSchemaValue, type InferWriterType, type Interrupt, type InterruptPayload, InvalidUpdateError, type Item, type LangGraphRunnableConfig, type LastValue, type LifecycleCause, type LifecycleData, type LifecycleEntry, type LifecycleProjection, type LifecycleTransformerOptions, type ListNamespacesOperation, type MatchCondition, MemorySaver, MessageGraph, type Messages, MessagesAnnotation, type MessagesEventData, MessagesValue, MessagesZodMeta, MessagesZodState, type MultipleChannelSubscriptionOptions, MultipleSubgraphsError, type NameSpacePath, type NamedBarrierValue, type Namespace, type NamespaceMatchType, type NativeStreamTransformer, NodeError, NodeInterrupt, type NodePolicyOptions, type NodeSpec, NodeTimeoutError, type NodeType, type Operation, type OperationResults, Overwrite, type OverwriteValue, ParentCommand, type Pregel, type PregelNode, type PregelOptions, type PregelParams, type ProtocolEvent, type PutOperation, REMOVE_ALL_MESSAGES, ReducedValue, ReducedValueInit, RemoteException, type RetryPolicy, RunControl, type Runtime, START, STREAM_EVENTS_V3_MODES, type SearchOperation, Send, type SendOptions, type ServerInfo, type SingleChannelSubscriptionOptions, type SingleReducer, type StateDefinition, type StateDefinitionInit, StateGraph, type StateGraphAddNodeOptions, type StateGraphArgs, type StateGraphArgsWithInputOutputSchemas, type StateGraphArgsWithStateSchema, type StateGraphInit, StateGraphInputError, type StateGraphNodeSpec, type StateGraphOptions, StateSchema, StateSchemaField, StateSchemaFieldToChannel, StateSchemaFields, StateSchemaFieldsToStateDefinition, type StateSnapshot, type StateType, StreamChannel, type StreamEmitter, type StreamMode, type StreamOutputMap, type StreamTransformer, type SubgraphDiscoveryProjection, type SubgraphDiscoveryTransformerOptions, SubgraphRunStream, type TaskOptions, type TimeoutPolicy, type ToStateDefinition, type ToolCallStatus, type ToolCallStream, type ToolsEventData, type Topic, UnreachableNodeError, UntrackedValue, UntrackedValueChannel, UntrackedValueInit, type UpdateType, type UpdatesEventData, type UsageInfo, type WaitForNames, messagesStateReducer as addMessages, convertToProtocolEvent, copyCheckpoint, createGraphRunStream, createLifecycleTransformer, createMessagesTransformer, createSubgraphDiscoveryTransformer, createValuesTransformer, emptyCheckpoint, entrypoint, filterLifecycleEntries, filterSubgraphHandles, getConfig, getCurrentTaskInput, getJsonSchemaFromSchema, getPreviousState, getSchemaDefaultGetter, getStore, getSubgraphsSeenSet, getWriter, interrupt, isCheckpointEnvelope, isCommand, isGraphBubbleUp, isGraphDrained, isGraphInterrupt, isInterrupted, isNativeTransformer, isNodeError, isNodeTimeoutError, isParentCommand, isSerializableSchema, isStandardSchema, messagesDeltaReducer, messagesStateReducer, pushMessage, task, writer };
package/dist/web.d.ts CHANGED
@@ -1,5 +1,7 @@
1
1
  import { BaseChannel } from "./channels/base.js";
2
- import { COMMAND_SYMBOL, Command, CommandInstance, CommandParams, END, INTERRUPT, Interrupt, Overwrite, OverwriteValue, START, Send, isCommand, isInterrupted } from "./constants.js";
2
+ import { TimeoutPolicy } from "./pregel/utils/timeout.js";
3
+ import { COMMAND_SYMBOL, Command, CommandInstance, CommandParams, END, INTERRUPT, Interrupt, Overwrite, OverwriteValue, START, Send, SendOptions, isCommand, isInterrupted } from "./constants.js";
4
+ import { DeltaChannel, DeltaReducer } from "./channels/delta.js";
3
5
  import { BinaryOperator, BinaryOperatorAggregate } from "./channels/binop.js";
4
6
  import { AnyValue } from "./channels/any_value.js";
5
7
  import { LastValue } from "./channels/last_value.js";
@@ -8,6 +10,7 @@ import { EphemeralValue } from "./channels/ephemeral_value.js";
8
10
  import { NamedBarrierValue } from "./channels/named_barrier_value.js";
9
11
  import { Topic } from "./channels/topic.js";
10
12
  import { UntrackedValueChannel } from "./channels/untracked_value.js";
13
+ import { RunControl } from "./pregel/runtime.js";
11
14
  import { ExecutionInfo, LangGraphRunnableConfig, Runtime, ServerInfo } from "./pregel/runnable_types.js";
12
15
  import { Annotation, AnnotationRoot, NodeType, SingleReducer, StateDefinition, StateType, UpdateType } from "./graph/annotation.js";
13
16
  import { CachePolicy, RetryPolicy } from "./pregel/utils/index.js";
@@ -24,22 +27,22 @@ import { createValuesTransformer } from "./stream/transformers/values.js";
24
27
  import { CreateGraphRunStreamOptions, GraphRunStream, SubgraphRunStream, createGraphRunStream } from "./stream/run-stream.js";
25
28
  import { ChatModelStreamImpl } from "./stream/index.js";
26
29
  import { Pregel } from "./pregel/index.js";
27
- import { AddNodeOptions, CompiledGraph, CompiledGraphType, Graph, NodeSpec } from "./graph/graph.js";
28
- import { InferInterruptInputType, InferInterruptResumeType, interrupt } from "./interrupt.js";
29
- import { InferWriterType, writer } from "./writer.js";
30
+ import { BaseLangGraphError, BaseLangGraphErrorFields, EmptyChannelError, EmptyInputError, GraphBubbleUp, GraphDrained, GraphInterrupt, GraphRecursionError, GraphValueError, InvalidUpdateError, MultipleSubgraphsError, NodeError, NodeInterrupt, NodeTimeoutError, ParentCommand, RemoteException, StateGraphInputError, UnreachableNodeError, getSubgraphsSeenSet, isGraphBubbleUp, isGraphDrained, isGraphInterrupt, isNodeError, isNodeTimeoutError, isParentCommand } from "./errors.js";
30
31
  import { isSerializableSchema, isStandardSchema } from "./state/types.js";
31
32
  import { ReducedValue, ReducedValueInit } from "./state/values/reduced.js";
32
33
  import { UntrackedValue, UntrackedValueInit } from "./state/values/untracked.js";
33
34
  import { AnyStateSchema, InferStateSchemaUpdate, InferStateSchemaValue, StateSchema, StateSchemaField, StateSchemaFieldToChannel, StateSchemaFields, StateSchemaFieldsToStateDefinition } from "./state/schema.js";
34
35
  import { ConditionalEdgeRouter, ConditionalEdgeRouterTypes, ContextSchemaInit, ExtractStateType, ExtractUpdateType, GraphNode, GraphNodeReturnValue, GraphNodeTypes, StateDefinitionInit, StateGraphInit, StateGraphOptions, ToStateDefinition } from "./graph/types.js";
35
- import { CompiledStateGraph, StateGraph, StateGraphAddNodeOptions, StateGraphArgs, StateGraphArgsWithInputOutputSchemas, StateGraphArgsWithStateSchema, StateGraphNodeSpec } from "./graph/state.js";
36
- import { Messages, REMOVE_ALL_MESSAGES, messagesStateReducer } from "./graph/messages_reducer.js";
36
+ import { AddNodeOptions, CompiledGraph, CompiledGraphType, Graph, NodeSpec } from "./graph/graph.js";
37
+ import { InferInterruptInputType, InferInterruptResumeType, interrupt } from "./interrupt.js";
38
+ import { InferWriterType, writer } from "./writer.js";
39
+ import { CompiledStateGraph, NodePolicyOptions, StateGraph, StateGraphAddNodeOptions, StateGraphArgs, StateGraphArgsWithInputOutputSchemas, StateGraphArgsWithStateSchema, StateGraphNodeSpec } from "./graph/state.js";
40
+ import { Messages, REMOVE_ALL_MESSAGES, messagesDeltaReducer, messagesStateReducer } from "./graph/messages_reducer.js";
37
41
  import { MessageGraph, pushMessage } from "./graph/message.js";
38
- import { BaseLangGraphError, BaseLangGraphErrorFields, EmptyChannelError, EmptyInputError, GraphBubbleUp, GraphInterrupt, GraphRecursionError, GraphValueError, InvalidUpdateError, MultipleSubgraphsError, NodeInterrupt, ParentCommand, RemoteException, StateGraphInputError, UnreachableNodeError, getSubgraphsSeenSet, isGraphBubbleUp, isGraphInterrupt, isParentCommand } from "./errors.js";
39
42
  import { EntrypointOptions, TaskOptions, entrypoint, getPreviousState, task } from "./func/index.js";
40
43
  import { MessagesAnnotation, MessagesZodMeta, MessagesZodState } from "./graph/messages_annotation.js";
41
44
  import { getJsonSchemaFromSchema, getSchemaDefaultGetter } from "./state/adapter.js";
42
45
  import { MessagesValue } from "./state/prebuilt/messages.js";
43
46
  import { getConfig, getCurrentTaskInput, getStore, getWriter } from "./pregel/utils/config.js";
44
47
  import { AsyncBatchedStore, BaseCheckpointSaver, BaseStore, Checkpoint, CheckpointMetadata, CheckpointTuple, GetOperation, InMemoryStore, Item, ListNamespacesOperation, MatchCondition, MemorySaver, NameSpacePath, NamespaceMatchType, Operation, OperationResults, PutOperation, SearchOperation, copyCheckpoint, emptyCheckpoint } from "@langchain/langgraph-checkpoint";
45
- export { type AddNodeOptions, type AgentStatus, Annotation, type AnnotationRoot, AnyStateSchema, type AnyValue, AsyncBatchedStore, BaseChannel, BaseCheckpointSaver, BaseLangGraphError, BaseLangGraphErrorFields, BaseStore, type BinaryOperator, BinaryOperatorAggregate, COMMAND_SYMBOL, type CachePolicy, type ChatModelStream, ChatModelStreamImpl, type Checkpoint, type CheckpointMetadata, type CheckpointTuple, Command, CommandInstance, type CommandParams, type CompiledGraph, type CompiledGraphType, CompiledStateGraph, type ConditionalEdgeRouter, type ConditionalEdgeRouterTypes, type ContextSchemaInit, type ConvertToProtocolEventOptions, type CreateGraphRunStreamOptions, type DynamicBarrierValue, END, EmptyChannelError, EmptyInputError, type EntrypointOptions, type EphemeralValue, StreamChannel as EventLog, type ExecutionInfo, type ExtractStateType, type ExtractUpdateType, type GetOperation, type GetStateOptions, Graph, GraphBubbleUp, GraphInterrupt, type GraphNode, type GraphNodeReturnValue, type GraphNodeTypes, GraphRecursionError, GraphRunStream, GraphValueError, INTERRUPT, InMemoryStore, type InferExtensions, type InferInterruptInputType, type InferInterruptResumeType, InferStateSchemaUpdate, InferStateSchemaValue, type InferWriterType, type Interrupt, type InterruptPayload, InvalidUpdateError, type Item, type LangGraphRunnableConfig, type LastValue, type LifecycleCause, type LifecycleData, type LifecycleEntry, type LifecycleProjection, type LifecycleTransformerOptions, type ListNamespacesOperation, type MatchCondition, MemorySaver, MessageGraph, type Messages, MessagesAnnotation, type MessagesEventData, MessagesValue, MessagesZodMeta, MessagesZodState, type MultipleChannelSubscriptionOptions, MultipleSubgraphsError, type NameSpacePath, type NamedBarrierValue, type Namespace, type NamespaceMatchType, type NativeStreamTransformer, NodeInterrupt, type NodeSpec, type NodeType, type Operation, type OperationResults, Overwrite, type OverwriteValue, ParentCommand, type Pregel, type PregelNode, type PregelOptions, type PregelParams, type ProtocolEvent, type PutOperation, REMOVE_ALL_MESSAGES, ReducedValue, ReducedValueInit, RemoteException, type RetryPolicy, type Runtime, START, STREAM_EVENTS_V3_MODES, type SearchOperation, Send, type ServerInfo, type SingleChannelSubscriptionOptions, type SingleReducer, type StateDefinition, type StateDefinitionInit, StateGraph, type StateGraphAddNodeOptions, type StateGraphArgs, type StateGraphArgsWithInputOutputSchemas, type StateGraphArgsWithStateSchema, type StateGraphInit, StateGraphInputError, type StateGraphNodeSpec, type StateGraphOptions, StateSchema, StateSchemaField, StateSchemaFieldToChannel, StateSchemaFields, StateSchemaFieldsToStateDefinition, type StateSnapshot, type StateType, StreamChannel, type StreamEmitter, type StreamMode, type StreamOutputMap, type StreamTransformer, type SubgraphDiscoveryProjection, type SubgraphDiscoveryTransformerOptions, SubgraphRunStream, type TaskOptions, type ToStateDefinition, type ToolCallStatus, type ToolCallStream, type ToolsEventData, type Topic, UnreachableNodeError, UntrackedValue, UntrackedValueChannel, UntrackedValueInit, type UpdateType, type UpdatesEventData, type UsageInfo, type WaitForNames, messagesStateReducer as addMessages, convertToProtocolEvent, copyCheckpoint, createGraphRunStream, createLifecycleTransformer, createMessagesTransformer, createSubgraphDiscoveryTransformer, createValuesTransformer, emptyCheckpoint, entrypoint, filterLifecycleEntries, filterSubgraphHandles, getConfig, getCurrentTaskInput, getJsonSchemaFromSchema, getPreviousState, getSchemaDefaultGetter, getStore, getSubgraphsSeenSet, getWriter, interrupt, isCheckpointEnvelope, isCommand, isGraphBubbleUp, isGraphInterrupt, isInterrupted, isNativeTransformer, isParentCommand, isSerializableSchema, isStandardSchema, messagesStateReducer, pushMessage, task, writer };
48
+ export { type AddNodeOptions, type AgentStatus, Annotation, type AnnotationRoot, AnyStateSchema, type AnyValue, AsyncBatchedStore, BaseChannel, BaseCheckpointSaver, BaseLangGraphError, BaseLangGraphErrorFields, BaseStore, type BinaryOperator, BinaryOperatorAggregate, COMMAND_SYMBOL, type CachePolicy, type ChatModelStream, ChatModelStreamImpl, type Checkpoint, type CheckpointMetadata, type CheckpointTuple, Command, CommandInstance, type CommandParams, type CompiledGraph, type CompiledGraphType, CompiledStateGraph, type ConditionalEdgeRouter, type ConditionalEdgeRouterTypes, type ContextSchemaInit, type ConvertToProtocolEventOptions, type CreateGraphRunStreamOptions, DeltaChannel, type DeltaReducer, type DynamicBarrierValue, END, EmptyChannelError, EmptyInputError, type EntrypointOptions, type EphemeralValue, StreamChannel as EventLog, type ExecutionInfo, type ExtractStateType, type ExtractUpdateType, type GetOperation, type GetStateOptions, Graph, GraphBubbleUp, GraphDrained, GraphInterrupt, type GraphNode, type GraphNodeReturnValue, type GraphNodeTypes, GraphRecursionError, GraphRunStream, GraphValueError, INTERRUPT, InMemoryStore, type InferExtensions, type InferInterruptInputType, type InferInterruptResumeType, InferStateSchemaUpdate, InferStateSchemaValue, type InferWriterType, type Interrupt, type InterruptPayload, InvalidUpdateError, type Item, type LangGraphRunnableConfig, type LastValue, type LifecycleCause, type LifecycleData, type LifecycleEntry, type LifecycleProjection, type LifecycleTransformerOptions, type ListNamespacesOperation, type MatchCondition, MemorySaver, MessageGraph, type Messages, MessagesAnnotation, type MessagesEventData, MessagesValue, MessagesZodMeta, MessagesZodState, type MultipleChannelSubscriptionOptions, MultipleSubgraphsError, type NameSpacePath, type NamedBarrierValue, type Namespace, type NamespaceMatchType, type NativeStreamTransformer, NodeError, NodeInterrupt, type NodePolicyOptions, type NodeSpec, NodeTimeoutError, type NodeType, type Operation, type OperationResults, Overwrite, type OverwriteValue, ParentCommand, type Pregel, type PregelNode, type PregelOptions, type PregelParams, type ProtocolEvent, type PutOperation, REMOVE_ALL_MESSAGES, ReducedValue, ReducedValueInit, RemoteException, type RetryPolicy, RunControl, type Runtime, START, STREAM_EVENTS_V3_MODES, type SearchOperation, Send, type SendOptions, type ServerInfo, type SingleChannelSubscriptionOptions, type SingleReducer, type StateDefinition, type StateDefinitionInit, StateGraph, type StateGraphAddNodeOptions, type StateGraphArgs, type StateGraphArgsWithInputOutputSchemas, type StateGraphArgsWithStateSchema, type StateGraphInit, StateGraphInputError, type StateGraphNodeSpec, type StateGraphOptions, StateSchema, StateSchemaField, StateSchemaFieldToChannel, StateSchemaFields, StateSchemaFieldsToStateDefinition, type StateSnapshot, type StateType, StreamChannel, type StreamEmitter, type StreamMode, type StreamOutputMap, type StreamTransformer, type SubgraphDiscoveryProjection, type SubgraphDiscoveryTransformerOptions, SubgraphRunStream, type TaskOptions, type TimeoutPolicy, type ToStateDefinition, type ToolCallStatus, type ToolCallStream, type ToolsEventData, type Topic, UnreachableNodeError, UntrackedValue, UntrackedValueChannel, UntrackedValueInit, type UpdateType, type UpdatesEventData, type UsageInfo, type WaitForNames, messagesStateReducer as addMessages, convertToProtocolEvent, copyCheckpoint, createGraphRunStream, createLifecycleTransformer, createMessagesTransformer, createSubgraphDiscoveryTransformer, createValuesTransformer, emptyCheckpoint, entrypoint, filterLifecycleEntries, filterSubgraphHandles, getConfig, getCurrentTaskInput, getJsonSchemaFromSchema, getPreviousState, getSchemaDefaultGetter, getStore, getSubgraphsSeenSet, getWriter, interrupt, isCheckpointEnvelope, isCommand, isGraphBubbleUp, isGraphDrained, isGraphInterrupt, isInterrupted, isNativeTransformer, isNodeError, isNodeTimeoutError, isParentCommand, isSerializableSchema, isStandardSchema, messagesDeltaReducer, messagesStateReducer, pushMessage, task, writer };
package/dist/web.js CHANGED
@@ -1,9 +1,10 @@
1
1
  import { COMMAND_SYMBOL, Command, CommandInstance, END, INTERRUPT, Overwrite, START, Send, isCommand, isInterrupted } from "./constants.js";
2
- import { BaseLangGraphError, EmptyChannelError, EmptyInputError, GraphBubbleUp, GraphInterrupt, GraphRecursionError, GraphValueError, InvalidUpdateError, MultipleSubgraphsError, NodeInterrupt, ParentCommand, RemoteException, StateGraphInputError, UnreachableNodeError, getSubgraphsSeenSet, isGraphBubbleUp, isGraphInterrupt, isParentCommand } from "./errors.js";
2
+ import { BaseLangGraphError, EmptyChannelError, EmptyInputError, GraphBubbleUp, GraphDrained, GraphInterrupt, GraphRecursionError, GraphValueError, InvalidUpdateError, MultipleSubgraphsError, NodeError, NodeInterrupt, NodeTimeoutError, ParentCommand, RemoteException, StateGraphInputError, UnreachableNodeError, getSubgraphsSeenSet, isGraphBubbleUp, isGraphDrained, isGraphInterrupt, isNodeError, isNodeTimeoutError, isParentCommand } from "./errors.js";
3
3
  import { BaseChannel } from "./channels/base.js";
4
4
  import { BinaryOperatorAggregate } from "./channels/binop.js";
5
5
  import { Annotation } from "./graph/annotation.js";
6
6
  import { getConfig, getCurrentTaskInput, getStore, getWriter } from "./pregel/utils/config.js";
7
+ import { RunControl } from "./pregel/runtime.js";
7
8
  import { STREAM_EVENTS_V3_MODES, convertToProtocolEvent, isCheckpointEnvelope } from "./stream/convert.js";
8
9
  import { StreamChannel } from "./stream/stream-channel.js";
9
10
  import { createLifecycleTransformer, filterLifecycleEntries } from "./stream/transformers/lifecycle.js";
@@ -17,12 +18,13 @@ import { interrupt } from "./interrupt.js";
17
18
  import { Graph } from "./graph/graph.js";
18
19
  import { isSerializableSchema, isStandardSchema } from "./state/types.js";
19
20
  import { getJsonSchemaFromSchema, getSchemaDefaultGetter } from "./state/adapter.js";
21
+ import { DeltaChannel } from "./channels/delta.js";
20
22
  import { UntrackedValueChannel } from "./channels/untracked_value.js";
21
23
  import "./channels/index.js";
22
24
  import { ReducedValue } from "./state/values/reduced.js";
23
25
  import { UntrackedValue } from "./state/values/untracked.js";
24
26
  import { StateSchema } from "./state/schema.js";
25
- import { REMOVE_ALL_MESSAGES, messagesStateReducer } from "./graph/messages_reducer.js";
27
+ import { REMOVE_ALL_MESSAGES, messagesDeltaReducer, messagesStateReducer } from "./graph/messages_reducer.js";
26
28
  import { MessagesValue } from "./state/prebuilt/messages.js";
27
29
  import "./state/index.js";
28
30
  import { CompiledStateGraph, StateGraph } from "./graph/state.js";
@@ -32,4 +34,4 @@ import { entrypoint, getPreviousState, task } from "./func/index.js";
32
34
  import { MessagesAnnotation, MessagesZodMeta, MessagesZodState } from "./graph/messages_annotation.js";
33
35
  import { writer } from "./writer.js";
34
36
  import { AsyncBatchedStore, BaseCheckpointSaver, BaseStore, InMemoryStore, MemorySaver, copyCheckpoint, emptyCheckpoint } from "@langchain/langgraph-checkpoint";
35
- export { Annotation, AsyncBatchedStore, BaseChannel, BaseCheckpointSaver, BaseLangGraphError, BaseStore, BinaryOperatorAggregate, COMMAND_SYMBOL, ChatModelStreamImpl, Command, CommandInstance, CompiledStateGraph, END, EmptyChannelError, EmptyInputError, StreamChannel as EventLog, Graph, GraphBubbleUp, GraphInterrupt, GraphRecursionError, GraphRunStream, GraphValueError, INTERRUPT, InMemoryStore, InvalidUpdateError, MemorySaver, MessageGraph, MessagesAnnotation, MessagesValue, MessagesZodMeta, MessagesZodState, MultipleSubgraphsError, NodeInterrupt, Overwrite, ParentCommand, REMOVE_ALL_MESSAGES, ReducedValue, RemoteException, START, STREAM_EVENTS_V3_MODES, Send, StateGraph, StateGraphInputError, StateSchema, StreamChannel, SubgraphRunStream, UnreachableNodeError, UntrackedValue, UntrackedValueChannel, messagesStateReducer as addMessages, convertToProtocolEvent, copyCheckpoint, createGraphRunStream, createLifecycleTransformer, createMessagesTransformer, createSubgraphDiscoveryTransformer, createValuesTransformer, emptyCheckpoint, entrypoint, filterLifecycleEntries, filterSubgraphHandles, getConfig, getCurrentTaskInput, getJsonSchemaFromSchema, getPreviousState, getSchemaDefaultGetter, getStore, getSubgraphsSeenSet, getWriter, interrupt, isCheckpointEnvelope, isCommand, isGraphBubbleUp, isGraphInterrupt, isInterrupted, isNativeTransformer, isParentCommand, isSerializableSchema, isStandardSchema, messagesStateReducer, pushMessage, task, writer };
37
+ export { Annotation, AsyncBatchedStore, BaseChannel, BaseCheckpointSaver, BaseLangGraphError, BaseStore, BinaryOperatorAggregate, COMMAND_SYMBOL, ChatModelStreamImpl, Command, CommandInstance, CompiledStateGraph, DeltaChannel, END, EmptyChannelError, EmptyInputError, StreamChannel as EventLog, Graph, GraphBubbleUp, GraphDrained, GraphInterrupt, GraphRecursionError, GraphRunStream, GraphValueError, INTERRUPT, InMemoryStore, InvalidUpdateError, MemorySaver, MessageGraph, MessagesAnnotation, MessagesValue, MessagesZodMeta, MessagesZodState, MultipleSubgraphsError, NodeError, NodeInterrupt, NodeTimeoutError, Overwrite, ParentCommand, REMOVE_ALL_MESSAGES, ReducedValue, RemoteException, RunControl, START, STREAM_EVENTS_V3_MODES, Send, StateGraph, StateGraphInputError, StateSchema, StreamChannel, SubgraphRunStream, UnreachableNodeError, UntrackedValue, UntrackedValueChannel, messagesStateReducer as addMessages, convertToProtocolEvent, copyCheckpoint, createGraphRunStream, createLifecycleTransformer, createMessagesTransformer, createSubgraphDiscoveryTransformer, createValuesTransformer, emptyCheckpoint, entrypoint, filterLifecycleEntries, filterSubgraphHandles, getConfig, getCurrentTaskInput, getJsonSchemaFromSchema, getPreviousState, getSchemaDefaultGetter, getStore, getSubgraphsSeenSet, getWriter, interrupt, isCheckpointEnvelope, isCommand, isGraphBubbleUp, isGraphDrained, isGraphInterrupt, isInterrupted, isNativeTransformer, isNodeError, isNodeTimeoutError, isParentCommand, isSerializableSchema, isStandardSchema, messagesDeltaReducer, messagesStateReducer, pushMessage, task, writer };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@langchain/langgraph",
3
- "version": "1.3.7",
3
+ "version": "1.4.0",
4
4
  "description": "LangGraph",
5
5
  "type": "module",
6
6
  "engines": {
@@ -19,8 +19,8 @@
19
19
  "@langchain/protocol": "^0.0.16",
20
20
  "@standard-schema/spec": "1.1.0",
21
21
  "uuid": "^14.0.0",
22
- "@langchain/langgraph-checkpoint": "^1.0.4",
23
- "@langchain/langgraph-sdk": "~1.9.19"
22
+ "@langchain/langgraph-checkpoint": "^1.1.0",
23
+ "@langchain/langgraph-sdk": "~1.9.20"
24
24
  },
25
25
  "peerDependencies": {
26
26
  "@langchain/core": "^1.1.48",
@@ -58,8 +58,8 @@
58
58
  "vite-plugin-node-polyfills": "^0.28.0",
59
59
  "vitest": "^4.1.0",
60
60
  "zod-to-json-schema": "^3.22.4",
61
- "@langchain/langgraph-checkpoint-postgres": "1.0.2",
62
- "@langchain/langgraph-checkpoint-sqlite": "1.0.2"
61
+ "@langchain/langgraph-checkpoint-postgres": "1.0.3",
62
+ "@langchain/langgraph-checkpoint-sqlite": "1.0.3"
63
63
  },
64
64
  "publishConfig": {
65
65
  "access": "public",