@inkeep/agents-api 0.0.0-dev-20260204182014 → 0.0.0-dev-20260204210021
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 +5 -5
- package/dist/.well-known/workflow/v1/step.cjs +233 -570
- package/dist/createApp.d.ts +2 -2
- package/dist/createApp.js +1 -46
- package/dist/data/db/manageDbClient.d.ts +2 -2
- 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/services/EvaluationService.d.ts +5 -0
- package/dist/domains/evals/services/EvaluationService.js +51 -2
- package/dist/domains/evals/workflow/routes.d.ts +2 -2
- package/dist/domains/manage/routes/availableAgents.d.ts +2 -2
- package/dist/domains/manage/routes/conversations.d.ts +2 -2
- package/dist/domains/manage/routes/index.d.ts +2 -2
- package/dist/domains/manage/routes/invitations.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/manage/routes/userOrganizations.d.ts +2 -2
- package/dist/domains/mcp/routes/mcp.d.ts +2 -2
- 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 +20 -20
- package/dist/index.d.ts +18 -18
- package/dist/middleware/cors.d.ts +1 -6
- package/dist/middleware/cors.js +1 -27
- package/dist/middleware/evalsAuth.d.ts +2 -2
- package/dist/middleware/index.d.ts +2 -2
- package/dist/middleware/index.js +2 -2
- package/dist/middleware/manageAuth.d.ts +2 -2
- package/dist/middleware/manageAuth.js +1 -16
- 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/runAuth.js +1 -48
- 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/dist/openapi.d.ts +0 -8
- package/dist/openapi.js +1 -9
- package/package.json +5 -10
- package/dist/domains/work-apps/index.d.ts +0 -13
- package/dist/domains/work-apps/index.js +0 -23
- package/dist/domains/work-apps/types.d.ts +0 -7
- package/dist/domains/work-apps/types.js +0 -1
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_types3 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_types3.BlankEnv, hono_types3.BlankSchema, "/">;
|
|
9
9
|
//#endregion
|
|
10
10
|
export { createAgentsHono, isWebhookRoute };
|
package/dist/createApp.js
CHANGED
|
@@ -7,8 +7,7 @@ import { manageRoutes } from "./domains/manage/index.js";
|
|
|
7
7
|
import mcp_default from "./domains/mcp/routes/mcp.js";
|
|
8
8
|
import { flushBatchProcessor } from "./instrumentation.js";
|
|
9
9
|
import { runRoutes } from "./domains/run/index.js";
|
|
10
|
-
import {
|
|
11
|
-
import { authCorsConfig, defaultCorsConfig, playgroundCorsConfig, runCorsConfig, signozCorsConfig, workAppsCorsConfig } from "./middleware/cors.js";
|
|
10
|
+
import { authCorsConfig, defaultCorsConfig, playgroundCorsConfig, runCorsConfig, signozCorsConfig } from "./middleware/cors.js";
|
|
12
11
|
import { errorHandler } from "./middleware/errorHandler.js";
|
|
13
12
|
import { manageApiKeyAuth } from "./middleware/manageAuth.js";
|
|
14
13
|
import { manageRefMiddleware, oauthRefMiddleware, runRefMiddleware, writeProtectionMiddleware } from "./middleware/ref.js";
|
|
@@ -53,11 +52,9 @@ function createAgentsHono(config) {
|
|
|
53
52
|
app.use("/run/*", cors(runCorsConfig));
|
|
54
53
|
app.use("/manage/tenants/*/playground/token", cors(playgroundCorsConfig));
|
|
55
54
|
app.use("/manage/tenants/*/signoz/*", cors(signozCorsConfig));
|
|
56
|
-
app.use("/work-apps/*", cors(workAppsCorsConfig));
|
|
57
55
|
app.use("*", async (c, next) => {
|
|
58
56
|
if (auth && c.req.path.startsWith("/api/auth/")) return next();
|
|
59
57
|
if (c.req.path.startsWith("/run/")) return next();
|
|
60
|
-
if (c.req.path.startsWith("/work-apps/")) return next();
|
|
61
58
|
if (c.req.path.includes("/playground/token")) return next();
|
|
62
59
|
if (c.req.path.includes("/signoz/")) return next();
|
|
63
60
|
if (c.req.path.includes("/work-apps/github/")) return next();
|
|
@@ -188,48 +185,6 @@ function createAgentsHono(config) {
|
|
|
188
185
|
});
|
|
189
186
|
app.route("/evals", evalRoutes);
|
|
190
187
|
app.route("/work-apps/github", githubRoutes);
|
|
191
|
-
app.use("/work-apps/*", async (c, next) => {
|
|
192
|
-
c.set("auth", auth);
|
|
193
|
-
await next();
|
|
194
|
-
});
|
|
195
|
-
app.use("/work-apps/slack/workspaces/*", async (c, next) => {
|
|
196
|
-
if (c.req.method === "GET" || isTestEnvironment()) {
|
|
197
|
-
await next();
|
|
198
|
-
return;
|
|
199
|
-
}
|
|
200
|
-
const origin = c.req.header("Origin");
|
|
201
|
-
if (origin && env.ENVIRONMENT !== "production") try {
|
|
202
|
-
const originUrl = new URL(origin);
|
|
203
|
-
if (originUrl.hostname === "localhost" || originUrl.hostname === "127.0.0.1") {
|
|
204
|
-
c.set("userId", "dev-user");
|
|
205
|
-
c.set("tenantId", "default");
|
|
206
|
-
c.set("tenantRole", "owner");
|
|
207
|
-
await next();
|
|
208
|
-
return;
|
|
209
|
-
}
|
|
210
|
-
} catch {}
|
|
211
|
-
if (c.req.header("Authorization")?.startsWith("Bearer ")) return manageApiKeyAuth()(c, next);
|
|
212
|
-
return sessionAuth()(c, next);
|
|
213
|
-
});
|
|
214
|
-
app.use("/work-apps/slack/users/*", async (c, next) => {
|
|
215
|
-
if (c.req.method === "GET" || isTestEnvironment()) {
|
|
216
|
-
await next();
|
|
217
|
-
return;
|
|
218
|
-
}
|
|
219
|
-
const origin = c.req.header("Origin");
|
|
220
|
-
if (origin && env.ENVIRONMENT !== "production") try {
|
|
221
|
-
const originUrl = new URL(origin);
|
|
222
|
-
if (originUrl.hostname === "localhost" || originUrl.hostname === "127.0.0.1") {
|
|
223
|
-
c.set("userId", "dev-user");
|
|
224
|
-
c.set("tenantId", "default");
|
|
225
|
-
await next();
|
|
226
|
-
return;
|
|
227
|
-
}
|
|
228
|
-
} catch {}
|
|
229
|
-
if (c.req.header("Authorization")?.startsWith("Bearer ")) return manageApiKeyAuth()(c, next);
|
|
230
|
-
return sessionAuth()(c, next);
|
|
231
|
-
});
|
|
232
|
-
app.route("/work-apps", workAppsRoutes);
|
|
233
188
|
app.route("/mcp", mcp_default);
|
|
234
189
|
setupOpenAPIRoutes(app);
|
|
235
190
|
app.use("/run/*", async (_c, next) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _inkeep_agents_core3 from "@inkeep/agents-core";
|
|
2
2
|
|
|
3
3
|
//#region src/data/db/manageDbClient.d.ts
|
|
4
|
-
declare const manageDbClient:
|
|
4
|
+
declare const manageDbClient: _inkeep_agents_core3.AgentsManageDatabaseClient;
|
|
5
5
|
//#endregion
|
|
6
6
|
export { manageDbClient as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _inkeep_agents_core2 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_core2.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 hono17 from "hono";
|
|
3
3
|
|
|
4
4
|
//#region src/domains/evals/routes/datasetTriggers.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 { OpenAPIHono } from "@hono/zod-openapi";
|
|
2
|
-
import * as
|
|
2
|
+
import * as hono18 from "hono";
|
|
3
3
|
|
|
4
4
|
//#region src/domains/evals/routes/index.d.ts
|
|
5
|
-
declare const app: OpenAPIHono<
|
|
5
|
+
declare const app: OpenAPIHono<hono18.Env, {}, "/">;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { app as default };
|
|
@@ -43,6 +43,11 @@ declare class EvaluationService {
|
|
|
43
43
|
* Extract messages from dataset item input
|
|
44
44
|
*/
|
|
45
45
|
private extractMessagesFromDatasetItem;
|
|
46
|
+
/**
|
|
47
|
+
* Parse SSE (Server-Sent Events) response from chat API
|
|
48
|
+
* Handles text deltas, error operations, and other data operations
|
|
49
|
+
*/
|
|
50
|
+
private parseSSEResponse;
|
|
46
51
|
/**
|
|
47
52
|
* Run an evaluation job based on an evaluation job config
|
|
48
53
|
* Filters conversations based on jobFilters and runs evaluations with configured evaluators
|
|
@@ -3,7 +3,7 @@ import { env } from "../../../env.js";
|
|
|
3
3
|
import manageDbClient_default from "../../../data/db/manageDbClient.js";
|
|
4
4
|
import manageDbPool_default from "../../../data/db/manageDbPool.js";
|
|
5
5
|
import runDbClient_default from "../../../data/db/runDbClient.js";
|
|
6
|
-
import { ModelFactory, createEvaluationResult, createEvaluationRun, filterConversationsForJob, generateId, getConversationHistory, getEvaluationJobConfigById, getEvaluationJobConfigEvaluatorRelations, getEvaluatorById, getFullAgent, getProjectScopedRef,
|
|
6
|
+
import { ModelFactory, createEvaluationResult, createEvaluationRun, filterConversationsForJob, generateId, getConversationHistory, getEvaluationJobConfigById, getEvaluationJobConfigEvaluatorRelations, getEvaluatorById, getFullAgent, getProjectScopedRef, resolveRef, updateEvaluationResult, withRef } from "@inkeep/agents-core";
|
|
7
7
|
import { generateObject, generateText } from "ai";
|
|
8
8
|
import { z } from "zod";
|
|
9
9
|
|
|
@@ -145,7 +145,8 @@ var EvaluationService = class {
|
|
|
145
145
|
error: `Chat API error: ${response.status} ${response.statusText}`
|
|
146
146
|
};
|
|
147
147
|
}
|
|
148
|
-
const
|
|
148
|
+
const responseText = await response.text();
|
|
149
|
+
const parseResult = this.parseSSEResponse(responseText);
|
|
149
150
|
if (parseResult.error) {
|
|
150
151
|
logger.error({
|
|
151
152
|
datasetItemId: datasetItem.id,
|
|
@@ -353,6 +354,54 @@ Generate the next user message:`;
|
|
|
353
354
|
return null;
|
|
354
355
|
}
|
|
355
356
|
/**
|
|
357
|
+
* Parse SSE (Server-Sent Events) response from chat API
|
|
358
|
+
* Handles text deltas, error operations, and other data operations
|
|
359
|
+
*/
|
|
360
|
+
parseSSEResponse(sseText) {
|
|
361
|
+
let textContent = "";
|
|
362
|
+
let hasError = false;
|
|
363
|
+
let errorMessage = "";
|
|
364
|
+
const lines = sseText.split("\n").filter((line) => line.startsWith("data: "));
|
|
365
|
+
for (const line of lines) try {
|
|
366
|
+
const data = JSON.parse(line.slice(6));
|
|
367
|
+
if (data.object === "chat.completion.chunk" && data.choices?.[0]?.delta) {
|
|
368
|
+
const delta = data.choices[0].delta;
|
|
369
|
+
if (delta.content) textContent += delta.content;
|
|
370
|
+
if (delta.content && typeof delta.content === "string") try {
|
|
371
|
+
const parsedContent = JSON.parse(delta.content);
|
|
372
|
+
if (parsedContent.type === "data-operation" && parsedContent.data?.type === "error") {
|
|
373
|
+
hasError = true;
|
|
374
|
+
errorMessage = parsedContent.data.message || "Unknown error occurred";
|
|
375
|
+
logger.warn({
|
|
376
|
+
errorMessage,
|
|
377
|
+
errorData: parsedContent.data
|
|
378
|
+
}, "Received error operation from chat API");
|
|
379
|
+
}
|
|
380
|
+
} catch {}
|
|
381
|
+
} else if (data.type === "text-delta" && data.delta) textContent += data.delta;
|
|
382
|
+
else if (data.type === "data-operation" && data.data?.type === "error") {
|
|
383
|
+
hasError = true;
|
|
384
|
+
errorMessage = data.data.message || "Unknown error occurred";
|
|
385
|
+
logger.warn({
|
|
386
|
+
errorMessage,
|
|
387
|
+
errorData: data.data
|
|
388
|
+
}, "Received error operation from chat API");
|
|
389
|
+
} else if (data.type === "error") {
|
|
390
|
+
hasError = true;
|
|
391
|
+
errorMessage = data.message || "Unknown error occurred";
|
|
392
|
+
logger.warn({
|
|
393
|
+
errorMessage,
|
|
394
|
+
errorData: data
|
|
395
|
+
}, "Received error event from chat API");
|
|
396
|
+
} else if (data.content) textContent += typeof data.content === "string" ? data.content : JSON.stringify(data.content);
|
|
397
|
+
} catch {}
|
|
398
|
+
if (hasError) return {
|
|
399
|
+
text: textContent.trim(),
|
|
400
|
+
error: errorMessage
|
|
401
|
+
};
|
|
402
|
+
return { text: textContent.trim() };
|
|
403
|
+
}
|
|
404
|
+
/**
|
|
356
405
|
* Run an evaluation job based on an evaluation job config
|
|
357
406
|
* Filters conversations based on jobFilters and runs evaluations with configured evaluators
|
|
358
407
|
*/
|
|
@@ -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/evals/workflow/routes.d.ts
|
|
5
|
-
declare const workflowRoutes: Hono<
|
|
5
|
+
declare const workflowRoutes: Hono<hono_types12.BlankEnv, hono_types12.BlankSchema, "/">;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { workflowRoutes };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { OpenAPIHono } from "@hono/zod-openapi";
|
|
2
|
-
import * as
|
|
2
|
+
import * as hono10 from "hono";
|
|
3
3
|
|
|
4
4
|
//#region src/domains/manage/routes/availableAgents.d.ts
|
|
5
|
-
declare const app: OpenAPIHono<
|
|
5
|
+
declare const app: OpenAPIHono<hono10.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 hono8 from "hono";
|
|
3
3
|
|
|
4
4
|
//#region src/domains/manage/routes/conversations.d.ts
|
|
5
|
-
declare const app: OpenAPIHono<
|
|
5
|
+
declare const app: OpenAPIHono<hono8.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 hono9 from "hono";
|
|
3
3
|
|
|
4
4
|
//#region src/domains/manage/routes/index.d.ts
|
|
5
|
-
declare const app: OpenAPIHono<
|
|
5
|
+
declare const app: OpenAPIHono<hono9.Env, {}, "/">;
|
|
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_types6 from "hono/types";
|
|
4
4
|
|
|
5
5
|
//#region src/domains/manage/routes/invitations.d.ts
|
|
6
6
|
declare const invitationsRoutes: Hono<{
|
|
7
7
|
Variables: ManageAppVariables;
|
|
8
|
-
},
|
|
8
|
+
}, hono_types6.BlankSchema, "/">;
|
|
9
9
|
//#endregion
|
|
10
10
|
export { invitationsRoutes as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Hono } from "hono";
|
|
2
|
-
import * as
|
|
2
|
+
import * as hono_types7 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_types7.BlankEnv, hono_types7.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_types5 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_types5.BlankSchema, "/">;
|
|
9
9
|
//#endregion
|
|
10
10
|
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_types9 from "hono/types";
|
|
4
4
|
|
|
5
5
|
//#region src/domains/manage/routes/userOrganizations.d.ts
|
|
6
6
|
declare const userOrganizationsRoutes: Hono<{
|
|
7
7
|
Variables: ManageAppVariables;
|
|
8
|
-
},
|
|
8
|
+
}, hono_types9.BlankSchema, "/">;
|
|
9
9
|
//#endregion
|
|
10
10
|
export { userOrganizationsRoutes as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Hono } from "hono";
|
|
2
|
-
import * as
|
|
2
|
+
import * as hono_types10 from "hono/types";
|
|
3
3
|
|
|
4
4
|
//#region src/domains/mcp/routes/mcp.d.ts
|
|
5
|
-
declare const app: Hono<
|
|
5
|
+
declare const app: Hono<hono_types10.BlankEnv, hono_types10.BlankSchema, "/">;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { app 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_core0 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_core0.Message | _inkeep_agents_core0.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_core0 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_core0.ContextBreakdown;
|
|
21
21
|
}
|
|
22
22
|
//#endregion
|
|
23
23
|
export { AssembleResult, type BreakdownComponentDef, type ContextBreakdown, calculateBreakdownTotal, createEmptyBreakdown, estimateTokens };
|
package/dist/factory.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import "./types/index.js";
|
|
|
3
3
|
import { createAgentsHono } from "./createApp.js";
|
|
4
4
|
import { createAuth0Provider, createOIDCProvider } from "./ssoHelpers.js";
|
|
5
5
|
import { CredentialStore, ServerConfig } from "@inkeep/agents-core";
|
|
6
|
-
import * as
|
|
6
|
+
import * as hono1 from "hono";
|
|
7
7
|
import * as zod0 from "zod";
|
|
8
8
|
import { SSOProviderConfig, UserAuthConfig } from "@inkeep/agents-core/auth";
|
|
9
9
|
import * as hono_types0 from "hono/types";
|
|
@@ -794,25 +794,25 @@ declare function createAgentsAuth(userAuthConfig?: UserAuthConfig): better_auth0
|
|
|
794
794
|
ac: better_auth_plugins0.AccessControl;
|
|
795
795
|
roles: {
|
|
796
796
|
member: {
|
|
797
|
-
authorize<K_1 extends "
|
|
798
|
-
actions: better_auth_plugins0.Subset<"
|
|
797
|
+
authorize<K_1 extends "organization" | "member" | "invitation" | "ac" | "project" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins0.Statements>[key] | {
|
|
798
|
+
actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins0.Statements>[key];
|
|
799
799
|
connector: "OR" | "AND";
|
|
800
800
|
} | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
|
|
801
|
-
statements: better_auth_plugins0.Subset<"
|
|
801
|
+
statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins0.Statements>;
|
|
802
802
|
};
|
|
803
803
|
admin: {
|
|
804
|
-
authorize<K_1 extends "
|
|
805
|
-
actions: better_auth_plugins0.Subset<"
|
|
804
|
+
authorize<K_1 extends "organization" | "member" | "invitation" | "ac" | "project" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins0.Statements>[key] | {
|
|
805
|
+
actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins0.Statements>[key];
|
|
806
806
|
connector: "OR" | "AND";
|
|
807
807
|
} | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
|
|
808
|
-
statements: better_auth_plugins0.Subset<"
|
|
808
|
+
statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins0.Statements>;
|
|
809
809
|
};
|
|
810
810
|
owner: {
|
|
811
|
-
authorize<K_1 extends "
|
|
812
|
-
actions: better_auth_plugins0.Subset<"
|
|
811
|
+
authorize<K_1 extends "organization" | "member" | "invitation" | "ac" | "project" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins0.Statements>[key] | {
|
|
812
|
+
actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins0.Statements>[key];
|
|
813
813
|
connector: "OR" | "AND";
|
|
814
814
|
} | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
|
|
815
|
-
statements: better_auth_plugins0.Subset<"
|
|
815
|
+
statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins0.Statements>;
|
|
816
816
|
};
|
|
817
817
|
};
|
|
818
818
|
creatorRole: "admin";
|
|
@@ -1104,25 +1104,25 @@ declare function createAgentsAuth(userAuthConfig?: UserAuthConfig): better_auth0
|
|
|
1104
1104
|
ac: better_auth_plugins0.AccessControl;
|
|
1105
1105
|
roles: {
|
|
1106
1106
|
member: {
|
|
1107
|
-
authorize<K_1 extends "
|
|
1108
|
-
actions: better_auth_plugins0.Subset<"
|
|
1107
|
+
authorize<K_1 extends "organization" | "member" | "invitation" | "ac" | "project" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins0.Statements>[key] | {
|
|
1108
|
+
actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins0.Statements>[key];
|
|
1109
1109
|
connector: "OR" | "AND";
|
|
1110
1110
|
} | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
|
|
1111
|
-
statements: better_auth_plugins0.Subset<"
|
|
1111
|
+
statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins0.Statements>;
|
|
1112
1112
|
};
|
|
1113
1113
|
admin: {
|
|
1114
|
-
authorize<K_1 extends "
|
|
1115
|
-
actions: better_auth_plugins0.Subset<"
|
|
1114
|
+
authorize<K_1 extends "organization" | "member" | "invitation" | "ac" | "project" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins0.Statements>[key] | {
|
|
1115
|
+
actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins0.Statements>[key];
|
|
1116
1116
|
connector: "OR" | "AND";
|
|
1117
1117
|
} | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
|
|
1118
|
-
statements: better_auth_plugins0.Subset<"
|
|
1118
|
+
statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins0.Statements>;
|
|
1119
1119
|
};
|
|
1120
1120
|
owner: {
|
|
1121
|
-
authorize<K_1 extends "
|
|
1122
|
-
actions: better_auth_plugins0.Subset<"
|
|
1121
|
+
authorize<K_1 extends "organization" | "member" | "invitation" | "ac" | "project" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins0.Statements>[key] | {
|
|
1122
|
+
actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins0.Statements>[key];
|
|
1123
1123
|
connector: "OR" | "AND";
|
|
1124
1124
|
} | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
|
|
1125
|
-
statements: better_auth_plugins0.Subset<"
|
|
1125
|
+
statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins0.Statements>;
|
|
1126
1126
|
};
|
|
1127
1127
|
};
|
|
1128
1128
|
creatorRole: "admin";
|
|
@@ -1536,6 +1536,6 @@ declare function createAgentsApp(config?: {
|
|
|
1536
1536
|
credentialStores?: CredentialStore[];
|
|
1537
1537
|
auth?: UserAuthConfig;
|
|
1538
1538
|
sandboxConfig?: SandboxConfig;
|
|
1539
|
-
}):
|
|
1539
|
+
}): hono1.Hono<hono_types0.BlankEnv, hono_types0.BlankSchema, "/">;
|
|
1540
1540
|
//#endregion
|
|
1541
1541
|
export { type SSOProviderConfig, type UserAuthConfig, createAgentsApp, createAgentsAuth, createAgentsHono, createAuth0Provider, createOIDCProvider };
|
package/dist/index.d.ts
CHANGED
|
@@ -795,25 +795,25 @@ declare const auth: better_auth78.Auth<{
|
|
|
795
795
|
ac: better_auth_plugins69.AccessControl;
|
|
796
796
|
roles: {
|
|
797
797
|
member: {
|
|
798
|
-
authorize<K_1 extends "
|
|
799
|
-
actions: better_auth_plugins69.Subset<"
|
|
798
|
+
authorize<K_1 extends "organization" | "member" | "invitation" | "ac" | "project" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins69.Statements>[key] | {
|
|
799
|
+
actions: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins69.Statements>[key];
|
|
800
800
|
connector: "OR" | "AND";
|
|
801
801
|
} | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins69.AuthorizeResponse;
|
|
802
|
-
statements: better_auth_plugins69.Subset<"
|
|
802
|
+
statements: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins69.Statements>;
|
|
803
803
|
};
|
|
804
804
|
admin: {
|
|
805
|
-
authorize<K_1 extends "
|
|
806
|
-
actions: better_auth_plugins69.Subset<"
|
|
805
|
+
authorize<K_1 extends "organization" | "member" | "invitation" | "ac" | "project" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins69.Statements>[key] | {
|
|
806
|
+
actions: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins69.Statements>[key];
|
|
807
807
|
connector: "OR" | "AND";
|
|
808
808
|
} | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins69.AuthorizeResponse;
|
|
809
|
-
statements: better_auth_plugins69.Subset<"
|
|
809
|
+
statements: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins69.Statements>;
|
|
810
810
|
};
|
|
811
811
|
owner: {
|
|
812
|
-
authorize<K_1 extends "
|
|
813
|
-
actions: better_auth_plugins69.Subset<"
|
|
812
|
+
authorize<K_1 extends "organization" | "member" | "invitation" | "ac" | "project" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins69.Statements>[key] | {
|
|
813
|
+
actions: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins69.Statements>[key];
|
|
814
814
|
connector: "OR" | "AND";
|
|
815
815
|
} | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins69.AuthorizeResponse;
|
|
816
|
-
statements: better_auth_plugins69.Subset<"
|
|
816
|
+
statements: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins69.Statements>;
|
|
817
817
|
};
|
|
818
818
|
};
|
|
819
819
|
creatorRole: "admin";
|
|
@@ -1105,25 +1105,25 @@ declare const auth: better_auth78.Auth<{
|
|
|
1105
1105
|
ac: better_auth_plugins69.AccessControl;
|
|
1106
1106
|
roles: {
|
|
1107
1107
|
member: {
|
|
1108
|
-
authorize<K_1 extends "
|
|
1109
|
-
actions: better_auth_plugins69.Subset<"
|
|
1108
|
+
authorize<K_1 extends "organization" | "member" | "invitation" | "ac" | "project" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins69.Statements>[key] | {
|
|
1109
|
+
actions: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins69.Statements>[key];
|
|
1110
1110
|
connector: "OR" | "AND";
|
|
1111
1111
|
} | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins69.AuthorizeResponse;
|
|
1112
|
-
statements: better_auth_plugins69.Subset<"
|
|
1112
|
+
statements: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins69.Statements>;
|
|
1113
1113
|
};
|
|
1114
1114
|
admin: {
|
|
1115
|
-
authorize<K_1 extends "
|
|
1116
|
-
actions: better_auth_plugins69.Subset<"
|
|
1115
|
+
authorize<K_1 extends "organization" | "member" | "invitation" | "ac" | "project" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins69.Statements>[key] | {
|
|
1116
|
+
actions: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins69.Statements>[key];
|
|
1117
1117
|
connector: "OR" | "AND";
|
|
1118
1118
|
} | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins69.AuthorizeResponse;
|
|
1119
|
-
statements: better_auth_plugins69.Subset<"
|
|
1119
|
+
statements: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins69.Statements>;
|
|
1120
1120
|
};
|
|
1121
1121
|
owner: {
|
|
1122
|
-
authorize<K_1 extends "
|
|
1123
|
-
actions: better_auth_plugins69.Subset<"
|
|
1122
|
+
authorize<K_1 extends "organization" | "member" | "invitation" | "ac" | "project" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins69.Statements>[key] | {
|
|
1123
|
+
actions: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins69.Statements>[key];
|
|
1124
1124
|
connector: "OR" | "AND";
|
|
1125
1125
|
} | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins69.AuthorizeResponse;
|
|
1126
|
-
statements: better_auth_plugins69.Subset<"
|
|
1126
|
+
statements: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins69.Statements>;
|
|
1127
1127
|
};
|
|
1128
1128
|
};
|
|
1129
1129
|
creatorRole: "admin";
|
|
@@ -32,10 +32,5 @@ declare const runCorsConfig: CorsOptions;
|
|
|
32
32
|
* CORS configuration for SigNoz proxy routes
|
|
33
33
|
*/
|
|
34
34
|
declare const signozCorsConfig: CorsOptions;
|
|
35
|
-
/**
|
|
36
|
-
* CORS configuration for work-apps routes (Slack, etc.)
|
|
37
|
-
* Needs to allow cross-origin requests with credentials for dashboard integration
|
|
38
|
-
*/
|
|
39
|
-
declare const workAppsCorsConfig: CorsOptions;
|
|
40
35
|
//#endregion
|
|
41
|
-
export { authCorsConfig, defaultCorsConfig, getBaseDomain, isOriginAllowed, playgroundCorsConfig, runCorsConfig, signozCorsConfig
|
|
36
|
+
export { authCorsConfig, defaultCorsConfig, getBaseDomain, isOriginAllowed, playgroundCorsConfig, runCorsConfig, signozCorsConfig };
|
package/dist/middleware/cors.js
CHANGED
|
@@ -126,32 +126,6 @@ const signozCorsConfig = {
|
|
|
126
126
|
maxAge: 600,
|
|
127
127
|
credentials: true
|
|
128
128
|
};
|
|
129
|
-
/**
|
|
130
|
-
* CORS configuration for work-apps routes (Slack, etc.)
|
|
131
|
-
* Needs to allow cross-origin requests with credentials for dashboard integration
|
|
132
|
-
*/
|
|
133
|
-
const workAppsCorsConfig = {
|
|
134
|
-
origin: originHandler,
|
|
135
|
-
allowHeaders: [
|
|
136
|
-
"content-type",
|
|
137
|
-
"Content-Type",
|
|
138
|
-
"authorization",
|
|
139
|
-
"Authorization",
|
|
140
|
-
"User-Agent",
|
|
141
|
-
"Cookie"
|
|
142
|
-
],
|
|
143
|
-
allowMethods: [
|
|
144
|
-
"GET",
|
|
145
|
-
"POST",
|
|
146
|
-
"PUT",
|
|
147
|
-
"DELETE",
|
|
148
|
-
"OPTIONS",
|
|
149
|
-
"PATCH"
|
|
150
|
-
],
|
|
151
|
-
exposeHeaders: ["Content-Length"],
|
|
152
|
-
maxAge: 600,
|
|
153
|
-
credentials: true
|
|
154
|
-
};
|
|
155
129
|
|
|
156
130
|
//#endregion
|
|
157
|
-
export { authCorsConfig, defaultCorsConfig, getBaseDomain, isOriginAllowed, playgroundCorsConfig, runCorsConfig, signozCorsConfig
|
|
131
|
+
export { authCorsConfig, defaultCorsConfig, getBaseDomain, isOriginAllowed, playgroundCorsConfig, runCorsConfig, signozCorsConfig };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseExecutionContext } from "@inkeep/agents-core";
|
|
2
|
-
import * as
|
|
2
|
+
import * as hono3 from "hono";
|
|
3
3
|
|
|
4
4
|
//#region src/middleware/evalsAuth.d.ts
|
|
5
5
|
|
|
@@ -7,7 +7,7 @@ import * as hono18 from "hono";
|
|
|
7
7
|
* Middleware to authenticate API requests using Bearer token authentication
|
|
8
8
|
* First checks if token matches INKEEP_AGENTS_EVAL_API_BYPASS_SECRET,
|
|
9
9
|
*/
|
|
10
|
-
declare const evalApiKeyAuth: () =>
|
|
10
|
+
declare const evalApiKeyAuth: () => hono3.MiddlewareHandler<{
|
|
11
11
|
Variables: {
|
|
12
12
|
executionContext: BaseExecutionContext;
|
|
13
13
|
};
|