@langgraph-js/pure-graph 1.4.2 → 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.
- package/dist/index.js +2 -5
- package/package.json +2 -2
- package/dist/adapter/hono/assistants.js +0 -21
- package/dist/adapter/hono/endpoint.js +0 -2
- package/dist/adapter/hono/index.js +0 -11
- package/dist/adapter/hono/runs.js +0 -54
- package/dist/adapter/hono/threads.js +0 -30
- package/dist/adapter/nextjs/endpoint.js +0 -2
- package/dist/adapter/nextjs/index.js +0 -2
- package/dist/adapter/nextjs/router.js +0 -179
- package/dist/adapter/zod.js +0 -127
- package/dist/createEndpoint.js +0 -77
- package/dist/global.js +0 -13
- package/dist/graph/stream.js +0 -195
- package/dist/graph/stringify.js +0 -214
- package/dist/queue/JsonPlusSerializer.js +0 -138
- package/dist/queue/event_message.js +0 -27
- package/dist/queue/stream_queue.js +0 -177
- package/dist/storage/index.js +0 -64
- package/dist/storage/memory/checkpoint.js +0 -2
- package/dist/storage/memory/queue.js +0 -81
- package/dist/storage/memory/threads.js +0 -145
- package/dist/storage/pg/checkpoint.js +0 -9
- package/dist/storage/pg/threads.js +0 -303
- package/dist/storage/redis/queue.js +0 -130
- package/dist/storage/sqlite/DB.js +0 -14
- package/dist/storage/sqlite/checkpoint.js +0 -374
- package/dist/storage/sqlite/threads.js +0 -299
- package/dist/storage/sqlite/type.js +0 -1
- package/dist/threads/index.js +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/dist/types.js +0 -1
- package/dist/utils/createEntrypointGraph.js +0 -11
- package/dist/utils/getGraph.js +0 -18
- 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
|
-
};
|
package/dist/utils/getGraph.js
DELETED
|
@@ -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
|
-
};
|