@inkeep/agents-api 0.48.4 → 0.48.5

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.
Files changed (31) hide show
  1. package/dist/data/db/manageDbClient.d.ts +2 -2
  2. package/dist/data/db/runDbClient.d.ts +2 -2
  3. package/dist/domains/evals/routes/datasetTriggers.d.ts +2 -2
  4. package/dist/domains/evals/routes/index.d.ts +2 -2
  5. package/dist/domains/evals/workflow/routes.d.ts +2 -2
  6. package/dist/domains/manage/routes/availableAgents.d.ts +2 -2
  7. package/dist/domains/manage/routes/conversations.d.ts +2 -2
  8. package/dist/domains/manage/routes/index.d.ts +2 -2
  9. package/dist/domains/manage/routes/invitations.d.ts +2 -2
  10. package/dist/domains/manage/routes/mcp.d.ts +2 -2
  11. package/dist/domains/manage/routes/passwordResetLinks.d.ts +2 -2
  12. package/dist/domains/manage/routes/signoz.d.ts +2 -2
  13. package/dist/domains/manage/routes/signoz.js +130 -0
  14. package/dist/domains/manage/routes/users.d.ts +2 -2
  15. package/dist/domains/mcp/routes/mcp.d.ts +2 -2
  16. package/dist/domains/run/agents/relationTools.d.ts +2 -2
  17. package/dist/domains/run/tools/distill-conversation-history-tool.d.ts +1 -1
  18. package/dist/domains/run/types/chat.d.ts +4 -4
  19. package/dist/domains/run/utils/token-estimator.d.ts +2 -2
  20. package/dist/domains/run/workflow/steps/scheduledTriggerSteps.d.ts +5 -5
  21. package/dist/factory.d.ts +18 -18
  22. package/dist/index.d.ts +18 -18
  23. package/dist/middleware/evalsAuth.d.ts +2 -2
  24. package/dist/middleware/manageAuth.d.ts +2 -2
  25. package/dist/middleware/projectAccess.d.ts +2 -2
  26. package/dist/middleware/requirePermission.d.ts +2 -2
  27. package/dist/middleware/runAuth.d.ts +4 -4
  28. package/dist/middleware/sessionAuth.d.ts +3 -3
  29. package/dist/middleware/tenantAccess.d.ts +2 -2
  30. package/dist/middleware/tracing.d.ts +3 -3
  31. package/package.json +5 -7
@@ -1,6 +1,6 @@
1
- import * as _inkeep_agents_core0 from "@inkeep/agents-core";
1
+ import * as _inkeep_agents_core1 from "@inkeep/agents-core";
2
2
 
3
3
  //#region src/data/db/manageDbClient.d.ts
4
- declare const manageDbClient: _inkeep_agents_core0.AgentsManageDatabaseClient;
4
+ declare const manageDbClient: _inkeep_agents_core1.AgentsManageDatabaseClient;
5
5
  //#endregion
6
6
  export { manageDbClient as default };
@@ -1,6 +1,6 @@
1
- import * as _inkeep_agents_core0 from "@inkeep/agents-core";
1
+ import * as _inkeep_agents_core3 from "@inkeep/agents-core";
2
2
 
3
3
  //#region src/data/db/runDbClient.d.ts
4
- declare const runDbClient: _inkeep_agents_core0.AgentsRunDatabaseClient;
4
+ declare const runDbClient: _inkeep_agents_core3.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 hono6 from "hono";
2
+ import * as hono18 from "hono";
3
3
 
4
4
  //#region src/domains/evals/routes/datasetTriggers.d.ts
5
- declare const app: OpenAPIHono<hono6.Env, {}, "/">;
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 hono7 from "hono";
2
+ import * as hono15 from "hono";
3
3
 
4
4
  //#region src/domains/evals/routes/index.d.ts
5
- declare const app: OpenAPIHono<hono7.Env, {}, "/">;
5
+ declare const app: OpenAPIHono<hono15.Env, {}, "/">;
6
6
  //#endregion
7
7
  export { app as default };
@@ -1,7 +1,7 @@
1
1
  import { Hono } from "hono";
2
- import * as hono_types13 from "hono/types";
2
+ import * as hono_types11 from "hono/types";
3
3
 
4
4
  //#region src/domains/evals/workflow/routes.d.ts
5
- declare const workflowRoutes: Hono<hono_types13.BlankEnv, hono_types13.BlankSchema, "/">;
5
+ declare const workflowRoutes: Hono<hono_types11.BlankEnv, hono_types11.BlankSchema, "/">;
6
6
  //#endregion
7
7
  export { workflowRoutes };
@@ -1,7 +1,7 @@
1
1
  import { OpenAPIHono } from "@hono/zod-openapi";
2
- import * as hono16 from "hono";
2
+ import * as hono11 from "hono";
3
3
 
4
4
  //#region src/domains/manage/routes/availableAgents.d.ts
5
- declare const app: OpenAPIHono<hono16.Env, {}, "/">;
5
+ declare const app: OpenAPIHono<hono11.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 hono18 from "hono";
2
+ import * as hono8 from "hono";
3
3
 
4
4
  //#region src/domains/manage/routes/conversations.d.ts
5
- declare const app: OpenAPIHono<hono18.Env, {}, "/">;
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 hono5 from "hono";
2
+ import * as hono9 from "hono";
3
3
 
4
4
  //#region src/domains/manage/routes/index.d.ts
5
- declare const app: OpenAPIHono<hono5.Env, {}, "/">;
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 hono_types9 from "hono/types";
3
+ import * as hono_types5 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
- }, hono_types9.BlankSchema, "/">;
8
+ }, hono_types5.BlankSchema, "/">;
9
9
  //#endregion
10
10
  export { invitationsRoutes as default };
@@ -1,7 +1,7 @@
1
1
  import { Hono } from "hono";
2
- import * as hono_types11 from "hono/types";
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<hono_types11.BlankEnv, hono_types11.BlankSchema, "/">;
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 hono_types10 from "hono/types";
3
+ import * as hono_types9 from "hono/types";
4
4
 
5
5
  //#region src/domains/manage/routes/passwordResetLinks.d.ts
6
6
  declare const passwordResetLinksRoutes: Hono<{
7
7
  Variables: ManageAppVariables;
8
- }, hono_types10.BlankSchema, "/">;
8
+ }, hono_types9.BlankSchema, "/">;
9
9
  //#endregion
10
10
  export { passwordResetLinksRoutes as default };
@@ -1,10 +1,10 @@
1
1
  import { ManageAppVariables } from "../../../types/app.js";
2
2
  import { Hono } from "hono";
3
- import * as hono_types8 from "hono/types";
3
+ import * as hono_types6 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
- }, hono_types8.BlankSchema, "/">;
8
+ }, hono_types6.BlankSchema, "/">;
9
9
  //#endregion
10
10
  export { app as default };
@@ -100,6 +100,136 @@ app.post("/query", async (c) => {
100
100
  }, 500);
101
101
  }
102
102
  });
103
+ app.post("/query-batch", async (c) => {
104
+ const { paginationPayload, detailPayloadTemplate } = await c.req.json();
105
+ if (!paginationPayload || !detailPayloadTemplate) return c.json({
106
+ error: "Bad Request",
107
+ message: "paginationPayload and detailPayloadTemplate are required"
108
+ }, 400);
109
+ const requestedProjectId = paginationPayload.projectId;
110
+ const tenantId = c.get("tenantId");
111
+ const userId = c.get("userId");
112
+ const tenantRole = c.get("tenantRole");
113
+ if (!userId || !tenantId) throw createApiError({
114
+ code: "unauthorized",
115
+ message: "User or organization context not found",
116
+ instance: c.req.path
117
+ });
118
+ if (requestedProjectId) {
119
+ if (!(userId === "system" || userId?.startsWith("apikey:"))) {
120
+ if (!await canViewProject({
121
+ userId,
122
+ projectId: requestedProjectId,
123
+ orgRole: tenantRole
124
+ })) {
125
+ logger.warn({
126
+ tenantId,
127
+ projectId: requestedProjectId,
128
+ userId
129
+ }, "Project not found or access denied");
130
+ return c.json({
131
+ error: "Forbidden",
132
+ message: "You do not have access to this project"
133
+ }, 403);
134
+ }
135
+ }
136
+ }
137
+ const signozUrl = env.SIGNOZ_URL || env.PUBLIC_SIGNOZ_URL;
138
+ const signozApiKey = env.SIGNOZ_API_KEY;
139
+ if (!signozUrl || !signozApiKey) {
140
+ logger.error({}, "SigNoz not configured");
141
+ return c.json({
142
+ error: "Service Unavailable",
143
+ message: "SigNoz is not configured"
144
+ }, 500);
145
+ }
146
+ const signozEndpoint = `${signozUrl}/api/v4/query_range`;
147
+ const signozHeaders = {
148
+ "Content-Type": "application/json",
149
+ "SIGNOZ-API-KEY": signozApiKey
150
+ };
151
+ try {
152
+ const securedPagination = enforceSecurityFilters(paginationPayload, tenantId, requestedProjectId);
153
+ const step1 = await axios.post(signozEndpoint, securedPagination, {
154
+ headers: signozHeaders,
155
+ timeout: 3e4
156
+ });
157
+ const conversationIds = ((step1.data?.data?.result?.find((r) => r?.queryName === "pageConversations"))?.series ?? []).map((s) => s.labels?.["conversation.id"]).filter(Boolean);
158
+ if (conversationIds.length === 0) return c.json({
159
+ paginationResponse: step1.data,
160
+ detailResponse: null
161
+ });
162
+ const securedDetail = enforceSecurityFilters(injectConversationIdFilter(detailPayloadTemplate, conversationIds), tenantId, requestedProjectId);
163
+ const step2 = await axios.post(signozEndpoint, securedDetail, {
164
+ headers: signozHeaders,
165
+ timeout: 3e4
166
+ });
167
+ return c.json({
168
+ paginationResponse: step1.data,
169
+ detailResponse: step2.data
170
+ });
171
+ } catch (error) {
172
+ if (axios.isAxiosError(error)) {
173
+ if (error.code === "ECONNREFUSED" || error.code === "ENOTFOUND") {
174
+ logger.error({ error: error.message }, "SigNoz service unavailable");
175
+ return c.json({
176
+ error: "Service Unavailable",
177
+ message: "SigNoz service is unavailable"
178
+ }, 503);
179
+ }
180
+ if (error.response?.status === 401 || error.response?.status === 403) {
181
+ logger.error({ status: error.response.status }, "SigNoz authentication failed");
182
+ return c.json({
183
+ error: "Internal Server Error",
184
+ message: "SigNoz authentication failed"
185
+ }, 500);
186
+ }
187
+ if (error.response?.status === 400) {
188
+ logger.warn({ status: error.response.status }, "Invalid SigNoz query");
189
+ return c.json({
190
+ error: "Bad Request",
191
+ message: "Invalid query parameters"
192
+ }, 400);
193
+ }
194
+ }
195
+ logger.error({ error }, "SigNoz query-batch failed");
196
+ return c.json({
197
+ error: "Internal Server Error",
198
+ message: "Failed to query SigNoz"
199
+ }, 500);
200
+ }
201
+ });
202
+ /**
203
+ * Inject a `conversation.id IN [...]` filter into every builder query
204
+ * of a SigNoz composite query payload.
205
+ */
206
+ function injectConversationIdFilter(payload, conversationIds) {
207
+ const modified = JSON.parse(JSON.stringify(payload));
208
+ const builderQueries = modified.compositeQuery?.builderQueries;
209
+ if (!builderQueries) return modified;
210
+ const inFilter = {
211
+ key: {
212
+ key: "conversation.id",
213
+ dataType: "string",
214
+ type: "tag",
215
+ isColumn: false,
216
+ isJSON: false,
217
+ id: "false"
218
+ },
219
+ op: "in",
220
+ value: conversationIds
221
+ };
222
+ for (const queryKey in builderQueries) {
223
+ const query = builderQueries[queryKey];
224
+ if (!query.filters) query.filters = {
225
+ op: "AND",
226
+ items: []
227
+ };
228
+ query.filters.items = query.filters.items.filter((item) => !(item.key?.key === "conversation.id" && item.op === "in"));
229
+ query.filters.items.push(inFilter);
230
+ }
231
+ return modified;
232
+ }
103
233
  app.get("/health", async (c) => {
104
234
  const signozUrl = env.SIGNOZ_URL || env.PUBLIC_SIGNOZ_URL;
105
235
  const signozApiKey = env.SIGNOZ_API_KEY;
@@ -1,10 +1,10 @@
1
1
  import { ManageAppVariables } from "../../../types/app.js";
2
2
  import { Hono } from "hono";
3
- import * as hono_types5 from "hono/types";
3
+ import * as hono_types10 from "hono/types";
4
4
 
5
5
  //#region src/domains/manage/routes/users.d.ts
6
6
  declare const usersRoutes: Hono<{
7
7
  Variables: ManageAppVariables;
8
- }, hono_types5.BlankSchema, "/">;
8
+ }, hono_types10.BlankSchema, "/">;
9
9
  //#endregion
10
10
  export { usersRoutes as default };
@@ -1,7 +1,7 @@
1
1
  import { Hono } from "hono";
2
- import * as hono_types6 from "hono/types";
2
+ import * as hono_types13 from "hono/types";
3
3
 
4
4
  //#region src/domains/mcp/routes/mcp.d.ts
5
- declare const app: Hono<hono_types6.BlankEnv, hono_types6.BlankSchema, "/">;
5
+ declare const app: Hono<hono_types13.BlankEnv, hono_types13.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 _inkeep_agents_core1 from "@inkeep/agents-core";
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: _inkeep_agents_core1.Message | _inkeep_agents_core1.Task;
47
+ result: _inkeep_agents_core0.Message | _inkeep_agents_core0.Task;
48
48
  }>;
49
49
  /**
50
50
  * Parameters for building a transfer relation config
@@ -32,9 +32,9 @@ declare const ConversationHistorySummarySchema: z.ZodObject<{
32
32
  tool_call_id: z.ZodString;
33
33
  content_summary: z.ZodString;
34
34
  relevance: z.ZodEnum<{
35
+ low: "low";
35
36
  high: "high";
36
37
  medium: "medium";
37
- low: "low";
38
38
  }>;
39
39
  }, z.core.$strip>>>;
40
40
  conversation_flow: z.ZodObject<{
@@ -9,9 +9,9 @@ declare const ImageUrlSchema: z.ZodUnion<readonly [z.ZodURL, z.ZodString]>;
9
9
  /** OpenAI-specific image detail level. Has no effect on other providers. */
10
10
  declare const ImageDetailEnum: readonly ["auto", "low", "high"];
11
11
  declare const ImageDetailSchema: z.ZodEnum<{
12
- high: "high";
13
- low: "low";
14
12
  auto: "auto";
13
+ low: "low";
14
+ high: "high";
15
15
  }>;
16
16
  type ImageDetail = z.infer<typeof ImageDetailSchema>;
17
17
  declare const ImageContentItemSchema: z.ZodObject<{
@@ -19,9 +19,9 @@ declare const ImageContentItemSchema: z.ZodObject<{
19
19
  image_url: z.ZodObject<{
20
20
  url: z.ZodUnion<readonly [z.ZodURL, z.ZodString]>;
21
21
  detail: z.ZodOptional<z.ZodEnum<{
22
- high: "high";
23
- low: "low";
24
22
  auto: "auto";
23
+ low: "low";
24
+ high: "high";
25
25
  }>>;
26
26
  }, z.core.$strip>;
27
27
  }, z.core.$strip>;
@@ -1,4 +1,4 @@
1
- import * as _inkeep_agents_core3 from "@inkeep/agents-core";
1
+ import * as _inkeep_agents_core2 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: _inkeep_agents_core3.ContextBreakdown;
20
+ breakdown: _inkeep_agents_core2.ContextBreakdown;
21
21
  }
22
22
  //#endregion
23
23
  export { AssembleResult, type BreakdownComponentDef, type ContextBreakdown, calculateBreakdownTotal, createEmptyBreakdown, estimateTokens };
@@ -105,7 +105,7 @@ declare function createInvocationIdempotentStep(params: {
105
105
  projectId: string;
106
106
  tenantId: string;
107
107
  id: string;
108
- status: "pending" | "completed" | "failed" | "running" | "cancelled";
108
+ status: "pending" | "completed" | "running" | "failed" | "cancelled";
109
109
  resolvedPayload?: Record<string, unknown> | null | undefined;
110
110
  };
111
111
  alreadyExists: boolean;
@@ -145,7 +145,7 @@ declare function markRunningStep(params: {
145
145
  projectId: string;
146
146
  tenantId: string;
147
147
  id: string;
148
- status: "pending" | "completed" | "failed" | "running" | "cancelled";
148
+ status: "pending" | "completed" | "running" | "failed" | "cancelled";
149
149
  resolvedPayload?: Record<string, unknown> | null | undefined;
150
150
  }>;
151
151
  /**
@@ -172,7 +172,7 @@ declare function addConversationIdStep(params: {
172
172
  projectId: string;
173
173
  tenantId: string;
174
174
  id: string;
175
- status: "pending" | "completed" | "failed" | "running" | "cancelled";
175
+ status: "pending" | "completed" | "running" | "failed" | "cancelled";
176
176
  resolvedPayload?: Record<string, unknown> | null | undefined;
177
177
  } | undefined>;
178
178
  /**
@@ -197,7 +197,7 @@ declare function markCompletedStep(params: {
197
197
  projectId: string;
198
198
  tenantId: string;
199
199
  id: string;
200
- status: "pending" | "completed" | "failed" | "running" | "cancelled";
200
+ status: "pending" | "completed" | "running" | "failed" | "cancelled";
201
201
  resolvedPayload?: Record<string, unknown> | null | undefined;
202
202
  } | undefined>;
203
203
  /**
@@ -222,7 +222,7 @@ declare function markFailedStep(params: {
222
222
  projectId: string;
223
223
  tenantId: string;
224
224
  id: string;
225
- status: "pending" | "completed" | "failed" | "running" | "cancelled";
225
+ status: "pending" | "completed" | "running" | "failed" | "cancelled";
226
226
  resolvedPayload?: Record<string, unknown> | null | undefined;
227
227
  } | undefined>;
228
228
  /**
package/dist/factory.d.ts CHANGED
@@ -804,25 +804,25 @@ declare function createAgentsAuth(userAuthConfig?: UserAuthConfig): better_auth0
804
804
  ac: better_auth_plugins0.AccessControl;
805
805
  roles: {
806
806
  member: {
807
- authorize<K_1 extends "project" | "organization" | "member" | "invitation" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
808
- actions: better_auth_plugins0.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>[key];
807
+ authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
808
+ actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>[key];
809
809
  connector: "OR" | "AND";
810
810
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
811
- statements: better_auth_plugins0.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>;
811
+ statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>;
812
812
  };
813
813
  admin: {
814
- authorize<K_1 extends "project" | "organization" | "member" | "invitation" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
815
- actions: better_auth_plugins0.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>[key];
814
+ authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
815
+ actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>[key];
816
816
  connector: "OR" | "AND";
817
817
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
818
- statements: better_auth_plugins0.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>;
818
+ statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>;
819
819
  };
820
820
  owner: {
821
- authorize<K_1 extends "project" | "organization" | "member" | "invitation" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
822
- actions: better_auth_plugins0.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>[key];
821
+ authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
822
+ actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>[key];
823
823
  connector: "OR" | "AND";
824
824
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
825
- statements: better_auth_plugins0.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>;
825
+ statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>;
826
826
  };
827
827
  };
828
828
  creatorRole: "admin";
@@ -1127,25 +1127,25 @@ declare function createAgentsAuth(userAuthConfig?: UserAuthConfig): better_auth0
1127
1127
  ac: better_auth_plugins0.AccessControl;
1128
1128
  roles: {
1129
1129
  member: {
1130
- authorize<K_1 extends "project" | "organization" | "member" | "invitation" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
1131
- actions: better_auth_plugins0.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>[key];
1130
+ authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
1131
+ actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>[key];
1132
1132
  connector: "OR" | "AND";
1133
1133
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
1134
- statements: better_auth_plugins0.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>;
1134
+ statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>;
1135
1135
  };
1136
1136
  admin: {
1137
- authorize<K_1 extends "project" | "organization" | "member" | "invitation" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
1138
- actions: better_auth_plugins0.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>[key];
1137
+ authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
1138
+ actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>[key];
1139
1139
  connector: "OR" | "AND";
1140
1140
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
1141
- statements: better_auth_plugins0.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>;
1141
+ statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>;
1142
1142
  };
1143
1143
  owner: {
1144
- authorize<K_1 extends "project" | "organization" | "member" | "invitation" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
1145
- actions: better_auth_plugins0.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>[key];
1144
+ authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
1145
+ actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>[key];
1146
1146
  connector: "OR" | "AND";
1147
1147
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
1148
- statements: better_auth_plugins0.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>;
1148
+ statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>;
1149
1149
  };
1150
1150
  };
1151
1151
  creatorRole: "admin";
package/dist/index.d.ts CHANGED
@@ -805,25 +805,25 @@ declare const auth: better_auth79.Auth<{
805
805
  ac: better_auth_plugins69.AccessControl;
806
806
  roles: {
807
807
  member: {
808
- authorize<K_1 extends "project" | "organization" | "member" | "invitation" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins69.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins69.Statements>[key] | {
809
- actions: better_auth_plugins69.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins69.Statements>[key];
808
+ authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins69.Statements>[key] | {
809
+ actions: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins69.Statements>[key];
810
810
  connector: "OR" | "AND";
811
811
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins69.AuthorizeResponse;
812
- statements: better_auth_plugins69.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins69.Statements>;
812
+ statements: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins69.Statements>;
813
813
  };
814
814
  admin: {
815
- authorize<K_1 extends "project" | "organization" | "member" | "invitation" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins69.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins69.Statements>[key] | {
816
- actions: better_auth_plugins69.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins69.Statements>[key];
815
+ authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins69.Statements>[key] | {
816
+ actions: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins69.Statements>[key];
817
817
  connector: "OR" | "AND";
818
818
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins69.AuthorizeResponse;
819
- statements: better_auth_plugins69.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins69.Statements>;
819
+ statements: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins69.Statements>;
820
820
  };
821
821
  owner: {
822
- authorize<K_1 extends "project" | "organization" | "member" | "invitation" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins69.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins69.Statements>[key] | {
823
- actions: better_auth_plugins69.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins69.Statements>[key];
822
+ authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins69.Statements>[key] | {
823
+ actions: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins69.Statements>[key];
824
824
  connector: "OR" | "AND";
825
825
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins69.AuthorizeResponse;
826
- statements: better_auth_plugins69.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins69.Statements>;
826
+ statements: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins69.Statements>;
827
827
  };
828
828
  };
829
829
  creatorRole: "admin";
@@ -1128,25 +1128,25 @@ declare const auth: better_auth79.Auth<{
1128
1128
  ac: better_auth_plugins69.AccessControl;
1129
1129
  roles: {
1130
1130
  member: {
1131
- authorize<K_1 extends "project" | "organization" | "member" | "invitation" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins69.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins69.Statements>[key] | {
1132
- actions: better_auth_plugins69.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins69.Statements>[key];
1131
+ authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins69.Statements>[key] | {
1132
+ actions: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins69.Statements>[key];
1133
1133
  connector: "OR" | "AND";
1134
1134
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins69.AuthorizeResponse;
1135
- statements: better_auth_plugins69.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins69.Statements>;
1135
+ statements: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins69.Statements>;
1136
1136
  };
1137
1137
  admin: {
1138
- authorize<K_1 extends "project" | "organization" | "member" | "invitation" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins69.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins69.Statements>[key] | {
1139
- actions: better_auth_plugins69.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins69.Statements>[key];
1138
+ authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins69.Statements>[key] | {
1139
+ actions: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins69.Statements>[key];
1140
1140
  connector: "OR" | "AND";
1141
1141
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins69.AuthorizeResponse;
1142
- statements: better_auth_plugins69.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins69.Statements>;
1142
+ statements: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins69.Statements>;
1143
1143
  };
1144
1144
  owner: {
1145
- authorize<K_1 extends "project" | "organization" | "member" | "invitation" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins69.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins69.Statements>[key] | {
1146
- actions: better_auth_plugins69.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins69.Statements>[key];
1145
+ authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins69.Statements>[key] | {
1146
+ actions: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins69.Statements>[key];
1147
1147
  connector: "OR" | "AND";
1148
1148
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins69.AuthorizeResponse;
1149
- statements: better_auth_plugins69.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins69.Statements>;
1149
+ statements: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins69.Statements>;
1150
1150
  };
1151
1151
  };
1152
1152
  creatorRole: "admin";
@@ -1,5 +1,5 @@
1
1
  import { BaseExecutionContext } from "@inkeep/agents-core";
2
- import * as hono0 from "hono";
2
+ import * as hono16 from "hono";
3
3
 
4
4
  //#region src/middleware/evalsAuth.d.ts
5
5
 
@@ -7,7 +7,7 @@ import * as hono0 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: () => hono0.MiddlewareHandler<{
10
+ declare const evalApiKeyAuth: () => hono16.MiddlewareHandler<{
11
11
  Variables: {
12
12
  executionContext: BaseExecutionContext;
13
13
  };
@@ -1,5 +1,5 @@
1
1
  import { BaseExecutionContext } from "@inkeep/agents-core";
2
- import * as hono1 from "hono";
2
+ import * as hono0 from "hono";
3
3
  import { createAuth } from "@inkeep/agents-core/auth";
4
4
 
5
5
  //#region src/middleware/manageAuth.d.ts
@@ -12,7 +12,7 @@ import { createAuth } from "@inkeep/agents-core/auth";
12
12
  * 3. Database API key
13
13
  * 4. Internal service token
14
14
  */
15
- declare const manageApiKeyAuth: () => hono1.MiddlewareHandler<{
15
+ declare const manageApiKeyAuth: () => hono0.MiddlewareHandler<{
16
16
  Variables: {
17
17
  executionContext: BaseExecutionContext;
18
18
  userId?: string;
@@ -1,6 +1,6 @@
1
1
  import { ManageAppVariables } from "../types/app.js";
2
2
  import { ProjectPermissionLevel } from "@inkeep/agents-core";
3
- import * as hono2 from "hono";
3
+ import * as hono17 from "hono";
4
4
 
5
5
  //#region src/middleware/projectAccess.d.ts
6
6
  /**
@@ -10,6 +10,6 @@ declare const requireProjectPermission: <Env$1 extends {
10
10
  Variables: ManageAppVariables;
11
11
  } = {
12
12
  Variables: ManageAppVariables;
13
- }>(permission?: ProjectPermissionLevel) => hono2.MiddlewareHandler<Env$1, string, {}, Response>;
13
+ }>(permission?: ProjectPermissionLevel) => hono17.MiddlewareHandler<Env$1, string, {}, Response>;
14
14
  //#endregion
15
15
  export { requireProjectPermission };
@@ -1,5 +1,5 @@
1
1
  import { ManageAppVariables } from "../types/app.js";
2
- import * as hono17 from "hono";
2
+ import * as hono10 from "hono";
3
3
 
4
4
  //#region src/middleware/requirePermission.d.ts
5
5
  type Permission = {
@@ -9,6 +9,6 @@ declare const requirePermission: <Env$1 extends {
9
9
  Variables: ManageAppVariables;
10
10
  } = {
11
11
  Variables: ManageAppVariables;
12
- }>(permissions: Permission) => hono17.MiddlewareHandler<Env$1, string, {}, Response>;
12
+ }>(permissions: Permission) => hono10.MiddlewareHandler<Env$1, string, {}, Response>;
13
13
  //#endregion
14
14
  export { requirePermission };
@@ -1,8 +1,8 @@
1
1
  import { BaseExecutionContext } from "@inkeep/agents-core";
2
- import * as hono8 from "hono";
2
+ import * as hono5 from "hono";
3
3
 
4
4
  //#region src/middleware/runAuth.d.ts
5
- declare const runApiKeyAuth: () => hono8.MiddlewareHandler<{
5
+ declare const runApiKeyAuth: () => hono5.MiddlewareHandler<{
6
6
  Variables: {
7
7
  executionContext: BaseExecutionContext;
8
8
  };
@@ -11,7 +11,7 @@ declare const runApiKeyAuth: () => hono8.MiddlewareHandler<{
11
11
  * Creates a middleware that applies API key authentication except for specified route patterns
12
12
  * @param skipRouteCheck - Function that returns true if the route should skip authentication
13
13
  */
14
- declare const runApiKeyAuthExcept: (skipRouteCheck: (path: string) => boolean) => hono8.MiddlewareHandler<{
14
+ declare const runApiKeyAuthExcept: (skipRouteCheck: (path: string) => boolean) => hono5.MiddlewareHandler<{
15
15
  Variables: {
16
16
  executionContext: BaseExecutionContext;
17
17
  };
@@ -20,7 +20,7 @@ declare const runApiKeyAuthExcept: (skipRouteCheck: (path: string) => boolean) =
20
20
  * Helper middleware for endpoints that optionally support API key authentication
21
21
  * If no auth header is present, it continues without setting the executionContext
22
22
  */
23
- declare const runOptionalAuth: () => hono8.MiddlewareHandler<{
23
+ declare const runOptionalAuth: () => hono5.MiddlewareHandler<{
24
24
  Variables: {
25
25
  executionContext?: BaseExecutionContext;
26
26
  };
@@ -1,4 +1,4 @@
1
- import * as hono11 from "hono";
1
+ import * as hono1 from "hono";
2
2
 
3
3
  //#region src/middleware/sessionAuth.d.ts
4
4
 
@@ -7,11 +7,11 @@ import * as hono11 from "hono";
7
7
  * Requires that a user has already been authenticated via Better Auth session.
8
8
  * Used primarily for manage routes that require an active user session.
9
9
  */
10
- declare const sessionAuth: () => hono11.MiddlewareHandler<any, string, {}, Response>;
10
+ declare const sessionAuth: () => hono1.MiddlewareHandler<any, string, {}, Response>;
11
11
  /**
12
12
  * Global session middleware - sets user and session in context for all routes
13
13
  * Used for all routes that require an active user session.
14
14
  */
15
- declare const sessionContext: () => hono11.MiddlewareHandler<any, string, {}, Response>;
15
+ declare const sessionContext: () => hono1.MiddlewareHandler<any, string, {}, Response>;
16
16
  //#endregion
17
17
  export { sessionAuth, sessionContext };
@@ -1,4 +1,4 @@
1
- import * as hono13 from "hono";
1
+ import * as hono14 from "hono";
2
2
 
3
3
  //#region src/middleware/tenantAccess.d.ts
4
4
 
@@ -11,7 +11,7 @@ import * as hono13 from "hono";
11
11
  * - API key user: Access only to the tenant associated with the API key
12
12
  * - Session user: Access based on organization membership
13
13
  */
14
- declare const requireTenantAccess: () => hono13.MiddlewareHandler<{
14
+ declare const requireTenantAccess: () => hono14.MiddlewareHandler<{
15
15
  Variables: {
16
16
  userId: string;
17
17
  tenantId: string;
@@ -1,7 +1,7 @@
1
- import * as hono14 from "hono";
1
+ import * as hono12 from "hono";
2
2
 
3
3
  //#region src/middleware/tracing.d.ts
4
- declare const otelBaggageMiddleware: () => hono14.MiddlewareHandler<any, string, {}, Response>;
5
- declare const executionBaggageMiddleware: () => hono14.MiddlewareHandler<any, string, {}, Response>;
4
+ declare const otelBaggageMiddleware: () => hono12.MiddlewareHandler<any, string, {}, Response>;
5
+ declare const executionBaggageMiddleware: () => hono12.MiddlewareHandler<any, string, {}, Response>;
6
6
  //#endregion
7
7
  export { executionBaggageMiddleware, otelBaggageMiddleware };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inkeep/agents-api",
3
- "version": "0.48.4",
3
+ "version": "0.48.5",
4
4
  "description": "Unified Inkeep Agents API - combines management, runtime, and evaluation capabilities",
5
5
  "types": "dist/index.d.ts",
6
6
  "exports": {
@@ -67,10 +67,10 @@
67
67
  "openid-client": "^6.8.1",
68
68
  "pg": "^8.16.3",
69
69
  "workflow": "^4.1.0-beta.54",
70
- "@inkeep/agents-core": "^0.48.4",
71
- "@inkeep/agents-manage-mcp": "^0.48.4",
72
- "@inkeep/agents-mcp": "^0.48.4",
73
- "@inkeep/agents-work-apps": "^0.48.4"
70
+ "@inkeep/agents-core": "^0.48.5",
71
+ "@inkeep/agents-manage-mcp": "^0.48.5",
72
+ "@inkeep/agents-mcp": "^0.48.5",
73
+ "@inkeep/agents-work-apps": "^0.48.5"
74
74
  },
75
75
  "peerDependencies": {
76
76
  "@hono/zod-openapi": "^1.1.5",
@@ -78,8 +78,6 @@
78
78
  },
79
79
  "devDependencies": {
80
80
  "@hono/vite-dev-server": "^0.20.1",
81
- "@opentelemetry/exporter-trace-otlp-proto": "^0.203.0",
82
- "@opentelemetry/sdk-metrics": "^2.1.0",
83
81
  "@types/jmespath": "^0.15.2",
84
82
  "@types/node": "^20.11.24",
85
83
  "@types/pg": "^8.15.6",