@inkeep/agents-run-api 0.14.6 → 0.14.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -9892,7 +9892,7 @@ app2.openapi(chatCompletionsRoute, async (c) => {
9892
9892
  "Extracted chat parameters from API key context"
9893
9893
  );
9894
9894
  const body = c.get("requestBody") || {};
9895
- const conversationId = body.conversationId || nanoid.nanoid();
9895
+ const conversationId = body.conversationId || agentsCore.getConversationId();
9896
9896
  const fullGraph = await agentsCore.getFullGraph(dbClient_default)({
9897
9897
  scopes: { tenantId, projectId, graphId }
9898
9898
  });
@@ -10143,7 +10143,7 @@ app3.openapi(chatDataStreamRoute, async (c) => {
10143
10143
  const { tenantId, projectId, graphId } = executionContext;
10144
10144
  agentsCore.loggerFactory.getLogger("chatDataStream").debug({ tenantId, projectId, graphId }, "Extracted chatDataStream parameters");
10145
10145
  const body = c.get("requestBody") || {};
10146
- const conversationId = body.conversationId || nanoid.nanoid();
10146
+ const conversationId = body.conversationId || agentsCore.getConversationId();
10147
10147
  const activeSpan = api.trace.getActiveSpan();
10148
10148
  if (activeSpan) {
10149
10149
  activeSpan.setAttributes({
@@ -10597,7 +10597,7 @@ var validateRequestParameters = (c) => {
10597
10597
  var handleInitializationRequest = async (body, executionContext, validatedContext, req, res, c, credentialStores) => {
10598
10598
  const { tenantId, projectId, graphId } = executionContext;
10599
10599
  logger24.info({ body }, "Received initialization request");
10600
- const sessionId = nanoid.nanoid();
10600
+ const sessionId = agentsCore.getConversationId();
10601
10601
  const agentGraph = await agentsCore.getAgentGraphWithDefaultAgent(dbClient_default)({
10602
10602
  scopes: { tenantId, projectId, graphId }
10603
10603
  });
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@ import { getFormattedConversationHistory, createDefaultConversationHistoryConfig
4
4
  import { dbClient_default } from './chunk-7IMXW4RD.js';
5
5
  import { env } from './chunk-NZHNG4A3.js';
6
6
  import { __publicField } from './chunk-PKBMQBKP.js';
7
- import { getLogger as getLogger$1, getTracer, HeadersScopeSchema, getRequestExecutionContext, createApiError, getAgentGraphWithDefaultAgent, contextValidationMiddleware, getFullGraph, createOrGetConversation, getActiveAgentForConversation, setActiveAgentForConversation, getAgentById, handleContextResolution, createMessage, commonGetErrorResponses, loggerFactory, createDefaultCredentialStores, CredentialStoreRegistry, listTaskIdsByContextId, getTask, getLedgerArtifacts, upsertLedgerArtifact, getAgentGraphById, createTask, updateTask, setSpanWithError, updateConversation, handleApiError, TaskState, setActiveAgentForThread, getConversation, getRelatedAgentsForGraph, getToolsForAgent, getDataComponentsForAgent, getArtifactComponentsForAgent, dbResultToMcpTool, validateAndGetApiKey, getProject, ContextResolver, CredentialStuffer, MCPServerType, getCredentialReference, McpClient, getContextConfigById, getFullGraphDefinition, TemplateEngine, graphHasArtifactComponents, MCPTransportType, getExternalAgent } from '@inkeep/agents-core';
7
+ import { getLogger as getLogger$1, getTracer, HeadersScopeSchema, getRequestExecutionContext, createApiError, getAgentGraphWithDefaultAgent, contextValidationMiddleware, getConversationId, getFullGraph, createOrGetConversation, getActiveAgentForConversation, setActiveAgentForConversation, getAgentById, handleContextResolution, createMessage, commonGetErrorResponses, loggerFactory, createDefaultCredentialStores, CredentialStoreRegistry, listTaskIdsByContextId, getTask, getLedgerArtifacts, upsertLedgerArtifact, getAgentGraphById, createTask, updateTask, setSpanWithError, updateConversation, handleApiError, TaskState, setActiveAgentForThread, getConversation, getRelatedAgentsForGraph, getToolsForAgent, getDataComponentsForAgent, getArtifactComponentsForAgent, dbResultToMcpTool, validateAndGetApiKey, getProject, ContextResolver, CredentialStuffer, MCPServerType, getCredentialReference, McpClient, getContextConfigById, getFullGraphDefinition, TemplateEngine, graphHasArtifactComponents, MCPTransportType, getExternalAgent } from '@inkeep/agents-core';
8
8
  import { otel } from '@hono/otel';
9
9
  import { OpenAPIHono, createRoute, z as z$1 } from '@hono/zod-openapi';
10
10
  import { trace, propagation, context, SpanStatusCode } from '@opentelemetry/api';
@@ -9384,7 +9384,7 @@ app2.openapi(chatCompletionsRoute, async (c) => {
9384
9384
  "Extracted chat parameters from API key context"
9385
9385
  );
9386
9386
  const body = c.get("requestBody") || {};
9387
- const conversationId = body.conversationId || nanoid();
9387
+ const conversationId = body.conversationId || getConversationId();
9388
9388
  const fullGraph = await getFullGraph(dbClient_default)({
9389
9389
  scopes: { tenantId, projectId, graphId }
9390
9390
  });
@@ -9631,7 +9631,7 @@ app3.openapi(chatDataStreamRoute, async (c) => {
9631
9631
  const { tenantId, projectId, graphId } = executionContext;
9632
9632
  loggerFactory.getLogger("chatDataStream").debug({ tenantId, projectId, graphId }, "Extracted chatDataStream parameters");
9633
9633
  const body = c.get("requestBody") || {};
9634
- const conversationId = body.conversationId || nanoid();
9634
+ const conversationId = body.conversationId || getConversationId();
9635
9635
  const activeSpan = trace.getActiveSpan();
9636
9636
  if (activeSpan) {
9637
9637
  activeSpan.setAttributes({
@@ -10081,7 +10081,7 @@ var validateRequestParameters = (c) => {
10081
10081
  var handleInitializationRequest = async (body, executionContext, validatedContext, req, res, c, credentialStores) => {
10082
10082
  const { tenantId, projectId, graphId } = executionContext;
10083
10083
  logger23.info({ body }, "Received initialization request");
10084
- const sessionId = nanoid();
10084
+ const sessionId = getConversationId();
10085
10085
  const agentGraph = await getAgentGraphWithDefaultAgent(dbClient_default)({
10086
10086
  scopes: { tenantId, projectId, graphId }
10087
10087
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inkeep/agents-run-api",
3
- "version": "0.14.6",
3
+ "version": "0.14.7",
4
4
  "description": "Agents Run API for Inkeep Agent Framework - handles chat, agent execution, and streaming",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -51,7 +51,7 @@
51
51
  "traverse": "^0.6.11",
52
52
  "ts-pattern": "^5.7.1",
53
53
  "zod": "^4.1.11",
54
- "@inkeep/agents-core": "^0.14.6"
54
+ "@inkeep/agents-core": "^0.14.7"
55
55
  },
56
56
  "optionalDependencies": {
57
57
  "keytar": "^7.9.0"