@inkeep/agents-run-api 0.6.6 → 0.7.1
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 +11 -11
- package/dist/index.js +12 -12
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -6489,7 +6489,11 @@ var createTaskHandler = (config, credentialStoreRegistry) => {
|
|
|
6489
6489
|
});
|
|
6490
6490
|
if (relatedAgent) {
|
|
6491
6491
|
const relatedAgentRelations = await agentsCore.getRelatedAgentsForGraph(dbClient_default)({
|
|
6492
|
-
scopes: {
|
|
6492
|
+
scopes: {
|
|
6493
|
+
tenantId: config.tenantId,
|
|
6494
|
+
projectId: config.projectId,
|
|
6495
|
+
graphId: config.graphId
|
|
6496
|
+
},
|
|
6493
6497
|
agentId: relation.id
|
|
6494
6498
|
});
|
|
6495
6499
|
const enhancedDescription = generateDescriptionWithTransfers(
|
|
@@ -6508,6 +6512,11 @@ var createTaskHandler = (config, credentialStoreRegistry) => {
|
|
|
6508
6512
|
const agentPrompt = "prompt" in config.agentSchema ? config.agentSchema.prompt : "";
|
|
6509
6513
|
const models = "models" in config.agentSchema ? config.agentSchema.models : void 0;
|
|
6510
6514
|
const stopWhen = "stopWhen" in config.agentSchema ? config.agentSchema.stopWhen : void 0;
|
|
6515
|
+
const toolsForAgentResult = await Promise.all(
|
|
6516
|
+
toolsForAgent.data.map(
|
|
6517
|
+
async (item) => await agentsCore.dbResultToMcpTool(item.tool, dbClient_default, credentialStoreRegistry)
|
|
6518
|
+
)
|
|
6519
|
+
) ?? [];
|
|
6511
6520
|
const agent = new Agent(
|
|
6512
6521
|
{
|
|
6513
6522
|
id: config.agentId,
|
|
@@ -6580,16 +6589,7 @@ var createTaskHandler = (config, credentialStoreRegistry) => {
|
|
|
6580
6589
|
}
|
|
6581
6590
|
}))
|
|
6582
6591
|
],
|
|
6583
|
-
tools:
|
|
6584
|
-
(item) => ({
|
|
6585
|
-
...item.tool,
|
|
6586
|
-
capabilities: item.tool.capabilities || void 0,
|
|
6587
|
-
lastHealthCheck: item.tool.lastHealthCheck ? new Date(item.tool.lastHealthCheck) : void 0,
|
|
6588
|
-
lastToolsSync: item.tool.lastToolsSync ? new Date(item.tool.lastToolsSync) : void 0,
|
|
6589
|
-
createdAt: new Date(item.tool.createdAt),
|
|
6590
|
-
updatedAt: new Date(item.tool.updatedAt)
|
|
6591
|
-
})
|
|
6592
|
-
) ?? [],
|
|
6592
|
+
tools: toolsForAgentResult,
|
|
6593
6593
|
functionTools: [],
|
|
6594
6594
|
// All tools are now handled via MCP servers
|
|
6595
6595
|
dataComponents,
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defaultBatchProcessor } from './chunk-5RGAMXUL.js';
|
|
2
2
|
import { dbClient_default, getFormattedConversationHistory, env, createDefaultConversationHistoryConfig, saveA2AMessageResponse } from './chunk-HIGMADTA.js';
|
|
3
3
|
import { __publicField } from './chunk-PKBMQBKP.js';
|
|
4
|
-
import { getLogger, getTracer, HeadersScopeSchema, getRequestExecutionContext, createApiError, getAgentGraphWithDefaultAgent, contextValidationMiddleware, getFullGraph, createOrGetConversation, getActiveAgentForConversation, setActiveAgentForConversation, getAgentById, handleContextResolution, createMessage, commonGetErrorResponses, loggerFactory, createDefaultCredentialStores, CredentialStoreRegistry, listTaskIdsByContextId, getTask, getLedgerArtifacts, getAgentGraphById, createTask, updateTask, setSpanWithError, updateConversation, handleApiError, TaskState, setActiveAgentForThread, getConversation, getRelatedAgentsForGraph, getToolsForAgent, getDataComponentsForAgent, getArtifactComponentsForAgent, validateAndGetApiKey, getProject, ContextResolver, CredentialStuffer, MCPServerType, getCredentialReference, McpClient, getContextConfigById, getFullGraphDefinition, TemplateEngine, graphHasArtifactComponents, MCPTransportType, getExternalAgent } from '@inkeep/agents-core';
|
|
4
|
+
import { getLogger, getTracer, HeadersScopeSchema, getRequestExecutionContext, createApiError, getAgentGraphWithDefaultAgent, contextValidationMiddleware, getFullGraph, createOrGetConversation, getActiveAgentForConversation, setActiveAgentForConversation, getAgentById, handleContextResolution, createMessage, commonGetErrorResponses, loggerFactory, createDefaultCredentialStores, CredentialStoreRegistry, listTaskIdsByContextId, getTask, getLedgerArtifacts, 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';
|
|
5
5
|
import { otel } from '@hono/otel';
|
|
6
6
|
import { OpenAPIHono, createRoute, z as z$1 } from '@hono/zod-openapi';
|
|
7
7
|
import { trace, propagation, context, SpanStatusCode } from '@opentelemetry/api';
|
|
@@ -6158,7 +6158,11 @@ var createTaskHandler = (config, credentialStoreRegistry) => {
|
|
|
6158
6158
|
});
|
|
6159
6159
|
if (relatedAgent) {
|
|
6160
6160
|
const relatedAgentRelations = await getRelatedAgentsForGraph(dbClient_default)({
|
|
6161
|
-
scopes: {
|
|
6161
|
+
scopes: {
|
|
6162
|
+
tenantId: config.tenantId,
|
|
6163
|
+
projectId: config.projectId,
|
|
6164
|
+
graphId: config.graphId
|
|
6165
|
+
},
|
|
6162
6166
|
agentId: relation.id
|
|
6163
6167
|
});
|
|
6164
6168
|
const enhancedDescription = generateDescriptionWithTransfers(
|
|
@@ -6177,6 +6181,11 @@ var createTaskHandler = (config, credentialStoreRegistry) => {
|
|
|
6177
6181
|
const agentPrompt = "prompt" in config.agentSchema ? config.agentSchema.prompt : "";
|
|
6178
6182
|
const models = "models" in config.agentSchema ? config.agentSchema.models : void 0;
|
|
6179
6183
|
const stopWhen = "stopWhen" in config.agentSchema ? config.agentSchema.stopWhen : void 0;
|
|
6184
|
+
const toolsForAgentResult = await Promise.all(
|
|
6185
|
+
toolsForAgent.data.map(
|
|
6186
|
+
async (item) => await dbResultToMcpTool(item.tool, dbClient_default, credentialStoreRegistry)
|
|
6187
|
+
)
|
|
6188
|
+
) ?? [];
|
|
6180
6189
|
const agent = new Agent(
|
|
6181
6190
|
{
|
|
6182
6191
|
id: config.agentId,
|
|
@@ -6249,16 +6258,7 @@ var createTaskHandler = (config, credentialStoreRegistry) => {
|
|
|
6249
6258
|
}
|
|
6250
6259
|
}))
|
|
6251
6260
|
],
|
|
6252
|
-
tools:
|
|
6253
|
-
(item) => ({
|
|
6254
|
-
...item.tool,
|
|
6255
|
-
capabilities: item.tool.capabilities || void 0,
|
|
6256
|
-
lastHealthCheck: item.tool.lastHealthCheck ? new Date(item.tool.lastHealthCheck) : void 0,
|
|
6257
|
-
lastToolsSync: item.tool.lastToolsSync ? new Date(item.tool.lastToolsSync) : void 0,
|
|
6258
|
-
createdAt: new Date(item.tool.createdAt),
|
|
6259
|
-
updatedAt: new Date(item.tool.updatedAt)
|
|
6260
|
-
})
|
|
6261
|
-
) ?? [],
|
|
6261
|
+
tools: toolsForAgentResult,
|
|
6262
6262
|
functionTools: [],
|
|
6263
6263
|
// All tools are now handled via MCP servers
|
|
6264
6264
|
dataComponents,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inkeep/agents-run-api",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.1",
|
|
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",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"traverse": "^0.6.11",
|
|
53
53
|
"ts-pattern": "^5.7.1",
|
|
54
54
|
"zod": "^4.1.5",
|
|
55
|
-
"@inkeep/agents-core": "^0.
|
|
55
|
+
"@inkeep/agents-core": "^0.7.1"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@hono/vite-dev-server": "^0.20.1",
|