@inkeep/agents-run-api 0.16.2 → 0.17.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.
- package/dist/index.cjs +5 -3
- package/dist/index.js +5 -3
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -823,9 +823,11 @@ var apiKeyAuth = () => factory.createMiddleware(async (c, next) => {
|
|
|
823
823
|
const projectId = c.req.header("x-inkeep-project-id");
|
|
824
824
|
const graphId = c.req.header("x-inkeep-graph-id");
|
|
825
825
|
const agentId = c.req.header("x-inkeep-agent-id");
|
|
826
|
-
const proto = c.req.header("x-forwarded-proto")
|
|
827
|
-
const
|
|
828
|
-
const
|
|
826
|
+
const proto = c.req.header("x-forwarded-proto")?.split(",")[0].trim();
|
|
827
|
+
const fwdHost = c.req.header("x-forwarded-host")?.split(",")[0].trim();
|
|
828
|
+
const host = fwdHost ?? c.req.header("host");
|
|
829
|
+
const reqUrl = new URL(c.req.url);
|
|
830
|
+
const baseUrl = proto && host ? `${proto}://${host}` : host ? `${reqUrl.protocol}//${host}` : `${reqUrl.origin}`;
|
|
829
831
|
if (process.env.ENVIRONMENT === "development" || process.env.ENVIRONMENT === "test") {
|
|
830
832
|
let executionContext;
|
|
831
833
|
if (authHeader?.startsWith("Bearer ")) {
|
package/dist/index.js
CHANGED
|
@@ -57,9 +57,11 @@ var apiKeyAuth = () => createMiddleware(async (c, next) => {
|
|
|
57
57
|
const projectId = c.req.header("x-inkeep-project-id");
|
|
58
58
|
const graphId = c.req.header("x-inkeep-graph-id");
|
|
59
59
|
const agentId = c.req.header("x-inkeep-agent-id");
|
|
60
|
-
const proto = c.req.header("x-forwarded-proto")
|
|
61
|
-
const
|
|
62
|
-
const
|
|
60
|
+
const proto = c.req.header("x-forwarded-proto")?.split(",")[0].trim();
|
|
61
|
+
const fwdHost = c.req.header("x-forwarded-host")?.split(",")[0].trim();
|
|
62
|
+
const host = fwdHost ?? c.req.header("host");
|
|
63
|
+
const reqUrl = new URL(c.req.url);
|
|
64
|
+
const baseUrl = proto && host ? `${proto}://${host}` : host ? `${reqUrl.protocol}//${host}` : `${reqUrl.origin}`;
|
|
63
65
|
if (process.env.ENVIRONMENT === "development" || process.env.ENVIRONMENT === "test") {
|
|
64
66
|
let executionContext;
|
|
65
67
|
if (authHeader?.startsWith("Bearer ")) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inkeep/agents-run-api",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.0",
|
|
4
4
|
"description": "Agents Run API for Inkeep Agent Framework - handles chat, agent execution, and streaming",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"traverse": "^0.6.11",
|
|
52
52
|
"ts-pattern": "^5.7.1",
|
|
53
53
|
"zod": "^4.1.11",
|
|
54
|
-
"@inkeep/agents-core": "^0.
|
|
54
|
+
"@inkeep/agents-core": "^0.17.0"
|
|
55
55
|
},
|
|
56
56
|
"optionalDependencies": {
|
|
57
57
|
"keytar": "^7.9.0"
|