@inkeep/agents-api 0.0.0-dev-20260126204245 → 0.0.0-dev-20260127010045
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/.well-known/workflow/v1/manifest.debug.json +11 -11
- package/dist/createApp.d.ts +2 -2
- package/dist/createApp.js +2 -0
- package/dist/data/db/runDbClient.d.ts +2 -2
- package/dist/domains/evals/routes/datasetTriggers.d.ts +2 -2
- package/dist/domains/evals/routes/index.d.ts +2 -2
- package/dist/domains/evals/workflow/routes.d.ts +2 -2
- package/dist/domains/github/index.d.ts +3 -3
- package/dist/domains/github/routes/tokenExchange.d.ts +2 -2
- package/dist/domains/manage/routes/conversations.d.ts +2 -2
- package/dist/domains/manage/routes/evals/evaluationResults.d.ts +2 -2
- package/dist/domains/manage/routes/index.d.ts +2 -2
- package/dist/domains/manage/routes/mcp.d.ts +2 -2
- package/dist/domains/manage/routes/signoz.d.ts +2 -2
- package/dist/domains/mcp/routes/mcp.d.ts +7 -0
- package/dist/domains/mcp/routes/mcp.js +45 -0
- package/dist/domains/run/agents/relationTools.d.ts +2 -2
- package/dist/domains/run/utils/token-estimator.d.ts +2 -2
- package/dist/factory.d.ts +262 -262
- package/dist/index.d.ts +261 -261
- package/dist/middleware/evalsAuth.d.ts +2 -2
- package/dist/middleware/manageAuth.d.ts +2 -2
- package/dist/middleware/projectAccess.d.ts +2 -2
- package/dist/middleware/projectConfig.d.ts +3 -3
- package/dist/middleware/requirePermission.d.ts +2 -2
- package/dist/middleware/runAuth.d.ts +4 -4
- package/dist/middleware/sessionAuth.d.ts +3 -3
- package/dist/middleware/tenantAccess.d.ts +2 -2
- package/dist/middleware/tracing.d.ts +3 -3
- package/package.json +4 -3
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"steps": {
|
|
3
|
+
"node_modules/.pnpm/workflow@4.0.1-beta.33_@aws-sdk+client-sts@3.970.0_@opentelemetry+api@1.9.0_@types+reac_d0e39273ec53983ee1a59c0952eb17f2/node_modules/workflow/dist/internal/builtins.js": {
|
|
4
|
+
"__builtin_response_array_buffer": {
|
|
5
|
+
"stepId": "__builtin_response_array_buffer"
|
|
6
|
+
},
|
|
7
|
+
"__builtin_response_json": {
|
|
8
|
+
"stepId": "__builtin_response_json"
|
|
9
|
+
},
|
|
10
|
+
"__builtin_response_text": {
|
|
11
|
+
"stepId": "__builtin_response_text"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
3
14
|
"src/domains/evals/workflow/functions/runDatasetItem.ts": {
|
|
4
15
|
"callChatApiStep": {
|
|
5
16
|
"stepId": "step//src/domains/evals/workflow/functions/runDatasetItem.ts//callChatApiStep"
|
|
@@ -14,17 +25,6 @@
|
|
|
14
25
|
"stepId": "step//src/domains/evals/workflow/functions/runDatasetItem.ts//logStep"
|
|
15
26
|
}
|
|
16
27
|
},
|
|
17
|
-
"node_modules/.pnpm/workflow@4.0.1-beta.33_@aws-sdk+client-sts@3.970.0_@opentelemetry+api@1.9.0_@types+reac_d0e39273ec53983ee1a59c0952eb17f2/node_modules/workflow/dist/internal/builtins.js": {
|
|
18
|
-
"__builtin_response_array_buffer": {
|
|
19
|
-
"stepId": "__builtin_response_array_buffer"
|
|
20
|
-
},
|
|
21
|
-
"__builtin_response_json": {
|
|
22
|
-
"stepId": "__builtin_response_json"
|
|
23
|
-
},
|
|
24
|
-
"__builtin_response_text": {
|
|
25
|
-
"stepId": "__builtin_response_text"
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
28
|
"src/domains/evals/workflow/functions/evaluateConversation.ts": {
|
|
29
29
|
"executeEvaluatorStep": {
|
|
30
30
|
"stepId": "step//src/domains/evals/workflow/functions/evaluateConversation.ts//executeEvaluatorStep"
|
package/dist/createApp.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { AppConfig } from "./types/app.js";
|
|
2
2
|
import "./types/index.js";
|
|
3
3
|
import { Hono } from "hono";
|
|
4
|
-
import * as
|
|
4
|
+
import * as hono_types0 from "hono/types";
|
|
5
5
|
|
|
6
6
|
//#region src/createApp.d.ts
|
|
7
7
|
declare const isWebhookRoute: (path: string) => boolean;
|
|
8
|
-
declare function createAgentsHono(config: AppConfig): Hono<
|
|
8
|
+
declare function createAgentsHono(config: AppConfig): Hono<hono_types0.BlankEnv, hono_types0.BlankSchema, "/">;
|
|
9
9
|
//#endregion
|
|
10
10
|
export { createAgentsHono, isWebhookRoute };
|
package/dist/createApp.js
CHANGED
|
@@ -5,6 +5,7 @@ import { workflowRoutes } from "./domains/evals/workflow/routes.js";
|
|
|
5
5
|
import { githubRoutes } from "./domains/github/index.js";
|
|
6
6
|
import { sessionAuth, sessionContext } from "./middleware/sessionAuth.js";
|
|
7
7
|
import { manageRoutes } from "./domains/manage/index.js";
|
|
8
|
+
import mcp_default from "./domains/mcp/routes/mcp.js";
|
|
8
9
|
import { flushBatchProcessor } from "./instrumentation.js";
|
|
9
10
|
import { runRoutes } from "./domains/run/index.js";
|
|
10
11
|
import { authCorsConfig, defaultCorsConfig, playgroundCorsConfig, runCorsConfig, signozCorsConfig } from "./middleware/cors.js";
|
|
@@ -190,6 +191,7 @@ function createAgentsHono(config) {
|
|
|
190
191
|
});
|
|
191
192
|
app.route("/evals", evalRoutes);
|
|
192
193
|
app.route("/api/github", githubRoutes);
|
|
194
|
+
app.route("/mcp", mcp_default);
|
|
193
195
|
setupOpenAPIRoutes(app);
|
|
194
196
|
app.use("/run/*", async (_c, next) => {
|
|
195
197
|
await next();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _inkeep_agents_core0 from "@inkeep/agents-core";
|
|
2
2
|
|
|
3
3
|
//#region src/data/db/runDbClient.d.ts
|
|
4
|
-
declare const runDbClient:
|
|
4
|
+
declare const runDbClient: _inkeep_agents_core0.AgentsRunDatabaseClient;
|
|
5
5
|
//#endregion
|
|
6
6
|
export { runDbClient as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { OpenAPIHono } from "@hono/zod-openapi";
|
|
2
|
-
import * as
|
|
2
|
+
import * as hono16 from "hono";
|
|
3
3
|
|
|
4
4
|
//#region src/domains/evals/routes/datasetTriggers.d.ts
|
|
5
|
-
declare const app: OpenAPIHono<
|
|
5
|
+
declare const app: OpenAPIHono<hono16.Env, {}, "/">;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { app as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { OpenAPIHono } from "@hono/zod-openapi";
|
|
2
|
-
import * as
|
|
2
|
+
import * as hono14 from "hono";
|
|
3
3
|
|
|
4
4
|
//#region src/domains/evals/routes/index.d.ts
|
|
5
|
-
declare const app: OpenAPIHono<
|
|
5
|
+
declare const app: OpenAPIHono<hono14.Env, {}, "/">;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { app as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Hono } from "hono";
|
|
2
|
-
import * as
|
|
2
|
+
import * as hono_types14 from "hono/types";
|
|
3
3
|
|
|
4
4
|
//#region src/domains/evals/workflow/routes.d.ts
|
|
5
|
-
declare const workflowRoutes: Hono<
|
|
5
|
+
declare const workflowRoutes: Hono<hono_types14.BlankEnv, hono_types14.BlankSchema, "/">;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { workflowRoutes };
|
|
@@ -3,10 +3,10 @@ import { GenerateInstallationAccessTokenResult, GenerateTokenError, GenerateToke
|
|
|
3
3
|
import { GetJwkResult, JwksError, JwksResult, clearJwksCache, getJwkForToken, getJwksCacheStatus } from "./jwks.js";
|
|
4
4
|
import { GitHubOidcClaims, ValidateOidcTokenResult, ValidateTokenError, ValidateTokenResult, validateOidcToken } from "./oidcToken.js";
|
|
5
5
|
import { Hono } from "hono";
|
|
6
|
-
import * as
|
|
6
|
+
import * as hono_types7 from "hono/types";
|
|
7
7
|
|
|
8
8
|
//#region src/domains/github/index.d.ts
|
|
9
|
-
declare function createGithubRoutes(): Hono<
|
|
10
|
-
declare const githubRoutes: Hono<
|
|
9
|
+
declare function createGithubRoutes(): Hono<hono_types7.BlankEnv, hono_types7.BlankSchema, "/">;
|
|
10
|
+
declare const githubRoutes: Hono<hono_types7.BlankEnv, hono_types7.BlankSchema, "/">;
|
|
11
11
|
//#endregion
|
|
12
12
|
export { type GenerateInstallationAccessTokenResult, type GenerateTokenError, type GenerateTokenResult, type GetJwkResult, type GitHubAppConfig, type GitHubOidcClaims, type InstallationAccessToken, type InstallationInfo, type JwksError, type JwksResult, type LookupInstallationError, type LookupInstallationForRepoResult, type LookupInstallationResult, type ValidateOidcTokenResult, type ValidateTokenError, type ValidateTokenResult, clearJwksCache, createGithubRoutes, generateInstallationAccessToken, getGitHubAppConfig, getJwkForToken, getJwksCacheStatus, githubRoutes, isGitHubAppConfigured, lookupInstallationForRepo, validateOidcToken };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Hono } from "hono";
|
|
2
|
-
import * as
|
|
2
|
+
import * as hono_types5 from "hono/types";
|
|
3
3
|
|
|
4
4
|
//#region src/domains/github/routes/tokenExchange.d.ts
|
|
5
|
-
declare const app: Hono<
|
|
5
|
+
declare const app: Hono<hono_types5.BlankEnv, hono_types5.BlankSchema, "/">;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { app as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { OpenAPIHono } from "@hono/zod-openapi";
|
|
2
|
-
import * as
|
|
2
|
+
import * as hono15 from "hono";
|
|
3
3
|
|
|
4
4
|
//#region src/domains/manage/routes/conversations.d.ts
|
|
5
|
-
declare const app: OpenAPIHono<
|
|
5
|
+
declare const app: OpenAPIHono<hono15.Env, {}, "/">;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { app as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { OpenAPIHono } from "@hono/zod-openapi";
|
|
2
|
-
import * as
|
|
2
|
+
import * as hono18 from "hono";
|
|
3
3
|
|
|
4
4
|
//#region src/domains/manage/routes/evals/evaluationResults.d.ts
|
|
5
|
-
declare const app: OpenAPIHono<
|
|
5
|
+
declare const app: OpenAPIHono<hono18.Env, {}, "/">;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { app as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { OpenAPIHono } from "@hono/zod-openapi";
|
|
2
|
-
import * as
|
|
2
|
+
import * as hono17 from "hono";
|
|
3
3
|
|
|
4
4
|
//#region src/domains/manage/routes/index.d.ts
|
|
5
|
-
declare const app: OpenAPIHono<
|
|
5
|
+
declare const app: OpenAPIHono<hono17.Env, {}, "/">;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { app as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Hono } from "hono";
|
|
2
|
-
import * as
|
|
2
|
+
import * as hono_types12 from "hono/types";
|
|
3
3
|
|
|
4
4
|
//#region src/domains/manage/routes/mcp.d.ts
|
|
5
|
-
declare const app: Hono<
|
|
5
|
+
declare const app: Hono<hono_types12.BlankEnv, hono_types12.BlankSchema, "/">;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { app as default };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ManageAppVariables } from "../../../types/app.js";
|
|
2
2
|
import { Hono } from "hono";
|
|
3
|
-
import * as
|
|
3
|
+
import * as hono_types11 from "hono/types";
|
|
4
4
|
|
|
5
5
|
//#region src/domains/manage/routes/signoz.d.ts
|
|
6
6
|
declare const app: Hono<{
|
|
7
7
|
Variables: ManageAppVariables;
|
|
8
|
-
},
|
|
8
|
+
}, hono_types11.BlankSchema, "/">;
|
|
9
9
|
//#endregion
|
|
10
10
|
export { app as default };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { env } from "../../../env.js";
|
|
2
|
+
import { Hono } from "hono";
|
|
3
|
+
import { StreamableHTTPTransport } from "@hono/mcp";
|
|
4
|
+
import { HeaderForwardingHook, InkeepAgentsCore, SDKHooks, createConsoleLogger, createMCPServer } from "@inkeep/agents-mcp";
|
|
5
|
+
|
|
6
|
+
//#region src/domains/mcp/routes/mcp.ts
|
|
7
|
+
const app = new Hono();
|
|
8
|
+
/**
|
|
9
|
+
* Headers to forward from incoming requests to downstream API calls.
|
|
10
|
+
* x-forwarded-cookie is mapped to cookie for browser compatibility
|
|
11
|
+
* (browsers don't allow setting Cookie header directly).
|
|
12
|
+
*/
|
|
13
|
+
const FORWARDED_HEADERS = [
|
|
14
|
+
"x-forwarded-cookie",
|
|
15
|
+
"authorization",
|
|
16
|
+
"cookie"
|
|
17
|
+
];
|
|
18
|
+
app.all("/", async (c) => {
|
|
19
|
+
const transport = new StreamableHTTPTransport();
|
|
20
|
+
const noOpLogger = createConsoleLogger("error");
|
|
21
|
+
const headersToForward = {};
|
|
22
|
+
for (const headerName of FORWARDED_HEADERS) {
|
|
23
|
+
const value = c.req.header(headerName);
|
|
24
|
+
if (value) headersToForward[headerName] = value;
|
|
25
|
+
}
|
|
26
|
+
if (headersToForward["x-forwarded-cookie"] && !headersToForward.cookie) headersToForward.cookie = headersToForward["x-forwarded-cookie"];
|
|
27
|
+
const createSDKWithHeaders = () => {
|
|
28
|
+
const hooks = new SDKHooks();
|
|
29
|
+
hooks.registerBeforeRequestHook(new HeaderForwardingHook(headersToForward));
|
|
30
|
+
return new InkeepAgentsCore({
|
|
31
|
+
serverURL: env.INKEEP_AGENTS_API_URL,
|
|
32
|
+
hooks
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
await createMCPServer({
|
|
36
|
+
logger: noOpLogger,
|
|
37
|
+
serverURL: env.INKEEP_AGENTS_API_URL,
|
|
38
|
+
getSDK: createSDKWithHeaders
|
|
39
|
+
}).server.connect(transport);
|
|
40
|
+
return transport.handleRequest(c);
|
|
41
|
+
});
|
|
42
|
+
var mcp_default = app;
|
|
43
|
+
|
|
44
|
+
//#endregion
|
|
45
|
+
export { mcp_default as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AgentConfig, DelegateRelation } from "./Agent.js";
|
|
2
2
|
import { InternalRelation } from "../utils/project.js";
|
|
3
|
-
import * as
|
|
3
|
+
import * as _inkeep_agents_core1 from "@inkeep/agents-core";
|
|
4
4
|
import { CredentialStoreRegistry, FullExecutionContext } from "@inkeep/agents-core";
|
|
5
5
|
import * as ai0 from "ai";
|
|
6
6
|
|
|
@@ -44,7 +44,7 @@ declare function createDelegateToAgentTool({
|
|
|
44
44
|
message: string;
|
|
45
45
|
}, {
|
|
46
46
|
toolCallId: any;
|
|
47
|
-
result:
|
|
47
|
+
result: _inkeep_agents_core1.Message | _inkeep_agents_core1.Task;
|
|
48
48
|
}>;
|
|
49
49
|
/**
|
|
50
50
|
* Parameters for building a transfer relation config
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _inkeep_agents_core3 from "@inkeep/agents-core";
|
|
2
2
|
import { BreakdownComponentDef, ContextBreakdown, calculateBreakdownTotal, createEmptyBreakdown } from "@inkeep/agents-core";
|
|
3
3
|
|
|
4
4
|
//#region src/domains/run/utils/token-estimator.d.ts
|
|
@@ -17,7 +17,7 @@ interface AssembleResult {
|
|
|
17
17
|
/** The assembled prompt string */
|
|
18
18
|
prompt: string;
|
|
19
19
|
/** Token breakdown for each component */
|
|
20
|
-
breakdown:
|
|
20
|
+
breakdown: _inkeep_agents_core3.ContextBreakdown;
|
|
21
21
|
}
|
|
22
22
|
//#endregion
|
|
23
23
|
export { AssembleResult, type BreakdownComponentDef, type ContextBreakdown, calculateBreakdownTotal, createEmptyBreakdown, estimateTokens };
|