@langgraph-js/pure-graph 1.4.1 → 1.4.4

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 (50) hide show
  1. package/dist/__vite-browser-external-DGN5jhtd.js +4 -0
  2. package/dist/__vite-browser-external-DGN5jhtd.js.map +1 -0
  3. package/dist/checkpoint-BHKV54sL.js +386 -0
  4. package/dist/checkpoint-BHKV54sL.js.map +1 -0
  5. package/dist/checkpoint-DxiUsHMy.js +13 -0
  6. package/dist/checkpoint-DxiUsHMy.js.map +1 -0
  7. package/dist/global.d.ts +1 -1
  8. package/dist/index-DcXE-SZb.js +1264 -0
  9. package/dist/index-DcXE-SZb.js.map +1 -0
  10. package/dist/index.js +2 -5
  11. package/dist/index.js.map +1 -0
  12. package/dist/queue-C6iEVbd2.js +120 -0
  13. package/dist/queue-C6iEVbd2.js.map +1 -0
  14. package/dist/storage/index.d.ts +1 -1
  15. package/dist/threads-BUgBiCiK.js +302 -0
  16. package/dist/threads-BUgBiCiK.js.map +1 -0
  17. package/package.json +6 -3
  18. package/dist/adapter/hono/assistants.js +0 -21
  19. package/dist/adapter/hono/endpoint.js +0 -2
  20. package/dist/adapter/hono/index.js +0 -11
  21. package/dist/adapter/hono/runs.js +0 -54
  22. package/dist/adapter/hono/threads.js +0 -30
  23. package/dist/adapter/nextjs/endpoint.js +0 -2
  24. package/dist/adapter/nextjs/index.js +0 -2
  25. package/dist/adapter/nextjs/router.js +0 -179
  26. package/dist/adapter/zod.js +0 -127
  27. package/dist/createEndpoint.js +0 -77
  28. package/dist/global.js +0 -13
  29. package/dist/graph/stream.js +0 -195
  30. package/dist/graph/stringify.js +0 -214
  31. package/dist/queue/JsonPlusSerializer.js +0 -138
  32. package/dist/queue/event_message.js +0 -27
  33. package/dist/queue/stream_queue.js +0 -177
  34. package/dist/storage/index.js +0 -64
  35. package/dist/storage/memory/checkpoint.js +0 -2
  36. package/dist/storage/memory/queue.js +0 -81
  37. package/dist/storage/memory/threads.js +0 -145
  38. package/dist/storage/pg/checkpoint.js +0 -9
  39. package/dist/storage/pg/threads.js +0 -303
  40. package/dist/storage/redis/queue.js +0 -130
  41. package/dist/storage/sqlite/DB.js +0 -14
  42. package/dist/storage/sqlite/checkpoint.js +0 -374
  43. package/dist/storage/sqlite/threads.js +0 -299
  44. package/dist/storage/sqlite/type.js +0 -1
  45. package/dist/threads/index.js +0 -1
  46. package/dist/tsconfig.tsbuildinfo +0 -1
  47. package/dist/types.js +0 -1
  48. package/dist/utils/createEntrypointGraph.js +0 -11
  49. package/dist/utils/getGraph.js +0 -18
  50. package/dist/utils/getLangGraphCommand.js +0 -13
package/dist/types.js DELETED
@@ -1 +0,0 @@
1
- export {};
@@ -1,11 +0,0 @@
1
- import { StateGraph } from '@langchain/langgraph';
2
- export const createEntrypointGraph = ({ stateSchema, config, graph, }) => {
3
- const name = graph.getName();
4
- return new StateGraph(stateSchema, config)
5
- .addNode(name, (state, config) => graph.invoke(state, config))
6
- .addEdge('__start__', name)
7
- .addEdge(name, '__end__')
8
- .compile({
9
- name,
10
- });
11
- };
@@ -1,18 +0,0 @@
1
- import { LangGraphGlobal } from '../global';
2
- export const GRAPHS = {};
3
- export async function registerGraph(graphId, graph) {
4
- GRAPHS[graphId] = graph;
5
- }
6
- export async function getGraph(graphId, config, options) {
7
- if (!GRAPHS[graphId])
8
- throw new Error(`Graph "${graphId}" not found`);
9
- const compiled = typeof GRAPHS[graphId] === 'function' ? await GRAPHS[graphId](config ?? { configurable: {} }) : GRAPHS[graphId];
10
- if (typeof options?.checkpointer !== 'undefined') {
11
- compiled.checkpointer = options?.checkpointer ?? LangGraphGlobal.globalCheckPointer;
12
- }
13
- else {
14
- compiled.checkpointer = LangGraphGlobal.globalCheckPointer;
15
- }
16
- compiled.store = options?.store ?? undefined;
17
- return compiled;
18
- }
@@ -1,13 +0,0 @@
1
- import { Command, Send } from '@langchain/langgraph';
2
- export const getLangGraphCommand = (command) => {
3
- let goto = command.goto != null && !Array.isArray(command.goto) ? [command.goto] : command.goto;
4
- return new Command({
5
- goto: goto?.map((item) => {
6
- if (typeof item !== 'string')
7
- return new Send(item.node, item.input);
8
- return item;
9
- }),
10
- update: command.update ?? undefined,
11
- resume: command.resume,
12
- });
13
- };