@inkeep/agents-api 0.0.0-dev-20260122093858 → 0.0.0-dev-20260122102020

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.
@@ -1,19 +1,5 @@
1
1
  {
2
2
  "steps": {
3
- "src/domains/evals/workflow/functions/evaluateConversation.ts": {
4
- "executeEvaluatorStep": {
5
- "stepId": "step//src/domains/evals/workflow/functions/evaluateConversation.ts//executeEvaluatorStep"
6
- },
7
- "getConversationStep": {
8
- "stepId": "step//src/domains/evals/workflow/functions/evaluateConversation.ts//getConversationStep"
9
- },
10
- "getEvaluatorsStep": {
11
- "stepId": "step//src/domains/evals/workflow/functions/evaluateConversation.ts//getEvaluatorsStep"
12
- },
13
- "logStep": {
14
- "stepId": "step//src/domains/evals/workflow/functions/evaluateConversation.ts//logStep"
15
- }
16
- },
17
3
  "src/domains/evals/workflow/functions/runDatasetItem.ts": {
18
4
  "callChatApiStep": {
19
5
  "stepId": "step//src/domains/evals/workflow/functions/runDatasetItem.ts//callChatApiStep"
@@ -28,6 +14,20 @@
28
14
  "stepId": "step//src/domains/evals/workflow/functions/runDatasetItem.ts//logStep"
29
15
  }
30
16
  },
17
+ "src/domains/evals/workflow/functions/evaluateConversation.ts": {
18
+ "executeEvaluatorStep": {
19
+ "stepId": "step//src/domains/evals/workflow/functions/evaluateConversation.ts//executeEvaluatorStep"
20
+ },
21
+ "getConversationStep": {
22
+ "stepId": "step//src/domains/evals/workflow/functions/evaluateConversation.ts//getConversationStep"
23
+ },
24
+ "getEvaluatorsStep": {
25
+ "stepId": "step//src/domains/evals/workflow/functions/evaluateConversation.ts//getEvaluatorsStep"
26
+ },
27
+ "logStep": {
28
+ "stepId": "step//src/domains/evals/workflow/functions/evaluateConversation.ts//logStep"
29
+ }
30
+ },
31
31
  "node_modules/.pnpm/workflow@4.0.1-beta.33_@aws-sdk+client-sts@3.970.0_@opentelemetry+api@1.9.0_@types+reac_5c488396978166b4f12e99cb3aa4a769/node_modules/workflow/dist/internal/builtins.js": {
32
32
  "__builtin_response_array_buffer": {
33
33
  "stepId": "__builtin_response_array_buffer"
@@ -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 hono_types7 from "hono/types";
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<hono_types7.BlankEnv, hono_types7.BlankSchema, "/">;
8
+ declare function createAgentsHono(config: AppConfig): Hono<hono_types0.BlankEnv, hono_types0.BlankSchema, "/">;
9
9
  //#endregion
10
10
  export { createAgentsHono, isWebhookRoute };
@@ -1,7 +1,7 @@
1
1
  import { OpenAPIHono } from "@hono/zod-openapi";
2
- import * as hono16 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<hono16.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 hono17 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<hono17.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_types5 from "hono/types";
2
+ import * as hono_types7 from "hono/types";
3
3
 
4
4
  //#region src/domains/evals/workflow/routes.d.ts
5
- declare const workflowRoutes: Hono<hono_types5.BlankEnv, hono_types5.BlankSchema, "/">;
5
+ declare const workflowRoutes: Hono<hono_types7.BlankEnv, hono_types7.BlankSchema, "/">;
6
6
  //#endregion
7
7
  export { workflowRoutes };
@@ -1,7 +1,7 @@
1
1
  import { OpenAPIHono } from "@hono/zod-openapi";
2
- import * as hono14 from "hono";
2
+ import * as hono6 from "hono";
3
3
 
4
4
  //#region src/domains/manage/routes/conversations.d.ts
5
- declare const app: OpenAPIHono<hono14.Env, {}, "/">;
5
+ declare const app: OpenAPIHono<hono6.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 hono17 from "hono";
3
3
 
4
4
  //#region src/domains/manage/routes/evals/evaluationResults.d.ts
5
- declare const app: OpenAPIHono<hono18.Env, {}, "/">;
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 hono15 from "hono";
2
+ import * as hono16 from "hono";
3
3
 
4
4
  //#region src/domains/manage/routes/index.d.ts
5
- declare const app: OpenAPIHono<hono15.Env, {}, "/">;
5
+ declare const app: OpenAPIHono<hono16.Env, {}, "/">;
6
6
  //#endregion
7
7
  export { app as default };
@@ -1,7 +1,7 @@
1
1
  import { Hono } from "hono";
2
- import * as hono_types3 from "hono/types";
2
+ import * as hono_types5 from "hono/types";
3
3
 
4
4
  //#region src/domains/manage/routes/mcp.d.ts
5
- declare const app: Hono<hono_types3.BlankEnv, hono_types3.BlankSchema, "/">;
5
+ declare const app: Hono<hono_types5.BlankEnv, hono_types5.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_core2 from "@inkeep/agents-core";
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: _inkeep_agents_core2.Message | _inkeep_agents_core2.Task;
47
+ result: _inkeep_agents_core1.Message | _inkeep_agents_core1.Task;
48
48
  }>;
49
49
  /**
50
50
  * Parameters for building a transfer relation config
@@ -5,7 +5,7 @@ import runDbClient_default from "../../../data/db/runDbClient.js";
5
5
  import { createSSEStreamHelper } from "../utils/stream-helpers.js";
6
6
  import { ExecutionHandler } from "../handlers/executionHandler.js";
7
7
  import { JsonTransformer, createMessage, createOrGetConversation, createTriggerInvocation, generateId, getConversationId, getFullProjectWithRelationIds, getTriggerById, interpolateTemplate, setActiveAgentForConversation, updateTriggerInvocationStatus, verifySigningSecret, verifyTriggerAuth, withRef } from "@inkeep/agents-core";
8
- import { trace } from "@opentelemetry/api";
8
+ import { SpanStatusCode, trace } from "@opentelemetry/api";
9
9
  import Ajv from "ajv";
10
10
 
11
11
  //#region src/domains/run/services/TriggerService.ts
@@ -250,98 +250,15 @@ async function dispatchExecution(params) {
250
250
  */
251
251
  async function executeAgentAsync(params) {
252
252
  const { tenantId, projectId, agentId, triggerId, invocationId, conversationId, userMessage, messageParts, resolvedRef } = params;
253
- logger.info({
254
- tenantId,
255
- projectId,
256
- agentId,
257
- triggerId,
258
- invocationId,
259
- conversationId
260
- }, "Starting async trigger execution");
261
- try {
262
- const project = await withRef(manageDbPool_default, resolvedRef, async (db) => {
263
- return await getFullProjectWithRelationIds(db)({ scopes: {
264
- tenantId,
265
- projectId
266
- } });
267
- });
268
- if (!project) throw new Error(`Project ${projectId} not found`);
269
- const agent = project.agents?.[agentId];
270
- if (!agent) throw new Error(`Agent ${agentId} not found in project`);
271
- const defaultSubAgentId = agent.defaultSubAgentId;
272
- if (!defaultSubAgentId) throw new Error(`Agent ${agentId} has no default sub-agent configured`);
273
- await createOrGetConversation(runDbClient_default)({
274
- id: conversationId,
275
- tenantId,
276
- projectId,
277
- agentId,
278
- activeSubAgentId: defaultSubAgentId,
279
- ref: resolvedRef
280
- });
281
- await setActiveAgentForConversation(runDbClient_default)({
282
- scopes: {
283
- tenantId,
284
- projectId
285
- },
286
- conversationId,
287
- subAgentId: defaultSubAgentId,
288
- agentId,
289
- ref: resolvedRef
290
- });
291
- await createMessage(runDbClient_default)({
292
- id: generateId(),
293
- tenantId,
294
- projectId,
295
- conversationId,
296
- role: "user",
297
- content: {
298
- text: userMessage,
299
- parts: messageParts
300
- },
301
- metadata: { a2a_metadata: {
302
- triggerId,
303
- invocationId
304
- } }
305
- });
306
- const executionContext = {
307
- tenantId,
308
- projectId,
309
- agentId,
310
- baseUrl: env.INKEEP_AGENTS_API_URL || "http://localhost:3002",
311
- apiKey: env.INKEEP_AGENTS_RUN_API_BYPASS_SECRET || "",
312
- apiKeyId: "trigger-invocation",
313
- resolvedRef,
314
- project,
315
- metadata: { initiatedBy: {
316
- type: "api_key",
317
- id: triggerId
318
- } }
319
- };
320
- const requestId = `trigger-${invocationId}`;
321
- const noOpStreamHelper = createSSEStreamHelper({
322
- writeSSE: async () => {},
323
- sleep: async () => {}
324
- }, requestId, Math.floor(Date.now() / 1e3));
325
- await new ExecutionHandler().execute({
326
- executionContext,
327
- conversationId,
328
- userMessage,
329
- messageParts,
330
- initialAgentId: agentId,
331
- requestId,
332
- sseHelper: noOpStreamHelper,
333
- emitOperations: false
334
- });
335
- await updateTriggerInvocationStatus(runDbClient_default)({
336
- scopes: {
337
- tenantId,
338
- projectId,
339
- agentId
340
- },
341
- triggerId,
342
- invocationId,
343
- data: { status: "success" }
344
- });
253
+ return trace.getTracer("trigger-service").startActiveSpan("trigger.execute_async", { attributes: {
254
+ "tenant.id": tenantId,
255
+ "project.id": projectId,
256
+ "agent.id": agentId,
257
+ "trigger.id": triggerId,
258
+ "trigger.invocation.id": invocationId,
259
+ "conversation.id": conversationId,
260
+ "invocation.type": "trigger"
261
+ } }, async (span) => {
345
262
  logger.info({
346
263
  tenantId,
347
264
  projectId,
@@ -349,20 +266,81 @@ async function executeAgentAsync(params) {
349
266
  triggerId,
350
267
  invocationId,
351
268
  conversationId
352
- }, "Async trigger execution completed successfully");
353
- } catch (error) {
354
- const errorMessage = error instanceof Error ? error.message : String(error);
355
- const errorStack = error instanceof Error ? error.stack : void 0;
356
- logger.error({
357
- err: errorMessage,
358
- errorStack,
359
- tenantId,
360
- projectId,
361
- agentId,
362
- triggerId,
363
- invocationId
364
- }, "Async trigger execution failed");
269
+ }, "Starting async trigger execution");
365
270
  try {
271
+ const project = await withRef(manageDbPool_default, resolvedRef, async (db) => {
272
+ return await getFullProjectWithRelationIds(db)({ scopes: {
273
+ tenantId,
274
+ projectId
275
+ } });
276
+ });
277
+ if (!project) throw new Error(`Project ${projectId} not found`);
278
+ const agent = project.agents?.[agentId];
279
+ if (!agent) throw new Error(`Agent ${agentId} not found in project`);
280
+ const defaultSubAgentId = agent.defaultSubAgentId;
281
+ if (!defaultSubAgentId) throw new Error(`Agent ${agentId} has no default sub-agent configured`);
282
+ await createOrGetConversation(runDbClient_default)({
283
+ id: conversationId,
284
+ tenantId,
285
+ projectId,
286
+ agentId,
287
+ activeSubAgentId: defaultSubAgentId,
288
+ ref: resolvedRef
289
+ });
290
+ await setActiveAgentForConversation(runDbClient_default)({
291
+ scopes: {
292
+ tenantId,
293
+ projectId
294
+ },
295
+ conversationId,
296
+ subAgentId: defaultSubAgentId,
297
+ agentId,
298
+ ref: resolvedRef
299
+ });
300
+ await createMessage(runDbClient_default)({
301
+ id: generateId(),
302
+ tenantId,
303
+ projectId,
304
+ conversationId,
305
+ role: "user",
306
+ content: {
307
+ text: userMessage,
308
+ parts: messageParts
309
+ },
310
+ metadata: { a2a_metadata: {
311
+ triggerId,
312
+ invocationId
313
+ } }
314
+ });
315
+ const executionContext = {
316
+ tenantId,
317
+ projectId,
318
+ agentId,
319
+ baseUrl: env.INKEEP_AGENTS_API_URL || "http://localhost:3002",
320
+ apiKey: env.INKEEP_AGENTS_RUN_API_BYPASS_SECRET || "",
321
+ apiKeyId: "trigger-invocation",
322
+ resolvedRef,
323
+ project,
324
+ metadata: { initiatedBy: {
325
+ type: "api_key",
326
+ id: triggerId
327
+ } }
328
+ };
329
+ const requestId = `trigger-${invocationId}`;
330
+ const noOpStreamHelper = createSSEStreamHelper({
331
+ writeSSE: async () => {},
332
+ sleep: async () => {}
333
+ }, requestId, Math.floor(Date.now() / 1e3));
334
+ await new ExecutionHandler().execute({
335
+ executionContext,
336
+ conversationId,
337
+ userMessage,
338
+ messageParts,
339
+ initialAgentId: agentId,
340
+ requestId,
341
+ sseHelper: noOpStreamHelper,
342
+ emitOperations: false
343
+ });
366
344
  await updateTriggerInvocationStatus(runDbClient_default)({
367
345
  scopes: {
368
346
  tenantId,
@@ -371,20 +349,60 @@ async function executeAgentAsync(params) {
371
349
  },
372
350
  triggerId,
373
351
  invocationId,
374
- data: {
375
- status: "failed",
376
- errorMessage
377
- }
352
+ data: { status: "success" }
353
+ });
354
+ span.setStatus({ code: SpanStatusCode.OK });
355
+ logger.info({
356
+ tenantId,
357
+ projectId,
358
+ agentId,
359
+ triggerId,
360
+ invocationId,
361
+ conversationId
362
+ }, "Async trigger execution completed successfully");
363
+ } catch (error) {
364
+ const errorMessage = error instanceof Error ? error.message : String(error);
365
+ const errorStack = error instanceof Error ? error.stack : void 0;
366
+ span.setStatus({
367
+ code: SpanStatusCode.ERROR,
368
+ message: errorMessage
378
369
  });
379
- } catch (updateError) {
380
- const updateErrorMessage = updateError instanceof Error ? updateError.message : String(updateError);
370
+ span.recordException(error instanceof Error ? error : new Error(errorMessage));
381
371
  logger.error({
382
- err: updateErrorMessage,
372
+ err: errorMessage,
373
+ errorStack,
374
+ tenantId,
375
+ projectId,
376
+ agentId,
377
+ triggerId,
383
378
  invocationId
384
- }, "Failed to update invocation status to failed");
379
+ }, "Async trigger execution failed");
380
+ try {
381
+ await updateTriggerInvocationStatus(runDbClient_default)({
382
+ scopes: {
383
+ tenantId,
384
+ projectId,
385
+ agentId
386
+ },
387
+ triggerId,
388
+ invocationId,
389
+ data: {
390
+ status: "failed",
391
+ errorMessage
392
+ }
393
+ });
394
+ } catch (updateError) {
395
+ const updateErrorMessage = updateError instanceof Error ? updateError.message : String(updateError);
396
+ logger.error({
397
+ err: updateErrorMessage,
398
+ invocationId
399
+ }, "Failed to update invocation status to failed");
400
+ }
401
+ throw error;
402
+ } finally {
403
+ span.end();
385
404
  }
386
- throw error;
387
- }
405
+ });
388
406
  }
389
407
 
390
408
  //#endregion
@@ -1,4 +1,4 @@
1
- import * as _inkeep_agents_core1 from "@inkeep/agents-core";
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: _inkeep_agents_core1.ContextBreakdown;
20
+ breakdown: _inkeep_agents_core3.ContextBreakdown;
21
21
  }
22
22
  //#endregion
23
23
  export { AssembleResult, type BreakdownComponentDef, type ContextBreakdown, calculateBreakdownTotal, createEmptyBreakdown, estimateTokens };
package/dist/factory.d.ts CHANGED
@@ -7,7 +7,7 @@ import * as hono0 from "hono";
7
7
  import { CredentialStore, ServerConfig } from "@inkeep/agents-core";
8
8
  import * as zod0 from "zod";
9
9
  import { SSOProviderConfig, UserAuthConfig } from "@inkeep/agents-core/auth";
10
- import * as hono_types0 from "hono/types";
10
+ import * as hono_types1 from "hono/types";
11
11
  import * as better_auth0 from "better-auth";
12
12
  import * as better_auth_plugins0 from "better-auth/plugins";
13
13
  import * as _better_auth_sso0 from "@better-auth/sso";
@@ -795,25 +795,25 @@ declare function createAgentsAuth(userAuthConfig?: UserAuthConfig): better_auth0
795
795
  ac: better_auth_plugins0.AccessControl;
796
796
  roles: {
797
797
  member: {
798
- authorize<K_1 extends "project" | "organization" | "invitation" | "member" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"project" | "organization" | "invitation" | "member" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
799
- actions: better_auth_plugins0.Subset<"project" | "organization" | "invitation" | "member" | "ac" | "team", better_auth_plugins0.Statements>[key];
798
+ authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "team" | "ac">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins0.Statements>[key] | {
799
+ actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins0.Statements>[key];
800
800
  connector: "OR" | "AND";
801
801
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
802
- statements: better_auth_plugins0.Subset<"project" | "organization" | "invitation" | "member" | "ac" | "team", better_auth_plugins0.Statements>;
802
+ statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins0.Statements>;
803
803
  };
804
804
  admin: {
805
- authorize<K_1 extends "project" | "organization" | "invitation" | "member" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"project" | "organization" | "invitation" | "member" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
806
- actions: better_auth_plugins0.Subset<"project" | "organization" | "invitation" | "member" | "ac" | "team", better_auth_plugins0.Statements>[key];
805
+ authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "team" | "ac">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins0.Statements>[key] | {
806
+ actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins0.Statements>[key];
807
807
  connector: "OR" | "AND";
808
808
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
809
- statements: better_auth_plugins0.Subset<"project" | "organization" | "invitation" | "member" | "ac" | "team", better_auth_plugins0.Statements>;
809
+ statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins0.Statements>;
810
810
  };
811
811
  owner: {
812
- authorize<K_1 extends "project" | "organization" | "invitation" | "member" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"project" | "organization" | "invitation" | "member" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
813
- actions: better_auth_plugins0.Subset<"project" | "organization" | "invitation" | "member" | "ac" | "team", better_auth_plugins0.Statements>[key];
812
+ authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "team" | "ac">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins0.Statements>[key] | {
813
+ actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins0.Statements>[key];
814
814
  connector: "OR" | "AND";
815
815
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
816
- statements: better_auth_plugins0.Subset<"project" | "organization" | "invitation" | "member" | "ac" | "team", better_auth_plugins0.Statements>;
816
+ statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins0.Statements>;
817
817
  };
818
818
  };
819
819
  membershipLimit: number;
@@ -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 "project" | "organization" | "invitation" | "member" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"project" | "organization" | "invitation" | "member" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
1108
- actions: better_auth_plugins0.Subset<"project" | "organization" | "invitation" | "member" | "ac" | "team", better_auth_plugins0.Statements>[key];
1107
+ authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "team" | "ac">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins0.Statements>[key] | {
1108
+ actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", 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<"project" | "organization" | "invitation" | "member" | "ac" | "team", better_auth_plugins0.Statements>;
1111
+ statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins0.Statements>;
1112
1112
  };
1113
1113
  admin: {
1114
- authorize<K_1 extends "project" | "organization" | "invitation" | "member" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"project" | "organization" | "invitation" | "member" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
1115
- actions: better_auth_plugins0.Subset<"project" | "organization" | "invitation" | "member" | "ac" | "team", better_auth_plugins0.Statements>[key];
1114
+ authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "team" | "ac">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins0.Statements>[key] | {
1115
+ actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", 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<"project" | "organization" | "invitation" | "member" | "ac" | "team", better_auth_plugins0.Statements>;
1118
+ statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins0.Statements>;
1119
1119
  };
1120
1120
  owner: {
1121
- authorize<K_1 extends "project" | "organization" | "invitation" | "member" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"project" | "organization" | "invitation" | "member" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
1122
- actions: better_auth_plugins0.Subset<"project" | "organization" | "invitation" | "member" | "ac" | "team", better_auth_plugins0.Statements>[key];
1121
+ authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "team" | "ac">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins0.Statements>[key] | {
1122
+ actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", 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<"project" | "organization" | "invitation" | "member" | "ac" | "team", better_auth_plugins0.Statements>;
1125
+ statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins0.Statements>;
1126
1126
  };
1127
1127
  };
1128
1128
  membershipLimit: number;
@@ -1536,6 +1536,6 @@ declare function createAgentsApp(config?: {
1536
1536
  auth?: UserAuthConfig;
1537
1537
  sandboxConfig?: SandboxConfig;
1538
1538
  skipInitialization?: boolean;
1539
- }): hono0.Hono<hono_types0.BlankEnv, hono_types0.BlankSchema, "/">;
1539
+ }): hono0.Hono<hono_types1.BlankEnv, hono_types1.BlankSchema, "/">;
1540
1540
  //#endregion
1541
1541
  export { type SSOProviderConfig, type UserAuthConfig, createAgentsApp, createAgentsAuth, createAgentsHono, createAuth0Provider, createOIDCProvider, initializeDefaultUser };
package/dist/index.d.ts CHANGED
@@ -8,7 +8,7 @@ import { createAuth0Provider, createOIDCProvider } from "./ssoHelpers.js";
8
8
  import { SSOProviderConfig, UserAuthConfig, createAgentsApp } from "./factory.js";
9
9
  import { Hono } from "hono";
10
10
  import * as zod205 from "zod";
11
- import * as hono_types1 from "hono/types";
11
+ import * as hono_types3 from "hono/types";
12
12
  import * as better_auth78 from "better-auth";
13
13
  import * as better_auth_plugins69 from "better-auth/plugins";
14
14
  import * as _better_auth_sso10 from "@better-auth/sso";
@@ -796,25 +796,25 @@ declare const auth: better_auth78.Auth<{
796
796
  ac: better_auth_plugins69.AccessControl;
797
797
  roles: {
798
798
  member: {
799
- authorize<K_1 extends "project" | "organization" | "invitation" | "member" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins69.Subset<"project" | "organization" | "invitation" | "member" | "ac" | "team", better_auth_plugins69.Statements>[key] | {
800
- actions: better_auth_plugins69.Subset<"project" | "organization" | "invitation" | "member" | "ac" | "team", better_auth_plugins69.Statements>[key];
799
+ authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "team" | "ac">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins69.Statements>[key] | {
800
+ actions: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins69.Statements>[key];
801
801
  connector: "OR" | "AND";
802
802
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins69.AuthorizeResponse;
803
- statements: better_auth_plugins69.Subset<"project" | "organization" | "invitation" | "member" | "ac" | "team", better_auth_plugins69.Statements>;
803
+ statements: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins69.Statements>;
804
804
  };
805
805
  admin: {
806
- authorize<K_1 extends "project" | "organization" | "invitation" | "member" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins69.Subset<"project" | "organization" | "invitation" | "member" | "ac" | "team", better_auth_plugins69.Statements>[key] | {
807
- actions: better_auth_plugins69.Subset<"project" | "organization" | "invitation" | "member" | "ac" | "team", better_auth_plugins69.Statements>[key];
806
+ authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "team" | "ac">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins69.Statements>[key] | {
807
+ actions: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins69.Statements>[key];
808
808
  connector: "OR" | "AND";
809
809
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins69.AuthorizeResponse;
810
- statements: better_auth_plugins69.Subset<"project" | "organization" | "invitation" | "member" | "ac" | "team", better_auth_plugins69.Statements>;
810
+ statements: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins69.Statements>;
811
811
  };
812
812
  owner: {
813
- authorize<K_1 extends "project" | "organization" | "invitation" | "member" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins69.Subset<"project" | "organization" | "invitation" | "member" | "ac" | "team", better_auth_plugins69.Statements>[key] | {
814
- actions: better_auth_plugins69.Subset<"project" | "organization" | "invitation" | "member" | "ac" | "team", better_auth_plugins69.Statements>[key];
813
+ authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "team" | "ac">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins69.Statements>[key] | {
814
+ actions: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins69.Statements>[key];
815
815
  connector: "OR" | "AND";
816
816
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins69.AuthorizeResponse;
817
- statements: better_auth_plugins69.Subset<"project" | "organization" | "invitation" | "member" | "ac" | "team", better_auth_plugins69.Statements>;
817
+ statements: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins69.Statements>;
818
818
  };
819
819
  };
820
820
  membershipLimit: number;
@@ -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 "project" | "organization" | "invitation" | "member" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins69.Subset<"project" | "organization" | "invitation" | "member" | "ac" | "team", better_auth_plugins69.Statements>[key] | {
1109
- actions: better_auth_plugins69.Subset<"project" | "organization" | "invitation" | "member" | "ac" | "team", better_auth_plugins69.Statements>[key];
1108
+ authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "team" | "ac">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins69.Statements>[key] | {
1109
+ actions: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", 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<"project" | "organization" | "invitation" | "member" | "ac" | "team", better_auth_plugins69.Statements>;
1112
+ statements: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins69.Statements>;
1113
1113
  };
1114
1114
  admin: {
1115
- authorize<K_1 extends "project" | "organization" | "invitation" | "member" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins69.Subset<"project" | "organization" | "invitation" | "member" | "ac" | "team", better_auth_plugins69.Statements>[key] | {
1116
- actions: better_auth_plugins69.Subset<"project" | "organization" | "invitation" | "member" | "ac" | "team", better_auth_plugins69.Statements>[key];
1115
+ authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "team" | "ac">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins69.Statements>[key] | {
1116
+ actions: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", 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<"project" | "organization" | "invitation" | "member" | "ac" | "team", better_auth_plugins69.Statements>;
1119
+ statements: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins69.Statements>;
1120
1120
  };
1121
1121
  owner: {
1122
- authorize<K_1 extends "project" | "organization" | "invitation" | "member" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins69.Subset<"project" | "organization" | "invitation" | "member" | "ac" | "team", better_auth_plugins69.Statements>[key] | {
1123
- actions: better_auth_plugins69.Subset<"project" | "organization" | "invitation" | "member" | "ac" | "team", better_auth_plugins69.Statements>[key];
1122
+ authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "team" | "ac">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins69.Statements>[key] | {
1123
+ actions: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", 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<"project" | "organization" | "invitation" | "member" | "ac" | "team", better_auth_plugins69.Statements>;
1126
+ statements: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins69.Statements>;
1127
1127
  };
1128
1128
  };
1129
1129
  membershipLimit: number;
@@ -1531,6 +1531,6 @@ declare const auth: better_auth78.Auth<{
1531
1531
  }>;
1532
1532
  }];
1533
1533
  }> | null;
1534
- declare const app: Hono<hono_types1.BlankEnv, hono_types1.BlankSchema, "/">;
1534
+ declare const app: Hono<hono_types3.BlankEnv, hono_types3.BlankSchema, "/">;
1535
1535
  //#endregion
1536
1536
  export { type AppConfig, type AppVariables, Hono, type NativeSandboxConfig, type SSOProviderConfig, type SandboxConfig, type UserAuthConfig, type VercelSandboxConfig, auth, createAgentsApp, createAgentsHono, createAuth0Provider, createOIDCProvider, app as default, initializeDefaultUser };
@@ -1,4 +1,4 @@
1
- import * as hono2 from "hono";
1
+ import * as hono1 from "hono";
2
2
  import { BaseExecutionContext } from "@inkeep/agents-core";
3
3
  import { createAuth } from "@inkeep/agents-core/auth";
4
4
 
@@ -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: () => hono2.MiddlewareHandler<{
15
+ declare const manageApiKeyAuth: () => hono1.MiddlewareHandler<{
16
16
  Variables: {
17
17
  executionContext: BaseExecutionContext;
18
18
  userId?: string;
@@ -1,5 +1,5 @@
1
1
  import { ManageAppVariables } from "../types/app.js";
2
- import * as hono6 from "hono";
2
+ import * as hono2 from "hono";
3
3
 
4
4
  //#region src/middleware/projectAccess.d.ts
5
5
 
@@ -26,6 +26,6 @@ declare const requireProjectPermission: <Env$1 extends {
26
26
  Variables: ManageAppVariables;
27
27
  } = {
28
28
  Variables: ManageAppVariables;
29
- }>(permission?: ProjectPermission) => hono6.MiddlewareHandler<Env$1, string, {}, Response>;
29
+ }>(permission?: ProjectPermission) => hono2.MiddlewareHandler<Env$1, string, {}, Response>;
30
30
  //#endregion
31
31
  export { ProjectPermission, requireProjectPermission };
@@ -1,11 +1,11 @@
1
- import * as hono9 from "hono";
1
+ import * as hono3 from "hono";
2
2
  import { BaseExecutionContext, ResolvedRef } from "@inkeep/agents-core";
3
3
 
4
4
  //#region src/middleware/projectConfig.d.ts
5
5
  /**
6
6
  * Middleware that fetches the full project definition from the Management API
7
7
  */
8
- declare const projectConfigMiddleware: hono9.MiddlewareHandler<{
8
+ declare const projectConfigMiddleware: hono3.MiddlewareHandler<{
9
9
  Variables: {
10
10
  executionContext: BaseExecutionContext;
11
11
  resolvedRef: ResolvedRef;
@@ -15,7 +15,7 @@ declare const projectConfigMiddleware: hono9.MiddlewareHandler<{
15
15
  * Creates a middleware that applies project config fetching except for specified route patterns
16
16
  * @param skipRouteCheck - Function that returns true if the route should skip the middleware
17
17
  */
18
- declare const projectConfigMiddlewareExcept: (skipRouteCheck: (path: string) => boolean) => hono9.MiddlewareHandler<{
18
+ declare const projectConfigMiddlewareExcept: (skipRouteCheck: (path: string) => boolean) => hono3.MiddlewareHandler<{
19
19
  Variables: {
20
20
  executionContext: BaseExecutionContext;
21
21
  resolvedRef: ResolvedRef;
@@ -1,5 +1,5 @@
1
1
  import { ManageAppVariables } from "../types/app.js";
2
- import * as hono1 from "hono";
2
+ import * as hono5 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) => hono1.MiddlewareHandler<Env$1, string, {}, Response>;
12
+ }>(permissions: Permission) => hono5.MiddlewareHandler<Env$1, string, {}, Response>;
13
13
  //#endregion
14
14
  export { requirePermission };
@@ -1,8 +1,8 @@
1
- import * as hono3 from "hono";
1
+ import * as hono7 from "hono";
2
2
  import { BaseExecutionContext } from "@inkeep/agents-core";
3
3
 
4
4
  //#region src/middleware/runAuth.d.ts
5
- declare const runApiKeyAuth: () => hono3.MiddlewareHandler<{
5
+ declare const runApiKeyAuth: () => hono7.MiddlewareHandler<{
6
6
  Variables: {
7
7
  executionContext: BaseExecutionContext;
8
8
  };
@@ -11,7 +11,7 @@ declare const runApiKeyAuth: () => hono3.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) => hono3.MiddlewareHandler<{
14
+ declare const runApiKeyAuthExcept: (skipRouteCheck: (path: string) => boolean) => hono7.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: () => hono3.MiddlewareHandler<{
23
+ declare const runOptionalAuth: () => hono7.MiddlewareHandler<{
24
24
  Variables: {
25
25
  executionContext?: BaseExecutionContext;
26
26
  };
@@ -1,4 +1,4 @@
1
- import * as hono7 from "hono";
1
+ import * as hono10 from "hono";
2
2
 
3
3
  //#region src/middleware/sessionAuth.d.ts
4
4
 
@@ -7,11 +7,11 @@ import * as hono7 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: () => hono7.MiddlewareHandler<any, string, {}, Response>;
10
+ declare const sessionAuth: () => hono10.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: () => hono7.MiddlewareHandler<any, string, {}, Response>;
15
+ declare const sessionContext: () => hono10.MiddlewareHandler<any, string, {}, Response>;
16
16
  //#endregion
17
17
  export { sessionAuth, sessionContext };
@@ -1,4 +1,4 @@
1
- import * as hono11 from "hono";
1
+ import * as hono12 from "hono";
2
2
 
3
3
  //#region src/middleware/tenantAccess.d.ts
4
4
 
@@ -11,7 +11,7 @@ import * as hono11 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: () => hono11.MiddlewareHandler<{
14
+ declare const requireTenantAccess: () => hono12.MiddlewareHandler<{
15
15
  Variables: {
16
16
  userId: string;
17
17
  tenantId: string;
@@ -1,7 +1,7 @@
1
- import * as hono12 from "hono";
1
+ import * as hono13 from "hono";
2
2
 
3
3
  //#region src/middleware/tracing.d.ts
4
- declare const otelBaggageMiddleware: () => hono12.MiddlewareHandler<any, string, {}, Response>;
5
- declare const executionBaggageMiddleware: () => hono12.MiddlewareHandler<any, string, {}, Response>;
4
+ declare const otelBaggageMiddleware: () => hono13.MiddlewareHandler<any, string, {}, Response>;
5
+ declare const executionBaggageMiddleware: () => hono13.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.0.0-dev-20260122093858",
3
+ "version": "0.0.0-dev-20260122102020",
4
4
  "description": "Unified Inkeep Agents API - combines management, runtime, and evaluation capabilities",
5
5
  "types": "dist/index.d.ts",
6
6
  "exports": {
@@ -71,8 +71,8 @@
71
71
  "openid-client": "^6.8.1",
72
72
  "pg": "^8.16.3",
73
73
  "workflow": "4.0.1-beta.33",
74
- "@inkeep/agents-core": "^0.0.0-dev-20260122093858",
75
- "@inkeep/agents-manage-mcp": "^0.0.0-dev-20260122093858"
74
+ "@inkeep/agents-core": "^0.0.0-dev-20260122102020",
75
+ "@inkeep/agents-manage-mcp": "^0.0.0-dev-20260122102020"
76
76
  },
77
77
  "peerDependencies": {
78
78
  "@hono/zod-openapi": "^1.1.5",