@inkeep/agents-run-api 0.24.0 → 0.24.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.
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { dbClient_default } from './chunk-IBMWBEXH.js';
|
|
2
|
-
import { createMessage,
|
|
2
|
+
import { createMessage, getConversationHistory } from '@inkeep/agents-core';
|
|
3
|
+
import { nanoid } from 'nanoid';
|
|
3
4
|
|
|
4
5
|
function createDefaultConversationHistoryConfig(mode = "full") {
|
|
5
6
|
return {
|
|
@@ -34,7 +35,7 @@ async function saveA2AMessageResponse(response, params) {
|
|
|
34
35
|
return null;
|
|
35
36
|
}
|
|
36
37
|
return await createMessage(dbClient_default)({
|
|
37
|
-
id:
|
|
38
|
+
id: nanoid(),
|
|
38
39
|
tenantId: params.tenantId,
|
|
39
40
|
projectId: params.projectId,
|
|
40
41
|
conversationId: params.conversationId,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { createDefaultConversationHistoryConfig, getConversationScopedArtifacts, getFormattedConversationHistory, getFullConversationContext, getScopedHistory, getUserFacingHistory, saveA2AMessageResponse } from './chunk-
|
|
1
|
+
export { createDefaultConversationHistoryConfig, getConversationScopedArtifacts, getFormattedConversationHistory, getFullConversationContext, getScopedHistory, getUserFacingHistory, saveA2AMessageResponse } from './chunk-T5AYIGCU.js';
|
package/dist/index.cjs
CHANGED
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var agentsCore = require('@inkeep/agents-core');
|
|
6
6
|
var z6 = require('zod');
|
|
7
|
+
var nanoid = require('nanoid');
|
|
7
8
|
var child_process = require('child_process');
|
|
8
9
|
var crypto = require('crypto');
|
|
9
10
|
var fs = require('fs');
|
|
@@ -191,7 +192,7 @@ async function saveA2AMessageResponse(response, params) {
|
|
|
191
192
|
return null;
|
|
192
193
|
}
|
|
193
194
|
return await agentsCore.createMessage(dbClient_default)({
|
|
194
|
-
id:
|
|
195
|
+
id: nanoid.nanoid(),
|
|
195
196
|
tenantId: params.tenantId,
|
|
196
197
|
projectId: params.projectId,
|
|
197
198
|
conversationId: params.conversationId,
|
|
@@ -1703,7 +1704,7 @@ async function handleMessageSend(c, agent, request) {
|
|
|
1703
1704
|
const executionContext = agentsCore.getRequestExecutionContext(c);
|
|
1704
1705
|
const { agentId } = executionContext;
|
|
1705
1706
|
const task = {
|
|
1706
|
-
id:
|
|
1707
|
+
id: nanoid.nanoid(),
|
|
1707
1708
|
input: {
|
|
1708
1709
|
parts: params.message.parts.map((part) => ({
|
|
1709
1710
|
kind: part.kind,
|
|
@@ -1796,7 +1797,7 @@ async function handleMessageSend(c, agent, request) {
|
|
|
1796
1797
|
const messageText = params.message.parts.filter((part) => part.kind === "text" && "text" in part && part.text).map((part) => part.text).join(" ");
|
|
1797
1798
|
try {
|
|
1798
1799
|
const messageData = {
|
|
1799
|
-
id:
|
|
1800
|
+
id: nanoid.nanoid(),
|
|
1800
1801
|
tenantId: agent.tenantId,
|
|
1801
1802
|
projectId: agent.projectId,
|
|
1802
1803
|
conversationId: effectiveContextId,
|
|
@@ -1878,7 +1879,7 @@ async function handleMessageSend(c, agent, request) {
|
|
|
1878
1879
|
},
|
|
1879
1880
|
artifacts: [
|
|
1880
1881
|
{
|
|
1881
|
-
artifactId:
|
|
1882
|
+
artifactId: nanoid.nanoid(),
|
|
1882
1883
|
parts: [
|
|
1883
1884
|
{
|
|
1884
1885
|
kind: "data",
|
|
@@ -1907,7 +1908,7 @@ async function handleMessageSend(c, agent, request) {
|
|
|
1907
1908
|
if (params.configuration?.blocking === false) {
|
|
1908
1909
|
const taskResponse = {
|
|
1909
1910
|
id: task.id,
|
|
1910
|
-
contextId: params.message.contextId ||
|
|
1911
|
+
contextId: params.message.contextId || nanoid.nanoid(),
|
|
1911
1912
|
status: taskStatus,
|
|
1912
1913
|
artifacts: result.artifacts,
|
|
1913
1914
|
kind: "task"
|
|
@@ -1919,7 +1920,7 @@ async function handleMessageSend(c, agent, request) {
|
|
|
1919
1920
|
});
|
|
1920
1921
|
}
|
|
1921
1922
|
const messageResponse = {
|
|
1922
|
-
messageId:
|
|
1923
|
+
messageId: nanoid.nanoid(),
|
|
1923
1924
|
parts: result.artifacts?.[0]?.parts || [
|
|
1924
1925
|
{
|
|
1925
1926
|
kind: "text",
|
|
@@ -1964,7 +1965,7 @@ async function handleMessageStream(c, agent, request) {
|
|
|
1964
1965
|
});
|
|
1965
1966
|
}
|
|
1966
1967
|
const task = {
|
|
1967
|
-
id:
|
|
1968
|
+
id: nanoid.nanoid(),
|
|
1968
1969
|
input: {
|
|
1969
1970
|
parts: params.message.parts.map((part) => ({
|
|
1970
1971
|
kind: part.kind,
|
|
@@ -1985,7 +1986,7 @@ async function handleMessageStream(c, agent, request) {
|
|
|
1985
1986
|
try {
|
|
1986
1987
|
const initialTask = {
|
|
1987
1988
|
id: task.id,
|
|
1988
|
-
contextId: params.message.contextId ||
|
|
1989
|
+
contextId: params.message.contextId || nanoid.nanoid(),
|
|
1989
1990
|
status: {
|
|
1990
1991
|
state: agentsCore.TaskState.Working,
|
|
1991
1992
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
@@ -2033,7 +2034,7 @@ async function handleMessageStream(c, agent, request) {
|
|
|
2033
2034
|
}
|
|
2034
2035
|
}
|
|
2035
2036
|
const messageResponse = {
|
|
2036
|
-
messageId:
|
|
2037
|
+
messageId: nanoid.nanoid(),
|
|
2037
2038
|
parts: result.artifacts?.[0]?.parts || [
|
|
2038
2039
|
{
|
|
2039
2040
|
kind: "text",
|
|
@@ -2099,14 +2100,14 @@ async function handleTasksGet(c, _agent, request) {
|
|
|
2099
2100
|
const params = request.params;
|
|
2100
2101
|
const task = {
|
|
2101
2102
|
id: params.id,
|
|
2102
|
-
contextId:
|
|
2103
|
+
contextId: nanoid.nanoid(),
|
|
2103
2104
|
status: {
|
|
2104
2105
|
state: agentsCore.TaskState.Completed,
|
|
2105
2106
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
2106
2107
|
},
|
|
2107
2108
|
artifacts: [
|
|
2108
2109
|
{
|
|
2109
|
-
artifactId:
|
|
2110
|
+
artifactId: nanoid.nanoid(),
|
|
2110
2111
|
parts: [
|
|
2111
2112
|
{
|
|
2112
2113
|
kind: "text",
|
|
@@ -2205,7 +2206,7 @@ async function handleTasksResubscribe(c, agent, request) {
|
|
|
2205
2206
|
try {
|
|
2206
2207
|
const task = {
|
|
2207
2208
|
id: params.taskId,
|
|
2208
|
-
contextId:
|
|
2209
|
+
contextId: nanoid.nanoid(),
|
|
2209
2210
|
status: {
|
|
2210
2211
|
state: agentsCore.TaskState.Completed,
|
|
2211
2212
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
@@ -2462,7 +2463,7 @@ var _ToolSessionManager = class _ToolSessionManager {
|
|
|
2462
2463
|
* Create a new tool session for an agent execution
|
|
2463
2464
|
*/
|
|
2464
2465
|
createSession(tenantId, projectId, contextId, taskId) {
|
|
2465
|
-
const sessionId =
|
|
2466
|
+
const sessionId = nanoid.nanoid();
|
|
2466
2467
|
return this.createSessionWithId(sessionId, tenantId, projectId, contextId, taskId);
|
|
2467
2468
|
}
|
|
2468
2469
|
/**
|
|
@@ -5561,7 +5562,7 @@ function errorOp(message, subAgentId, severity = "error", code) {
|
|
|
5561
5562
|
};
|
|
5562
5563
|
}
|
|
5563
5564
|
function generateToolId() {
|
|
5564
|
-
return `tool_${
|
|
5565
|
+
return `tool_${nanoid.nanoid(8)}`;
|
|
5565
5566
|
}
|
|
5566
5567
|
|
|
5567
5568
|
// src/utils/artifact-component-schema.ts
|
|
@@ -6671,7 +6672,7 @@ function createDelegateToAgentTool({
|
|
|
6671
6672
|
description: generateDelegateToolDescription(delegateConfig.config),
|
|
6672
6673
|
inputSchema: z6__default.default.object({ message: z6__default.default.string() }),
|
|
6673
6674
|
execute: async (input, context) => {
|
|
6674
|
-
const delegationId = `del_${
|
|
6675
|
+
const delegationId = `del_${nanoid.nanoid()}`;
|
|
6675
6676
|
const activeSpan = api.trace.getActiveSpan();
|
|
6676
6677
|
if (activeSpan) {
|
|
6677
6678
|
activeSpan.setAttributes({
|
|
@@ -6768,7 +6769,7 @@ function createDelegateToAgentTool({
|
|
|
6768
6769
|
const messageToSend = {
|
|
6769
6770
|
role: "agent",
|
|
6770
6771
|
parts: [{ text: input.message, kind: "text" }],
|
|
6771
|
-
messageId:
|
|
6772
|
+
messageId: nanoid.nanoid(),
|
|
6772
6773
|
kind: "message",
|
|
6773
6774
|
contextId,
|
|
6774
6775
|
metadata: {
|
|
@@ -6783,7 +6784,7 @@ function createDelegateToAgentTool({
|
|
|
6783
6784
|
};
|
|
6784
6785
|
logger14.info({ messageToSend }, "messageToSend");
|
|
6785
6786
|
await agentsCore.createMessage(dbClient_default)({
|
|
6786
|
-
id:
|
|
6787
|
+
id: nanoid.nanoid(),
|
|
6787
6788
|
tenantId,
|
|
6788
6789
|
projectId,
|
|
6789
6790
|
conversationId: contextId,
|
|
@@ -9998,7 +9999,7 @@ var createTaskHandler = (config, credentialStoreRegistry) => {
|
|
|
9998
9999
|
},
|
|
9999
10000
|
artifacts: [
|
|
10000
10001
|
{
|
|
10001
|
-
artifactId:
|
|
10002
|
+
artifactId: nanoid.nanoid(),
|
|
10002
10003
|
parts: [
|
|
10003
10004
|
{
|
|
10004
10005
|
kind: "data",
|
|
@@ -10031,7 +10032,7 @@ var createTaskHandler = (config, credentialStoreRegistry) => {
|
|
|
10031
10032
|
status: { state: agentsCore.TaskState.Completed },
|
|
10032
10033
|
artifacts: [
|
|
10033
10034
|
{
|
|
10034
|
-
artifactId:
|
|
10035
|
+
artifactId: nanoid.nanoid(),
|
|
10035
10036
|
parts
|
|
10036
10037
|
}
|
|
10037
10038
|
]
|
|
@@ -11374,7 +11375,7 @@ var ExecutionHandler = class {
|
|
|
11374
11375
|
"ai.subAgent.name": currentAgentId
|
|
11375
11376
|
});
|
|
11376
11377
|
await agentsCore.createMessage(dbClient_default)({
|
|
11377
|
-
id:
|
|
11378
|
+
id: nanoid.nanoid(),
|
|
11378
11379
|
tenantId,
|
|
11379
11380
|
projectId,
|
|
11380
11381
|
conversationId,
|
|
@@ -11764,7 +11765,7 @@ app2.openapi(chatCompletionsRoute, async (c) => {
|
|
|
11764
11765
|
});
|
|
11765
11766
|
}
|
|
11766
11767
|
await agentsCore.createMessage(dbClient_default)({
|
|
11767
|
-
id:
|
|
11768
|
+
id: nanoid.nanoid(),
|
|
11768
11769
|
tenantId,
|
|
11769
11770
|
projectId,
|
|
11770
11771
|
conversationId,
|
|
@@ -11997,7 +11998,7 @@ app3.openapi(chatDataStreamRoute, async (c) => {
|
|
|
11997
11998
|
});
|
|
11998
11999
|
}
|
|
11999
12000
|
await agentsCore.createMessage(dbClient_default)({
|
|
12000
|
-
id:
|
|
12001
|
+
id: nanoid.nanoid(),
|
|
12001
12002
|
tenantId,
|
|
12002
12003
|
projectId,
|
|
12003
12004
|
conversationId,
|
|
@@ -12453,7 +12454,7 @@ var processUserMessage = async (tenantId, projectId, conversationId, query) => {
|
|
|
12453
12454
|
});
|
|
12454
12455
|
}
|
|
12455
12456
|
await agentsCore.createMessage(dbClient_default)({
|
|
12456
|
-
id:
|
|
12457
|
+
id: nanoid.nanoid(),
|
|
12457
12458
|
tenantId,
|
|
12458
12459
|
projectId,
|
|
12459
12460
|
conversationId,
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { flushBatchProcessor } from './chunk-TVLDBLRZ.js';
|
|
2
|
-
import { getFormattedConversationHistory, createDefaultConversationHistoryConfig, saveA2AMessageResponse } from './chunk-
|
|
2
|
+
import { getFormattedConversationHistory, createDefaultConversationHistoryConfig, saveA2AMessageResponse } from './chunk-T5AYIGCU.js';
|
|
3
3
|
import { dbClient_default } from './chunk-IBMWBEXH.js';
|
|
4
4
|
import { env } from './chunk-LHCIBW34.js';
|
|
5
5
|
import { getLogger } from './chunk-A2S7GSHL.js';
|
|
6
6
|
import { __publicField } from './chunk-PKBMQBKP.js';
|
|
7
|
-
import { getTracer, HeadersScopeSchema, getRequestExecutionContext, createApiError, getAgentWithDefaultSubAgent, contextValidationMiddleware, getConversationId, getFullAgent, createOrGetConversation, getActiveAgentForConversation, setActiveAgentForConversation, getSubAgentById, handleContextResolution, createMessage,
|
|
7
|
+
import { getTracer, HeadersScopeSchema, getRequestExecutionContext, createApiError, getAgentWithDefaultSubAgent, contextValidationMiddleware, getConversationId, getFullAgent, createOrGetConversation, getActiveAgentForConversation, setActiveAgentForConversation, getSubAgentById, handleContextResolution, createMessage, commonGetErrorResponses, loggerFactory, getDataComponent, getProject, createDefaultCredentialStores, CredentialStoreRegistry, listTaskIdsByContextId, getTask, getLedgerArtifacts, upsertLedgerArtifact, createTask, updateTask, setSpanWithError, updateConversation, handleApiError, TaskState, setActiveAgentForThread, getConversation, getAgentById, getRelatedAgentsForAgent, getToolsForAgent, getDataComponentsForAgent, getArtifactComponentsForAgent, dbResultToMcpTool, validateAndGetApiKey, ContextResolver, CredentialStuffer, MCPServerType, getCredentialReference, McpClient, getFunctionToolsForSubAgent, getFunction, getContextConfigById, getFullAgentDefinition, TemplateEngine, agentHasArtifactComponents, MCPTransportType, SPAN_KEYS, 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';
|
|
@@ -16,6 +16,7 @@ import { createMiddleware } from 'hono/factory';
|
|
|
16
16
|
import { swaggerUI } from '@hono/swagger-ui';
|
|
17
17
|
import z5, { z } from 'zod';
|
|
18
18
|
import { streamSSE, stream } from 'hono/streaming';
|
|
19
|
+
import { nanoid } from 'nanoid';
|
|
19
20
|
import { createUIMessageStream, JsonToSseTransformStream, streamObject, parsePartialJson, generateObject, tool, streamText, generateText } from 'ai';
|
|
20
21
|
import { createAnthropic, anthropic } from '@ai-sdk/anthropic';
|
|
21
22
|
import { createGateway, gateway } from '@ai-sdk/gateway';
|
|
@@ -277,7 +278,7 @@ async function handleMessageSend(c, agent, request) {
|
|
|
277
278
|
const executionContext = getRequestExecutionContext(c);
|
|
278
279
|
const { agentId } = executionContext;
|
|
279
280
|
const task = {
|
|
280
|
-
id:
|
|
281
|
+
id: nanoid(),
|
|
281
282
|
input: {
|
|
282
283
|
parts: params.message.parts.map((part) => ({
|
|
283
284
|
kind: part.kind,
|
|
@@ -370,7 +371,7 @@ async function handleMessageSend(c, agent, request) {
|
|
|
370
371
|
const messageText = params.message.parts.filter((part) => part.kind === "text" && "text" in part && part.text).map((part) => part.text).join(" ");
|
|
371
372
|
try {
|
|
372
373
|
const messageData = {
|
|
373
|
-
id:
|
|
374
|
+
id: nanoid(),
|
|
374
375
|
tenantId: agent.tenantId,
|
|
375
376
|
projectId: agent.projectId,
|
|
376
377
|
conversationId: effectiveContextId,
|
|
@@ -452,7 +453,7 @@ async function handleMessageSend(c, agent, request) {
|
|
|
452
453
|
},
|
|
453
454
|
artifacts: [
|
|
454
455
|
{
|
|
455
|
-
artifactId:
|
|
456
|
+
artifactId: nanoid(),
|
|
456
457
|
parts: [
|
|
457
458
|
{
|
|
458
459
|
kind: "data",
|
|
@@ -481,7 +482,7 @@ async function handleMessageSend(c, agent, request) {
|
|
|
481
482
|
if (params.configuration?.blocking === false) {
|
|
482
483
|
const taskResponse = {
|
|
483
484
|
id: task.id,
|
|
484
|
-
contextId: params.message.contextId ||
|
|
485
|
+
contextId: params.message.contextId || nanoid(),
|
|
485
486
|
status: taskStatus,
|
|
486
487
|
artifacts: result.artifacts,
|
|
487
488
|
kind: "task"
|
|
@@ -493,7 +494,7 @@ async function handleMessageSend(c, agent, request) {
|
|
|
493
494
|
});
|
|
494
495
|
}
|
|
495
496
|
const messageResponse = {
|
|
496
|
-
messageId:
|
|
497
|
+
messageId: nanoid(),
|
|
497
498
|
parts: result.artifacts?.[0]?.parts || [
|
|
498
499
|
{
|
|
499
500
|
kind: "text",
|
|
@@ -538,7 +539,7 @@ async function handleMessageStream(c, agent, request) {
|
|
|
538
539
|
});
|
|
539
540
|
}
|
|
540
541
|
const task = {
|
|
541
|
-
id:
|
|
542
|
+
id: nanoid(),
|
|
542
543
|
input: {
|
|
543
544
|
parts: params.message.parts.map((part) => ({
|
|
544
545
|
kind: part.kind,
|
|
@@ -559,7 +560,7 @@ async function handleMessageStream(c, agent, request) {
|
|
|
559
560
|
try {
|
|
560
561
|
const initialTask = {
|
|
561
562
|
id: task.id,
|
|
562
|
-
contextId: params.message.contextId ||
|
|
563
|
+
contextId: params.message.contextId || nanoid(),
|
|
563
564
|
status: {
|
|
564
565
|
state: TaskState.Working,
|
|
565
566
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
@@ -607,7 +608,7 @@ async function handleMessageStream(c, agent, request) {
|
|
|
607
608
|
}
|
|
608
609
|
}
|
|
609
610
|
const messageResponse = {
|
|
610
|
-
messageId:
|
|
611
|
+
messageId: nanoid(),
|
|
611
612
|
parts: result.artifacts?.[0]?.parts || [
|
|
612
613
|
{
|
|
613
614
|
kind: "text",
|
|
@@ -673,14 +674,14 @@ async function handleTasksGet(c, _agent, request) {
|
|
|
673
674
|
const params = request.params;
|
|
674
675
|
const task = {
|
|
675
676
|
id: params.id,
|
|
676
|
-
contextId:
|
|
677
|
+
contextId: nanoid(),
|
|
677
678
|
status: {
|
|
678
679
|
state: TaskState.Completed,
|
|
679
680
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
680
681
|
},
|
|
681
682
|
artifacts: [
|
|
682
683
|
{
|
|
683
|
-
artifactId:
|
|
684
|
+
artifactId: nanoid(),
|
|
684
685
|
parts: [
|
|
685
686
|
{
|
|
686
687
|
kind: "text",
|
|
@@ -779,7 +780,7 @@ async function handleTasksResubscribe(c, agent, request) {
|
|
|
779
780
|
try {
|
|
780
781
|
const task = {
|
|
781
782
|
id: params.taskId,
|
|
782
|
-
contextId:
|
|
783
|
+
contextId: nanoid(),
|
|
783
784
|
status: {
|
|
784
785
|
state: TaskState.Completed,
|
|
785
786
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
@@ -1028,7 +1029,7 @@ var _ToolSessionManager = class _ToolSessionManager {
|
|
|
1028
1029
|
* Create a new tool session for an agent execution
|
|
1029
1030
|
*/
|
|
1030
1031
|
createSession(tenantId, projectId, contextId, taskId) {
|
|
1031
|
-
const sessionId =
|
|
1032
|
+
const sessionId = nanoid();
|
|
1032
1033
|
return this.createSessionWithId(sessionId, tenantId, projectId, contextId, taskId);
|
|
1033
1034
|
}
|
|
1034
1035
|
/**
|
|
@@ -4104,7 +4105,7 @@ function errorOp(message, subAgentId, severity = "error", code) {
|
|
|
4104
4105
|
};
|
|
4105
4106
|
}
|
|
4106
4107
|
function generateToolId() {
|
|
4107
|
-
return `tool_${
|
|
4108
|
+
return `tool_${nanoid(8)}`;
|
|
4108
4109
|
}
|
|
4109
4110
|
var logger11 = getLogger("DataComponentSchema");
|
|
4110
4111
|
function jsonSchemaToZod(jsonSchema) {
|
|
@@ -5201,7 +5202,7 @@ function createDelegateToAgentTool({
|
|
|
5201
5202
|
description: generateDelegateToolDescription(delegateConfig.config),
|
|
5202
5203
|
inputSchema: z5.object({ message: z5.string() }),
|
|
5203
5204
|
execute: async (input, context) => {
|
|
5204
|
-
const delegationId = `del_${
|
|
5205
|
+
const delegationId = `del_${nanoid()}`;
|
|
5205
5206
|
const activeSpan = trace.getActiveSpan();
|
|
5206
5207
|
if (activeSpan) {
|
|
5207
5208
|
activeSpan.setAttributes({
|
|
@@ -5298,7 +5299,7 @@ function createDelegateToAgentTool({
|
|
|
5298
5299
|
const messageToSend = {
|
|
5299
5300
|
role: "agent",
|
|
5300
5301
|
parts: [{ text: input.message, kind: "text" }],
|
|
5301
|
-
messageId:
|
|
5302
|
+
messageId: nanoid(),
|
|
5302
5303
|
kind: "message",
|
|
5303
5304
|
contextId,
|
|
5304
5305
|
metadata: {
|
|
@@ -5313,7 +5314,7 @@ function createDelegateToAgentTool({
|
|
|
5313
5314
|
};
|
|
5314
5315
|
logger13.info({ messageToSend }, "messageToSend");
|
|
5315
5316
|
await createMessage(dbClient_default)({
|
|
5316
|
-
id:
|
|
5317
|
+
id: nanoid(),
|
|
5317
5318
|
tenantId,
|
|
5318
5319
|
projectId,
|
|
5319
5320
|
conversationId: contextId,
|
|
@@ -7342,7 +7343,7 @@ var Agent = class {
|
|
|
7342
7343
|
inputSchema: tool3.inputSchema || tool3.parameters || {},
|
|
7343
7344
|
usageGuidelines: name.startsWith("transfer_to_") || name.startsWith("delegate_to_") ? `Use this tool to ${name.startsWith("transfer_to_") ? "transfer" : "delegate"} to another agent when appropriate.` : "Use this tool when appropriate for the task at hand."
|
|
7344
7345
|
}));
|
|
7345
|
-
const { getConversationScopedArtifacts } = await import('./conversations-
|
|
7346
|
+
const { getConversationScopedArtifacts } = await import('./conversations-6OGSD67W.js');
|
|
7346
7347
|
const historyConfig = this.config.conversationHistoryConfig ?? createDefaultConversationHistoryConfig();
|
|
7347
7348
|
const referenceArtifacts = await getConversationScopedArtifacts({
|
|
7348
7349
|
tenantId: this.config.tenantId,
|
|
@@ -8526,7 +8527,7 @@ var createTaskHandler = (config, credentialStoreRegistry) => {
|
|
|
8526
8527
|
},
|
|
8527
8528
|
artifacts: [
|
|
8528
8529
|
{
|
|
8529
|
-
artifactId:
|
|
8530
|
+
artifactId: nanoid(),
|
|
8530
8531
|
parts: [
|
|
8531
8532
|
{
|
|
8532
8533
|
kind: "data",
|
|
@@ -8559,7 +8560,7 @@ var createTaskHandler = (config, credentialStoreRegistry) => {
|
|
|
8559
8560
|
status: { state: TaskState.Completed },
|
|
8560
8561
|
artifacts: [
|
|
8561
8562
|
{
|
|
8562
|
-
artifactId:
|
|
8563
|
+
artifactId: nanoid(),
|
|
8563
8564
|
parts
|
|
8564
8565
|
}
|
|
8565
8566
|
]
|
|
@@ -9888,7 +9889,7 @@ var ExecutionHandler = class {
|
|
|
9888
9889
|
"ai.subAgent.name": currentAgentId
|
|
9889
9890
|
});
|
|
9890
9891
|
await createMessage(dbClient_default)({
|
|
9891
|
-
id:
|
|
9892
|
+
id: nanoid(),
|
|
9892
9893
|
tenantId,
|
|
9893
9894
|
projectId,
|
|
9894
9895
|
conversationId,
|
|
@@ -10277,7 +10278,7 @@ app2.openapi(chatCompletionsRoute, async (c) => {
|
|
|
10277
10278
|
});
|
|
10278
10279
|
}
|
|
10279
10280
|
await createMessage(dbClient_default)({
|
|
10280
|
-
id:
|
|
10281
|
+
id: nanoid(),
|
|
10281
10282
|
tenantId,
|
|
10282
10283
|
projectId,
|
|
10283
10284
|
conversationId,
|
|
@@ -10506,7 +10507,7 @@ app3.openapi(chatDataStreamRoute, async (c) => {
|
|
|
10506
10507
|
});
|
|
10507
10508
|
}
|
|
10508
10509
|
await createMessage(dbClient_default)({
|
|
10509
|
-
id:
|
|
10510
|
+
id: nanoid(),
|
|
10510
10511
|
tenantId,
|
|
10511
10512
|
projectId,
|
|
10512
10513
|
conversationId,
|
|
@@ -10956,7 +10957,7 @@ var processUserMessage = async (tenantId, projectId, conversationId, query) => {
|
|
|
10956
10957
|
});
|
|
10957
10958
|
}
|
|
10958
10959
|
await createMessage(dbClient_default)({
|
|
10959
|
-
id:
|
|
10960
|
+
id: nanoid(),
|
|
10960
10961
|
tenantId,
|
|
10961
10962
|
projectId,
|
|
10962
10963
|
conversationId,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inkeep/agents-run-api",
|
|
3
|
-
"version": "0.24.
|
|
3
|
+
"version": "0.24.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.11",
|
|
55
|
-
"@inkeep/agents-core": "^0.24.
|
|
55
|
+
"@inkeep/agents-core": "^0.24.1"
|
|
56
56
|
},
|
|
57
57
|
"optionalDependencies": {
|
|
58
58
|
"keytar": "^7.9.0"
|