@langgraph-js/pure-graph 2.7.0 → 2.7.1
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.
|
@@ -2,7 +2,14 @@ import { Hono } from 'hono';
|
|
|
2
2
|
import { h as handleRequest } from '../../index-B-gojNlM.js';
|
|
3
3
|
|
|
4
4
|
const app = new Hono();
|
|
5
|
-
app.
|
|
5
|
+
app.use("/assistants/*", async (c) => {
|
|
6
|
+
const context = {
|
|
7
|
+
langgraph_context: c.get("langgraph_context")
|
|
8
|
+
};
|
|
9
|
+
const response = await handleRequest(c.req.raw, context);
|
|
10
|
+
return response;
|
|
11
|
+
});
|
|
12
|
+
app.use("/threads/*", async (c) => {
|
|
6
13
|
const context = {
|
|
7
14
|
langgraph_context: c.get("langgraph_context")
|
|
8
15
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/adapter/hono/index.ts"],"sourcesContent":["import { Hono } from 'hono';\nimport { handleRequest } from '../fetch';\n// import { cors } from 'hono/cors';\n\nexport interface LangGraphServerContext {\n langgraph_context: any;\n}\n\nconst app = new Hono<{ Variables: LangGraphServerContext }>();\n\n// app.use(cors());\n\n//
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/adapter/hono/index.ts"],"sourcesContent":["import { Hono } from 'hono';\nimport { handleRequest } from '../fetch';\n// import { cors } from 'hono/cors';\n\nexport interface LangGraphServerContext {\n langgraph_context: any;\n}\n\nconst app = new Hono<{ Variables: LangGraphServerContext }>();\n\n// app.use(cors());\n\n// 只拦截以 /assistants、/threads 开头的请求\napp.use('/assistants/*', async (c) => {\n const context = {\n langgraph_context: c.get('langgraph_context'),\n };\n\n const response = await handleRequest(c.req.raw, context);\n return response;\n});\n\napp.use('/threads/*', async (c) => {\n const context = {\n langgraph_context: c.get('langgraph_context'),\n };\n\n const response = await handleRequest(c.req.raw, context);\n return response;\n});\n\nexport default app;\n"],"names":[],"mappings":";;;AAQA,MAAM,GAAA,GAAM,IAAI,IAAA;AAKhB,GAAA,CAAI,GAAA,CAAI,eAAA,EAAiB,OAAO,CAAA,KAAM;AAClC,EAAA,MAAM,OAAA,GAAU;AAAA,IACZ,iBAAA,EAAmB,CAAA,CAAE,GAAA,CAAI,mBAAmB;AAAA,GAChD;AAEA,EAAA,MAAM,WAAW,MAAM,aAAA,CAAc,CAAA,CAAE,GAAA,CAAI,KAAK,OAAO,CAAA;AACvD,EAAA,OAAO,QAAA;AACX,CAAC,CAAA;AAED,GAAA,CAAI,GAAA,CAAI,YAAA,EAAc,OAAO,CAAA,KAAM;AAC/B,EAAA,MAAM,OAAA,GAAU;AAAA,IACZ,iBAAA,EAAmB,CAAA,CAAE,GAAA,CAAI,mBAAmB;AAAA,GAChD;AAEA,EAAA,MAAM,WAAW,MAAM,aAAA,CAAc,CAAA,CAAE,GAAA,CAAI,KAAK,OAAO,CAAA;AACvD,EAAA,OAAO,QAAA;AACX,CAAC,CAAA;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@langgraph-js/pure-graph",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.1",
|
|
4
4
|
"description": "A library that provides a standard LangGraph endpoint for integrating into various frameworks like Next.js and Hono.js, with support for multiple storage backends (SQLite, PostgreSQL, Redis) and message queues.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|