@inkeep/agents-api 0.0.0-dev-20260122151225 → 0.0.0-dev-20260122182448

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.
@@ -11,20 +11,6 @@
11
11
  "stepId": "__builtin_response_text"
12
12
  }
13
13
  },
14
- "src/domains/evals/workflow/functions/runDatasetItem.ts": {
15
- "callChatApiStep": {
16
- "stepId": "step//src/domains/evals/workflow/functions/runDatasetItem.ts//callChatApiStep"
17
- },
18
- "createRelationStep": {
19
- "stepId": "step//src/domains/evals/workflow/functions/runDatasetItem.ts//createRelationStep"
20
- },
21
- "executeEvaluatorStep": {
22
- "stepId": "step//src/domains/evals/workflow/functions/runDatasetItem.ts//executeEvaluatorStep"
23
- },
24
- "logStep": {
25
- "stepId": "step//src/domains/evals/workflow/functions/runDatasetItem.ts//logStep"
26
- }
27
- },
28
14
  "src/domains/evals/workflow/functions/evaluateConversation.ts": {
29
15
  "executeEvaluatorStep": {
30
16
  "stepId": "step//src/domains/evals/workflow/functions/evaluateConversation.ts//executeEvaluatorStep"
@@ -38,18 +24,32 @@
38
24
  "logStep": {
39
25
  "stepId": "step//src/domains/evals/workflow/functions/evaluateConversation.ts//logStep"
40
26
  }
27
+ },
28
+ "src/domains/evals/workflow/functions/runDatasetItem.ts": {
29
+ "callChatApiStep": {
30
+ "stepId": "step//src/domains/evals/workflow/functions/runDatasetItem.ts//callChatApiStep"
31
+ },
32
+ "createRelationStep": {
33
+ "stepId": "step//src/domains/evals/workflow/functions/runDatasetItem.ts//createRelationStep"
34
+ },
35
+ "executeEvaluatorStep": {
36
+ "stepId": "step//src/domains/evals/workflow/functions/runDatasetItem.ts//executeEvaluatorStep"
37
+ },
38
+ "logStep": {
39
+ "stepId": "step//src/domains/evals/workflow/functions/runDatasetItem.ts//logStep"
40
+ }
41
41
  }
42
42
  },
43
43
  "workflows": {
44
- "src/domains/evals/workflow/functions/evaluateConversation.ts": {
45
- "_evaluateConversationWorkflow": {
46
- "workflowId": "workflow//src/domains/evals/workflow/functions/evaluateConversation.ts//_evaluateConversationWorkflow"
47
- }
48
- },
49
44
  "src/domains/evals/workflow/functions/runDatasetItem.ts": {
50
45
  "_runDatasetItemWorkflow": {
51
46
  "workflowId": "workflow//src/domains/evals/workflow/functions/runDatasetItem.ts//_runDatasetItemWorkflow"
52
47
  }
48
+ },
49
+ "src/domains/evals/workflow/functions/evaluateConversation.ts": {
50
+ "_evaluateConversationWorkflow": {
51
+ "workflowId": "workflow//src/domains/evals/workflow/functions/evaluateConversation.ts//_evaluateConversationWorkflow"
52
+ }
53
53
  }
54
54
  }
55
55
  }
@@ -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/datasetTriggers.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 { OpenAPIHono } from "@hono/zod-openapi";
2
- import * as hono18 from "hono";
2
+ import * as hono14 from "hono";
3
3
 
4
4
  //#region src/domains/evals/routes/index.d.ts
5
- declare const app: OpenAPIHono<hono18.Env, {}, "/">;
5
+ declare const app: OpenAPIHono<hono14.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 hono14 from "hono";
2
+ import * as hono16 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<hono16.Env, {}, "/">;
6
6
  //#endregion
7
7
  export { app as default };
@@ -1,7 +1,7 @@
1
1
  import { OpenAPIHono } from "@hono/zod-openapi";
2
- import * as hono16 from "hono";
2
+ import * as hono18 from "hono";
3
3
 
4
4
  //#region src/domains/manage/routes/evals/evaluationResults.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 hono15 from "hono";
2
+ import * as hono17 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<hono17.Env, {}, "/">;
6
6
  //#endregion
7
7
  export { app as default };
@@ -1,6 +1,6 @@
1
1
  import { getLogger as getLogger$1 } from "../../../logger.js";
2
2
  import { env } from "../../../env.js";
3
- import { enforceProjectFilter } from "../../../utils/signozHelpers.js";
3
+ import { enforceSecurityFilters } from "../../../utils/signozHelpers.js";
4
4
  import { Hono } from "hono";
5
5
  import { createApiError, projectExists } from "@inkeep/agents-core";
6
6
  import axios from "axios";
@@ -36,9 +36,12 @@ app.post("/query", async (c) => {
36
36
  message: "You do not have access to this project"
37
37
  }, 403);
38
38
  }
39
- payload = enforceProjectFilter(payload, requestedProjectId);
40
- logger.debug({ projectId: requestedProjectId }, "Project filter enforced");
41
39
  }
40
+ payload = enforceSecurityFilters(payload, tenantId, requestedProjectId);
41
+ logger.debug({
42
+ tenantId,
43
+ projectId: requestedProjectId
44
+ }, "Security filters enforced");
42
45
  const signozUrl = env.SIGNOZ_URL || env.PUBLIC_SIGNOZ_URL;
43
46
  const signozApiKey = env.SIGNOZ_API_KEY;
44
47
  if (!signozUrl || !signozApiKey) {
@@ -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 { ROOT_CONTEXT, SpanStatusCode, trace } from "@opentelemetry/api";
8
+ import { ROOT_CONTEXT, SpanStatusCode, propagation, trace } from "@opentelemetry/api";
9
9
  import Ajv from "ajv";
10
10
 
11
11
  //#region src/domains/run/services/TriggerService.ts
@@ -250,7 +250,10 @@ 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
- return trace.getTracer("trigger-service").startActiveSpan("trigger.execute_async", { attributes: {
253
+ const tracer = trace.getTracer("trigger-service");
254
+ const baggage = propagation.createBaggage().setEntry("tenant.id", { value: tenantId }).setEntry("project.id", { value: projectId }).setEntry("agent.id", { value: agentId }).setEntry("conversation.id", { value: conversationId });
255
+ const contextWithBaggage = propagation.setBaggage(ROOT_CONTEXT, baggage);
256
+ return tracer.startActiveSpan("trigger.execute_async", { attributes: {
254
257
  "tenant.id": tenantId,
255
258
  "project.id": projectId,
256
259
  "agent.id": agentId,
@@ -258,7 +261,7 @@ async function executeAgentAsync(params) {
258
261
  "trigger.invocation.id": invocationId,
259
262
  "conversation.id": conversationId,
260
263
  "invocation.type": "trigger"
261
- } }, ROOT_CONTEXT, async (span) => {
264
+ } }, contextWithBaggage, async (span) => {
262
265
  logger.info({
263
266
  tenantId,
264
267
  projectId,