@inkeep/agents-core 0.0.0-dev-20251104211850 → 0.0.0-dev-20251105001429
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/{chunk-5EDDDVYT.js → chunk-6OGGGVEI.js} +4 -4
- package/dist/{chunk-QWXWHPCK.js → chunk-AGEFXY7F.js} +1 -4
- package/dist/client-exports.cjs +1 -4
- package/dist/client-exports.js +1 -1
- package/dist/index.cjs +18 -16
- package/dist/index.js +17 -12
- package/dist/validation/index.cjs +4 -4
- package/dist/validation/index.js +1 -1
- package/package.json +1 -1
|
@@ -17,7 +17,9 @@ function detectDelegationCycles(agentData) {
|
|
|
17
17
|
if (dfs(neighbor)) return true;
|
|
18
18
|
} else if (stack.has(neighbor)) {
|
|
19
19
|
const cycleStart = path.indexOf(neighbor);
|
|
20
|
-
cycles.push(
|
|
20
|
+
cycles.push(
|
|
21
|
+
`Circular delegation detected: ${[...path.slice(cycleStart), neighbor].join(" \u2192 ")}`
|
|
22
|
+
);
|
|
21
23
|
return true;
|
|
22
24
|
}
|
|
23
25
|
}
|
|
@@ -36,9 +38,7 @@ function detectDelegationCycles(agentData) {
|
|
|
36
38
|
function buildDelegationGraph(agentData) {
|
|
37
39
|
const graph = /* @__PURE__ */ new Map();
|
|
38
40
|
for (const [subAgentId, subAgent] of Object.entries(agentData.subAgents)) {
|
|
39
|
-
const delegates = subAgent.canDelegateTo?.filter(
|
|
40
|
-
(d) => typeof d === "string"
|
|
41
|
-
);
|
|
41
|
+
const delegates = subAgent.canDelegateTo?.filter((d) => typeof d === "string");
|
|
42
42
|
if (delegates?.length) {
|
|
43
43
|
graph.set(subAgentId, delegates);
|
|
44
44
|
}
|
|
@@ -431,10 +431,7 @@ var detectAuthenticationRequired = async ({
|
|
|
431
431
|
} catch (discoveryError) {
|
|
432
432
|
logger?.debug({ discoveryError }, "MCP OAuth metadata discovery failed");
|
|
433
433
|
}
|
|
434
|
-
logger?.debug(
|
|
435
|
-
{ error: error?.message },
|
|
436
|
-
"No MCP OAuth authentication requirement detected"
|
|
437
|
-
);
|
|
434
|
+
logger?.debug({ error: error?.message }, "No MCP OAuth authentication requirement detected");
|
|
438
435
|
return false;
|
|
439
436
|
};
|
|
440
437
|
|
package/dist/client-exports.cjs
CHANGED
|
@@ -2219,10 +2219,7 @@ var detectAuthenticationRequired = async ({
|
|
|
2219
2219
|
} catch (discoveryError) {
|
|
2220
2220
|
logger?.debug({ discoveryError }, "MCP OAuth metadata discovery failed");
|
|
2221
2221
|
}
|
|
2222
|
-
logger?.debug(
|
|
2223
|
-
{ error: error?.message },
|
|
2224
|
-
"No MCP OAuth authentication requirement detected"
|
|
2225
|
-
);
|
|
2222
|
+
logger?.debug({ error: error?.message }, "No MCP OAuth authentication requirement detected");
|
|
2226
2223
|
return false;
|
|
2227
2224
|
};
|
|
2228
2225
|
|
package/dist/client-exports.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { ACTIVITY_NAMES, ACTIVITY_STATUS, ACTIVITY_TYPES, AGENT_IDS, AGGREGATE_OPERATORS, AI_OPERATIONS, AI_TOOL_TYPES, DATA_SOURCES, DATA_TYPES, DELEGATION_FROM_SUB_AGENT_ID, DELEGATION_ID, DELEGATION_TO_SUB_AGENT_ID, FIELD_TYPES, OPERATORS, ORDER_DIRECTIONS, PANEL_TYPES, QUERY_DEFAULTS, QUERY_EXPRESSIONS, QUERY_FIELD_CONFIGS, QUERY_TYPES, REDUCE_OPERATIONS, SPAN_KEYS, SPAN_NAMES, TRANSFER_FROM_SUB_AGENT_ID, TRANSFER_TO_SUB_AGENT_ID, UNKNOWN_VALUE, detectAuthenticationRequired } from './chunk-
|
|
1
|
+
export { ACTIVITY_NAMES, ACTIVITY_STATUS, ACTIVITY_TYPES, AGENT_IDS, AGGREGATE_OPERATORS, AI_OPERATIONS, AI_TOOL_TYPES, DATA_SOURCES, DATA_TYPES, DELEGATION_FROM_SUB_AGENT_ID, DELEGATION_ID, DELEGATION_TO_SUB_AGENT_ID, FIELD_TYPES, OPERATORS, ORDER_DIRECTIONS, PANEL_TYPES, QUERY_DEFAULTS, QUERY_EXPRESSIONS, QUERY_FIELD_CONFIGS, QUERY_TYPES, REDUCE_OPERATIONS, SPAN_KEYS, SPAN_NAMES, TRANSFER_FROM_SUB_AGENT_ID, TRANSFER_TO_SUB_AGENT_ID, UNKNOWN_VALUE, detectAuthenticationRequired } from './chunk-AGEFXY7F.js';
|
|
2
2
|
import { ModelSettingsSchema, FullAgentAgentInsertSchema, ArtifactComponentApiInsertSchema } from './chunk-37BY2EHU.js';
|
|
3
3
|
export { AgentStopWhenSchema, FunctionApiInsertSchema, FunctionApiSelectSchema, FunctionApiUpdateSchema, ModelSettingsSchema, StopWhenSchema, SubAgentStopWhenSchema, validatePropsAsJsonSchema } from './chunk-37BY2EHU.js';
|
|
4
4
|
import { CredentialStoreType } from './chunk-YFHT5M2R.js';
|
package/dist/index.cjs
CHANGED
|
@@ -215964,7 +215964,9 @@ function detectDelegationCycles(agentData) {
|
|
|
215964
215964
|
if (dfs(neighbor)) return true;
|
|
215965
215965
|
} else if (stack.has(neighbor)) {
|
|
215966
215966
|
const cycleStart = path2.indexOf(neighbor);
|
|
215967
|
-
cycles.push(
|
|
215967
|
+
cycles.push(
|
|
215968
|
+
`Circular delegation detected: ${[...path2.slice(cycleStart), neighbor].join(" \u2192 ")}`
|
|
215969
|
+
);
|
|
215968
215970
|
return true;
|
|
215969
215971
|
}
|
|
215970
215972
|
}
|
|
@@ -215983,9 +215985,7 @@ function detectDelegationCycles(agentData) {
|
|
|
215983
215985
|
function buildDelegationGraph(agentData) {
|
|
215984
215986
|
const graph = /* @__PURE__ */ new Map();
|
|
215985
215987
|
for (const [subAgentId, subAgent] of Object.entries(agentData.subAgents)) {
|
|
215986
|
-
const delegates = subAgent.canDelegateTo?.filter(
|
|
215987
|
-
(d) => typeof d === "string"
|
|
215988
|
-
);
|
|
215988
|
+
const delegates = subAgent.canDelegateTo?.filter((d) => typeof d === "string");
|
|
215989
215989
|
if (delegates?.length) {
|
|
215990
215990
|
graph.set(subAgentId, delegates);
|
|
215991
215991
|
}
|
|
@@ -216702,7 +216702,14 @@ var upsertSubAgentFunctionToolRelation = (db) => async (params) => {
|
|
|
216702
216702
|
).limit(1);
|
|
216703
216703
|
if (existingRelations.length > 0) {
|
|
216704
216704
|
logger4.info(
|
|
216705
|
-
{
|
|
216705
|
+
{
|
|
216706
|
+
tenantId,
|
|
216707
|
+
projectId,
|
|
216708
|
+
agentId,
|
|
216709
|
+
subAgentId,
|
|
216710
|
+
functionToolId,
|
|
216711
|
+
relationId: existingRelations[0].id
|
|
216712
|
+
},
|
|
216706
216713
|
"Sub_agent-function tool relation already exists, returning existing relation"
|
|
216707
216714
|
);
|
|
216708
216715
|
return { id: existingRelations[0].id };
|
|
@@ -218151,10 +218158,7 @@ var detectAuthenticationRequired = async ({
|
|
|
218151
218158
|
} catch (discoveryError) {
|
|
218152
218159
|
logger15?.debug({ discoveryError }, "MCP OAuth metadata discovery failed");
|
|
218153
218160
|
}
|
|
218154
|
-
logger15?.debug(
|
|
218155
|
-
{ error: error?.message },
|
|
218156
|
-
"No MCP OAuth authentication requirement detected"
|
|
218157
|
-
);
|
|
218161
|
+
logger15?.debug({ error: error?.message }, "No MCP OAuth authentication requirement detected");
|
|
218158
218162
|
return false;
|
|
218159
218163
|
};
|
|
218160
218164
|
var ErrorCode = zodOpenapi.z.enum([
|
|
@@ -224022,12 +224026,7 @@ var getFullProject = (db, logger15 = defaultLogger2) => async (params) => {
|
|
|
224022
224026
|
inputSchema: functions.inputSchema,
|
|
224023
224027
|
executeCode: functions.executeCode,
|
|
224024
224028
|
dependencies: functions.dependencies
|
|
224025
|
-
}).from(functionTools).innerJoin(functions, drizzleOrm.eq(functionTools.functionId, functions.id)).where(
|
|
224026
|
-
drizzleOrm.and(
|
|
224027
|
-
drizzleOrm.eq(functionTools.tenantId, tenantId),
|
|
224028
|
-
drizzleOrm.eq(functionTools.projectId, projectId)
|
|
224029
|
-
)
|
|
224030
|
-
);
|
|
224029
|
+
}).from(functionTools).innerJoin(functions, drizzleOrm.eq(functionTools.functionId, functions.id)).where(drizzleOrm.and(drizzleOrm.eq(functionTools.tenantId, tenantId), drizzleOrm.eq(functionTools.projectId, projectId)));
|
|
224031
224030
|
for (const item of functionToolsWithFunctions) {
|
|
224032
224031
|
projectFunctions[item.functionToolId] = {
|
|
224033
224032
|
id: item.functionId,
|
|
@@ -224043,7 +224042,10 @@ var getFullProject = (db, logger15 = defaultLogger2) => async (params) => {
|
|
|
224043
224042
|
"Function tools with function data retrieved for project"
|
|
224044
224043
|
);
|
|
224045
224044
|
} catch (error) {
|
|
224046
|
-
logger15.warn(
|
|
224045
|
+
logger15.warn(
|
|
224046
|
+
{ tenantId, projectId, error },
|
|
224047
|
+
"Failed to retrieve function tools for project"
|
|
224048
|
+
);
|
|
224047
224049
|
}
|
|
224048
224050
|
const agents2 = {};
|
|
224049
224051
|
if (agentList.length > 0) {
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { detectAuthenticationRequired } from './chunk-
|
|
2
|
-
export { ACTIVITY_NAMES, ACTIVITY_STATUS, ACTIVITY_TYPES, AGENT_IDS, AGGREGATE_OPERATORS, AI_OPERATIONS, AI_TOOL_TYPES, DATA_SOURCES, DATA_TYPES, DELEGATION_FROM_SUB_AGENT_ID, DELEGATION_ID, DELEGATION_TO_SUB_AGENT_ID, FIELD_TYPES, OPERATORS, ORDER_DIRECTIONS, PANEL_TYPES, QUERY_DEFAULTS, QUERY_EXPRESSIONS, QUERY_FIELD_CONFIGS, QUERY_TYPES, REDUCE_OPERATIONS, SPAN_KEYS, SPAN_NAMES, TRANSFER_FROM_SUB_AGENT_ID, TRANSFER_TO_SUB_AGENT_ID, UNKNOWN_VALUE, detectAuthenticationRequired, exchangeMcpAuthorizationCode, initiateMcpOAuthFlow } from './chunk-
|
|
1
|
+
import { detectAuthenticationRequired } from './chunk-AGEFXY7F.js';
|
|
2
|
+
export { ACTIVITY_NAMES, ACTIVITY_STATUS, ACTIVITY_TYPES, AGENT_IDS, AGGREGATE_OPERATORS, AI_OPERATIONS, AI_TOOL_TYPES, DATA_SOURCES, DATA_TYPES, DELEGATION_FROM_SUB_AGENT_ID, DELEGATION_ID, DELEGATION_TO_SUB_AGENT_ID, FIELD_TYPES, OPERATORS, ORDER_DIRECTIONS, PANEL_TYPES, QUERY_DEFAULTS, QUERY_EXPRESSIONS, QUERY_FIELD_CONFIGS, QUERY_TYPES, REDUCE_OPERATIONS, SPAN_KEYS, SPAN_NAMES, TRANSFER_FROM_SUB_AGENT_ID, TRANSFER_TO_SUB_AGENT_ID, UNKNOWN_VALUE, detectAuthenticationRequired, exchangeMcpAuthorizationCode, initiateMcpOAuthFlow } from './chunk-AGEFXY7F.js';
|
|
3
3
|
export { ANTHROPIC_MODELS, GOOGLE_MODELS, OPENAI_MODELS } from './chunk-MQTANAMG.js';
|
|
4
4
|
export { TaskState } from './chunk-H2F72PDA.js';
|
|
5
5
|
import { getLogger, convertZodToJsonSchema } from './chunk-YECQCT5N.js';
|
|
6
6
|
export { PinoLogger, convertZodToJsonSchema, convertZodToJsonSchemaWithPreview, extractPreviewFields, getLogger, isZodSchema, loggerFactory, preview } from './chunk-YECQCT5N.js';
|
|
7
|
-
import { validateRender, validateAndTypeAgentData, validateAgentStructure } from './chunk-
|
|
8
|
-
export { A2AMessageMetadataSchema, DataComponentStreamEventSchema, DataOperationDetailsSchema, DataOperationEventSchema, DataOperationStreamEventSchema, DataSummaryStreamEventSchema, DelegationReturnedDataSchema, DelegationSentDataSchema, StreamErrorEventSchema, StreamEventSchema, StreamFinishEventSchema, TextDeltaEventSchema, TextEndEventSchema, TextStartEventSchema, TransferDataSchema, generateIdFromName, isValidResourceId, validateAgentRelationships, validateAgentStructure, validateAndTypeAgentData, validateArtifactComponentReferences, validateDataComponentReferences, validateRender, validateSubAgentExternalAgentRelations, validateToolReferences } from './chunk-
|
|
7
|
+
import { validateRender, validateAndTypeAgentData, validateAgentStructure } from './chunk-6OGGGVEI.js';
|
|
8
|
+
export { A2AMessageMetadataSchema, DataComponentStreamEventSchema, DataOperationDetailsSchema, DataOperationEventSchema, DataOperationStreamEventSchema, DataSummaryStreamEventSchema, DelegationReturnedDataSchema, DelegationSentDataSchema, StreamErrorEventSchema, StreamEventSchema, StreamFinishEventSchema, TextDeltaEventSchema, TextEndEventSchema, TextStartEventSchema, TransferDataSchema, generateIdFromName, isValidResourceId, validateAgentRelationships, validateAgentStructure, validateAndTypeAgentData, validateArtifactComponentReferences, validateDataComponentReferences, validateRender, validateSubAgentExternalAgentRelations, validateToolReferences } from './chunk-6OGGGVEI.js';
|
|
9
9
|
import { ContextConfigApiUpdateSchema, validatePropsAsJsonSchema } from './chunk-37BY2EHU.js';
|
|
10
10
|
export { AgentApiInsertSchema, AgentApiSelectSchema, AgentApiUpdateSchema, AgentInsertSchema, AgentListResponse, AgentResponse, AgentSelectSchema, AgentStopWhenSchema, AgentUpdateSchema, AgentWithinContextOfProjectSchema, AllAgentSchema, ApiKeyApiCreationResponseSchema, ApiKeyApiInsertSchema, ApiKeyApiSelectSchema, ApiKeyApiUpdateSchema, ApiKeyInsertSchema, ApiKeyListResponse, ApiKeyResponse, ApiKeySelectSchema, ApiKeyUpdateSchema, ArtifactComponentApiInsertSchema, ArtifactComponentApiSelectSchema, ArtifactComponentApiUpdateSchema, ArtifactComponentInsertSchema, ArtifactComponentListResponse, ArtifactComponentResponse, ArtifactComponentSelectSchema, ArtifactComponentUpdateSchema, CanUseItemSchema, ContextCacheApiInsertSchema, ContextCacheApiSelectSchema, ContextCacheApiUpdateSchema, ContextCacheInsertSchema, ContextCacheSelectSchema, ContextCacheUpdateSchema, ContextConfigApiInsertSchema, ContextConfigApiSelectSchema, ContextConfigApiUpdateSchema, ContextConfigInsertSchema, ContextConfigListResponse, ContextConfigResponse, ContextConfigSelectSchema, ContextConfigUpdateSchema, ConversationApiInsertSchema, ConversationApiSelectSchema, ConversationApiUpdateSchema, ConversationInsertSchema, ConversationListResponse, ConversationResponse, ConversationSelectSchema, ConversationUpdateSchema, CredentialReferenceApiInsertSchema, CredentialReferenceApiSelectSchema, CredentialReferenceApiUpdateSchema, CredentialReferenceInsertSchema, CredentialReferenceListResponse, CredentialReferenceResponse, CredentialReferenceSelectSchema, CredentialReferenceUpdateSchema, DataComponentApiInsertSchema, DataComponentApiSelectSchema, DataComponentApiUpdateSchema, DataComponentBaseSchema, DataComponentInsertSchema, DataComponentListResponse, DataComponentResponse, DataComponentSelectSchema, DataComponentUpdateSchema, ErrorResponseSchema, ExistsResponseSchema, ExternalAgentApiInsertSchema, ExternalAgentApiSelectSchema, ExternalAgentApiUpdateSchema, ExternalAgentInsertSchema, ExternalAgentListResponse, ExternalAgentResponse, ExternalAgentSelectSchema, ExternalAgentUpdateSchema, ExternalSubAgentRelationApiInsertSchema, ExternalSubAgentRelationInsertSchema, FetchConfigSchema, FetchDefinitionSchema, FullAgentAgentInsertSchema, FullProjectDefinitionSchema, FunctionApiInsertSchema, FunctionApiSelectSchema, FunctionApiUpdateSchema, FunctionInsertSchema, FunctionListResponse, FunctionResponse, FunctionSelectSchema, FunctionToolApiInsertSchema, FunctionToolApiSelectSchema, FunctionToolApiUpdateSchema, FunctionToolConfigSchema, FunctionToolInsertSchema, FunctionToolListResponse, FunctionToolResponse, FunctionToolSelectSchema, FunctionToolUpdateSchema, FunctionUpdateSchema, HeadersScopeSchema, LedgerArtifactApiInsertSchema, LedgerArtifactApiSelectSchema, LedgerArtifactApiUpdateSchema, LedgerArtifactInsertSchema, LedgerArtifactSelectSchema, LedgerArtifactUpdateSchema, ListResponseSchema, MAX_ID_LENGTH, MCPToolConfigSchema, MIN_ID_LENGTH, McpToolDefinitionSchema, McpToolSchema, McpTransportConfigSchema, MessageApiInsertSchema, MessageApiSelectSchema, MessageApiUpdateSchema, MessageInsertSchema, MessageListResponse, MessageResponse, MessageSelectSchema, MessageUpdateSchema, ModelSchema, ModelSettingsSchema, PaginationQueryParamsSchema, PaginationSchema, ProjectApiInsertSchema, ProjectApiSelectSchema, ProjectApiUpdateSchema, ProjectInsertSchema, ProjectListResponse, ProjectModelSchema, ProjectResponse, ProjectSelectSchema, ProjectUpdateSchema, RemovedResponseSchema, SingleResponseSchema, StatusComponentSchema, StatusUpdateSchema, StopWhenSchema, SubAgentApiInsertSchema, SubAgentApiSelectSchema, SubAgentApiUpdateSchema, SubAgentArtifactComponentApiInsertSchema, SubAgentArtifactComponentApiSelectSchema, SubAgentArtifactComponentApiUpdateSchema, SubAgentArtifactComponentInsertSchema, SubAgentArtifactComponentListResponse, SubAgentArtifactComponentResponse, SubAgentArtifactComponentSelectSchema, SubAgentArtifactComponentUpdateSchema, SubAgentDataComponentApiInsertSchema, SubAgentDataComponentApiSelectSchema, SubAgentDataComponentApiUpdateSchema, SubAgentDataComponentInsertSchema, SubAgentDataComponentListResponse, SubAgentDataComponentResponse, SubAgentDataComponentSelectSchema, SubAgentDataComponentUpdateSchema, SubAgentExternalAgentRelationApiInsertSchema, SubAgentExternalAgentRelationApiSelectSchema, SubAgentExternalAgentRelationApiUpdateSchema, SubAgentExternalAgentRelationInsertSchema, SubAgentExternalAgentRelationSelectSchema, SubAgentExternalAgentRelationUpdateSchema, SubAgentInsertSchema, SubAgentListResponse, SubAgentRelationApiInsertSchema, SubAgentRelationApiSelectSchema, SubAgentRelationApiUpdateSchema, SubAgentRelationInsertSchema, SubAgentRelationListResponse, SubAgentRelationQuerySchema, SubAgentRelationResponse, SubAgentRelationSelectSchema, SubAgentRelationUpdateSchema, SubAgentResponse, SubAgentSelectSchema, SubAgentStopWhenSchema, SubAgentTeamAgentRelationApiInsertSchema, SubAgentTeamAgentRelationApiSelectSchema, SubAgentTeamAgentRelationApiUpdateSchema, SubAgentTeamAgentRelationInsertSchema, SubAgentTeamAgentRelationSelectSchema, SubAgentTeamAgentRelationUpdateSchema, SubAgentToolRelationApiInsertSchema, SubAgentToolRelationApiSelectSchema, SubAgentToolRelationApiUpdateSchema, SubAgentToolRelationInsertSchema, SubAgentToolRelationListResponse, SubAgentToolRelationResponse, SubAgentToolRelationSelectSchema, SubAgentToolRelationUpdateSchema, SubAgentUpdateSchema, TaskApiInsertSchema, TaskApiSelectSchema, TaskApiUpdateSchema, TaskInsertSchema, TaskRelationApiInsertSchema, TaskRelationApiSelectSchema, TaskRelationApiUpdateSchema, TaskRelationInsertSchema, TaskRelationSelectSchema, TaskRelationUpdateSchema, TaskSelectSchema, TaskUpdateSchema, TeamAgentSchema, TenantIdParamsSchema, TenantParamsSchema, TenantProjectAgentIdParamsSchema, TenantProjectAgentParamsSchema, TenantProjectAgentSubAgentIdParamsSchema, TenantProjectAgentSubAgentParamsSchema, TenantProjectIdParamsSchema, TenantProjectParamsSchema, ToolApiInsertSchema, ToolApiSelectSchema, ToolApiUpdateSchema, ToolInsertSchema, ToolListResponse, ToolResponse, ToolSelectSchema, ToolStatusSchema, ToolUpdateSchema, URL_SAFE_ID_PATTERN, canDelegateToExternalAgentSchema, canDelegateToTeamAgentSchema, resourceIdSchema, validatePropsAsJsonSchema } from './chunk-37BY2EHU.js';
|
|
11
11
|
import { schema_exports, contextConfigs, externalAgents, functions, functionTools, subAgentFunctionToolRelations, subAgentExternalAgentRelations, subAgents, subAgentRelations, subAgentToolRelations, tools, subAgentTeamAgentRelations, agents, credentialReferences, subAgentDataComponents, subAgentArtifactComponents, dataComponents, artifactComponents, projects, apiKeys, contextCache, conversations, messages, ledgerArtifacts, tasks, taskRelations } from './chunk-T5TTDZ6L.js';
|
|
@@ -214125,7 +214125,14 @@ var upsertSubAgentFunctionToolRelation = (db) => async (params) => {
|
|
|
214125
214125
|
).limit(1);
|
|
214126
214126
|
if (existingRelations.length > 0) {
|
|
214127
214127
|
logger3.info(
|
|
214128
|
-
{
|
|
214128
|
+
{
|
|
214129
|
+
tenantId,
|
|
214130
|
+
projectId,
|
|
214131
|
+
agentId,
|
|
214132
|
+
subAgentId,
|
|
214133
|
+
functionToolId,
|
|
214134
|
+
relationId: existingRelations[0].id
|
|
214135
|
+
},
|
|
214129
214136
|
"Sub_agent-function tool relation already exists, returning existing relation"
|
|
214130
214137
|
);
|
|
214131
214138
|
return { id: existingRelations[0].id };
|
|
@@ -221076,12 +221083,7 @@ var getFullProject = (db, logger14 = defaultLogger2) => async (params) => {
|
|
|
221076
221083
|
inputSchema: functions.inputSchema,
|
|
221077
221084
|
executeCode: functions.executeCode,
|
|
221078
221085
|
dependencies: functions.dependencies
|
|
221079
|
-
}).from(functionTools).innerJoin(functions, eq(functionTools.functionId, functions.id)).where(
|
|
221080
|
-
and(
|
|
221081
|
-
eq(functionTools.tenantId, tenantId),
|
|
221082
|
-
eq(functionTools.projectId, projectId)
|
|
221083
|
-
)
|
|
221084
|
-
);
|
|
221086
|
+
}).from(functionTools).innerJoin(functions, eq(functionTools.functionId, functions.id)).where(and(eq(functionTools.tenantId, tenantId), eq(functionTools.projectId, projectId)));
|
|
221085
221087
|
for (const item of functionToolsWithFunctions) {
|
|
221086
221088
|
projectFunctions[item.functionToolId] = {
|
|
221087
221089
|
id: item.functionId,
|
|
@@ -221097,7 +221099,10 @@ var getFullProject = (db, logger14 = defaultLogger2) => async (params) => {
|
|
|
221097
221099
|
"Function tools with function data retrieved for project"
|
|
221098
221100
|
);
|
|
221099
221101
|
} catch (error) {
|
|
221100
|
-
logger14.warn(
|
|
221102
|
+
logger14.warn(
|
|
221103
|
+
{ tenantId, projectId, error },
|
|
221104
|
+
"Failed to retrieve function tools for project"
|
|
221105
|
+
);
|
|
221101
221106
|
}
|
|
221102
221107
|
const agents2 = {};
|
|
221103
221108
|
if (agentList.length > 0) {
|
|
@@ -27,7 +27,9 @@ function detectDelegationCycles(agentData) {
|
|
|
27
27
|
if (dfs(neighbor)) return true;
|
|
28
28
|
} else if (stack.has(neighbor)) {
|
|
29
29
|
const cycleStart = path.indexOf(neighbor);
|
|
30
|
-
cycles.push(
|
|
30
|
+
cycles.push(
|
|
31
|
+
`Circular delegation detected: ${[...path.slice(cycleStart), neighbor].join(" \u2192 ")}`
|
|
32
|
+
);
|
|
31
33
|
return true;
|
|
32
34
|
}
|
|
33
35
|
}
|
|
@@ -46,9 +48,7 @@ function detectDelegationCycles(agentData) {
|
|
|
46
48
|
function buildDelegationGraph(agentData) {
|
|
47
49
|
const graph = /* @__PURE__ */ new Map();
|
|
48
50
|
for (const [subAgentId, subAgent] of Object.entries(agentData.subAgents)) {
|
|
49
|
-
const delegates = subAgent.canDelegateTo?.filter(
|
|
50
|
-
(d) => typeof d === "string"
|
|
51
|
-
);
|
|
51
|
+
const delegates = subAgent.canDelegateTo?.filter((d) => typeof d === "string");
|
|
52
52
|
if (delegates?.length) {
|
|
53
53
|
graph.set(subAgentId, delegates);
|
|
54
54
|
}
|
package/dist/validation/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { A2AMessageMetadataSchema, DataComponentStreamEventSchema, DataOperationDetailsSchema, DataOperationEventSchema, DataOperationStreamEventSchema, DataSummaryStreamEventSchema, DelegationReturnedDataSchema, DelegationSentDataSchema, StreamErrorEventSchema, StreamEventSchema, StreamFinishEventSchema, TextDeltaEventSchema, TextEndEventSchema, TextStartEventSchema, TransferDataSchema, generateIdFromName, isValidResourceId, validateAgentRelationships, validateAgentStructure, validateAndTypeAgentData, validateArtifactComponentReferences, validateDataComponentReferences, validateRender, validateSubAgentExternalAgentRelations, validateToolReferences } from '../chunk-
|
|
1
|
+
export { A2AMessageMetadataSchema, DataComponentStreamEventSchema, DataOperationDetailsSchema, DataOperationEventSchema, DataOperationStreamEventSchema, DataSummaryStreamEventSchema, DelegationReturnedDataSchema, DelegationSentDataSchema, StreamErrorEventSchema, StreamEventSchema, StreamFinishEventSchema, TextDeltaEventSchema, TextEndEventSchema, TextStartEventSchema, TransferDataSchema, generateIdFromName, isValidResourceId, validateAgentRelationships, validateAgentStructure, validateAndTypeAgentData, validateArtifactComponentReferences, validateDataComponentReferences, validateRender, validateSubAgentExternalAgentRelations, validateToolReferences } from '../chunk-6OGGGVEI.js';
|
|
2
2
|
export { AgentApiInsertSchema, AgentApiSelectSchema, AgentApiUpdateSchema, AgentInsertSchema, AgentListResponse, AgentResponse, AgentSelectSchema, AgentStopWhenSchema, AgentUpdateSchema, AgentWithinContextOfProjectSchema, AllAgentSchema, ApiKeyApiCreationResponseSchema, ApiKeyApiInsertSchema, ApiKeyApiSelectSchema, ApiKeyApiUpdateSchema, ApiKeyInsertSchema, ApiKeyListResponse, ApiKeyResponse, ApiKeySelectSchema, ApiKeyUpdateSchema, ArtifactComponentApiInsertSchema, ArtifactComponentApiSelectSchema, ArtifactComponentApiUpdateSchema, ArtifactComponentInsertSchema, ArtifactComponentListResponse, ArtifactComponentResponse, ArtifactComponentSelectSchema, ArtifactComponentUpdateSchema, CanUseItemSchema, ContextCacheApiInsertSchema, ContextCacheApiSelectSchema, ContextCacheApiUpdateSchema, ContextCacheInsertSchema, ContextCacheSelectSchema, ContextCacheUpdateSchema, ContextConfigApiInsertSchema, ContextConfigApiSelectSchema, ContextConfigApiUpdateSchema, ContextConfigInsertSchema, ContextConfigListResponse, ContextConfigResponse, ContextConfigSelectSchema, ContextConfigUpdateSchema, ConversationApiInsertSchema, ConversationApiSelectSchema, ConversationApiUpdateSchema, ConversationInsertSchema, ConversationListResponse, ConversationResponse, ConversationSelectSchema, ConversationUpdateSchema, CredentialReferenceApiInsertSchema, CredentialReferenceApiSelectSchema, CredentialReferenceApiUpdateSchema, CredentialReferenceInsertSchema, CredentialReferenceListResponse, CredentialReferenceResponse, CredentialReferenceSelectSchema, CredentialReferenceUpdateSchema, DataComponentApiInsertSchema, DataComponentApiSelectSchema, DataComponentApiUpdateSchema, DataComponentBaseSchema, DataComponentInsertSchema, DataComponentListResponse, DataComponentResponse, DataComponentSelectSchema, DataComponentUpdateSchema, ErrorResponseSchema, ExistsResponseSchema, ExternalAgentApiInsertSchema, ExternalAgentApiSelectSchema, ExternalAgentApiUpdateSchema, ExternalAgentInsertSchema, ExternalAgentListResponse, ExternalAgentResponse, ExternalAgentSelectSchema, ExternalAgentUpdateSchema, ExternalSubAgentRelationApiInsertSchema, ExternalSubAgentRelationInsertSchema, FetchConfigSchema, FetchDefinitionSchema, FullAgentAgentInsertSchema, FullProjectDefinitionSchema, FunctionApiInsertSchema, FunctionApiSelectSchema, FunctionApiUpdateSchema, FunctionInsertSchema, FunctionListResponse, FunctionResponse, FunctionSelectSchema, FunctionToolApiInsertSchema, FunctionToolApiSelectSchema, FunctionToolApiUpdateSchema, FunctionToolConfigSchema, FunctionToolInsertSchema, FunctionToolListResponse, FunctionToolResponse, FunctionToolSelectSchema, FunctionToolUpdateSchema, FunctionUpdateSchema, HeadersScopeSchema, LedgerArtifactApiInsertSchema, LedgerArtifactApiSelectSchema, LedgerArtifactApiUpdateSchema, LedgerArtifactInsertSchema, LedgerArtifactSelectSchema, LedgerArtifactUpdateSchema, ListResponseSchema, MAX_ID_LENGTH, MCPToolConfigSchema, MIN_ID_LENGTH, McpToolDefinitionSchema, McpToolSchema, McpTransportConfigSchema, MessageApiInsertSchema, MessageApiSelectSchema, MessageApiUpdateSchema, MessageInsertSchema, MessageListResponse, MessageResponse, MessageSelectSchema, MessageUpdateSchema, ModelSchema, ModelSettingsSchema, PaginationQueryParamsSchema, PaginationSchema, ProjectApiInsertSchema, ProjectApiSelectSchema, ProjectApiUpdateSchema, ProjectInsertSchema, ProjectListResponse, ProjectModelSchema, ProjectResponse, ProjectSelectSchema, ProjectUpdateSchema, RemovedResponseSchema, SingleResponseSchema, StatusComponentSchema, StatusUpdateSchema, StopWhenSchema, SubAgentApiInsertSchema, SubAgentApiSelectSchema, SubAgentApiUpdateSchema, SubAgentArtifactComponentApiInsertSchema, SubAgentArtifactComponentApiSelectSchema, SubAgentArtifactComponentApiUpdateSchema, SubAgentArtifactComponentInsertSchema, SubAgentArtifactComponentListResponse, SubAgentArtifactComponentResponse, SubAgentArtifactComponentSelectSchema, SubAgentArtifactComponentUpdateSchema, SubAgentDataComponentApiInsertSchema, SubAgentDataComponentApiSelectSchema, SubAgentDataComponentApiUpdateSchema, SubAgentDataComponentInsertSchema, SubAgentDataComponentListResponse, SubAgentDataComponentResponse, SubAgentDataComponentSelectSchema, SubAgentDataComponentUpdateSchema, SubAgentExternalAgentRelationApiInsertSchema, SubAgentExternalAgentRelationApiSelectSchema, SubAgentExternalAgentRelationApiUpdateSchema, SubAgentExternalAgentRelationInsertSchema, SubAgentExternalAgentRelationSelectSchema, SubAgentExternalAgentRelationUpdateSchema, SubAgentInsertSchema, SubAgentListResponse, SubAgentRelationApiInsertSchema, SubAgentRelationApiSelectSchema, SubAgentRelationApiUpdateSchema, SubAgentRelationInsertSchema, SubAgentRelationListResponse, SubAgentRelationQuerySchema, SubAgentRelationResponse, SubAgentRelationSelectSchema, SubAgentRelationUpdateSchema, SubAgentResponse, SubAgentSelectSchema, SubAgentStopWhenSchema, SubAgentTeamAgentRelationApiInsertSchema, SubAgentTeamAgentRelationApiSelectSchema, SubAgentTeamAgentRelationApiUpdateSchema, SubAgentTeamAgentRelationInsertSchema, SubAgentTeamAgentRelationSelectSchema, SubAgentTeamAgentRelationUpdateSchema, SubAgentToolRelationApiInsertSchema, SubAgentToolRelationApiSelectSchema, SubAgentToolRelationApiUpdateSchema, SubAgentToolRelationInsertSchema, SubAgentToolRelationListResponse, SubAgentToolRelationResponse, SubAgentToolRelationSelectSchema, SubAgentToolRelationUpdateSchema, SubAgentUpdateSchema, TaskApiInsertSchema, TaskApiSelectSchema, TaskApiUpdateSchema, TaskInsertSchema, TaskRelationApiInsertSchema, TaskRelationApiSelectSchema, TaskRelationApiUpdateSchema, TaskRelationInsertSchema, TaskRelationSelectSchema, TaskRelationUpdateSchema, TaskSelectSchema, TaskUpdateSchema, TeamAgentSchema, TenantIdParamsSchema, TenantParamsSchema, TenantProjectAgentIdParamsSchema, TenantProjectAgentParamsSchema, TenantProjectAgentSubAgentIdParamsSchema, TenantProjectAgentSubAgentParamsSchema, TenantProjectIdParamsSchema, TenantProjectParamsSchema, ToolApiInsertSchema, ToolApiSelectSchema, ToolApiUpdateSchema, ToolInsertSchema, ToolListResponse, ToolResponse, ToolSelectSchema, ToolStatusSchema, ToolUpdateSchema, URL_SAFE_ID_PATTERN, canDelegateToExternalAgentSchema, canDelegateToTeamAgentSchema, resourceIdSchema, validatePropsAsJsonSchema } from '../chunk-37BY2EHU.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inkeep/agents-core",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20251105001429",
|
|
4
4
|
"description": "Agents Core contains the database schema, types, and validation schemas for Inkeep Agent Framework, along with core components.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|