@inkeep/agents-manage-api 0.0.0-dev-20250910234950 → 0.0.0-dev-20250911002844
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 +18 -14
- package/dist/index.js +19 -15
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -2476,7 +2476,8 @@ app10.openapi(
|
|
|
2476
2476
|
scopes: { tenantId, projectId },
|
|
2477
2477
|
pagination: { page, limit }
|
|
2478
2478
|
});
|
|
2479
|
-
|
|
2479
|
+
const validatedResult = agentsCore.ListResponseSchema(agentsCore.CredentialReferenceApiSelectSchema).parse(result);
|
|
2480
|
+
return c.json(validatedResult);
|
|
2480
2481
|
}
|
|
2481
2482
|
);
|
|
2482
2483
|
app10.openapi(
|
|
@@ -2513,7 +2514,8 @@ app10.openapi(
|
|
|
2513
2514
|
message: "Credential not found"
|
|
2514
2515
|
});
|
|
2515
2516
|
}
|
|
2516
|
-
|
|
2517
|
+
const validatedCredential = agentsCore.CredentialReferenceApiSelectSchema.parse(credential);
|
|
2518
|
+
return c.json({ data: validatedCredential });
|
|
2517
2519
|
}
|
|
2518
2520
|
);
|
|
2519
2521
|
app10.openapi(
|
|
@@ -2554,7 +2556,8 @@ app10.openapi(
|
|
|
2554
2556
|
projectId
|
|
2555
2557
|
};
|
|
2556
2558
|
const credential = await agentsCore.createCredentialReference(dbClient_default)(credentialData);
|
|
2557
|
-
|
|
2559
|
+
const validatedCredential = agentsCore.CredentialReferenceApiSelectSchema.parse(credential);
|
|
2560
|
+
return c.json({ data: validatedCredential }, 201);
|
|
2558
2561
|
}
|
|
2559
2562
|
);
|
|
2560
2563
|
app10.openapi(
|
|
@@ -2600,7 +2603,8 @@ app10.openapi(
|
|
|
2600
2603
|
message: "Credential not found"
|
|
2601
2604
|
});
|
|
2602
2605
|
}
|
|
2603
|
-
|
|
2606
|
+
const validatedCredential = agentsCore.CredentialReferenceApiSelectSchema.parse(updatedCredential);
|
|
2607
|
+
return c.json({ data: validatedCredential });
|
|
2604
2608
|
}
|
|
2605
2609
|
);
|
|
2606
2610
|
app10.openapi(
|
|
@@ -3599,7 +3603,7 @@ var convertToMCPToolConfig = (tool) => {
|
|
|
3599
3603
|
description: tool.name,
|
|
3600
3604
|
// Use name as description fallback
|
|
3601
3605
|
serverUrl: tool.config.mcp.server.url,
|
|
3602
|
-
mcpType: tool.config.mcp.server.url.includes("api.nango.dev") ?
|
|
3606
|
+
mcpType: tool.config.mcp.server.url.includes("api.nango.dev") ? agentsCore.MCPServerType.nango : agentsCore.MCPServerType.generic,
|
|
3603
3607
|
transport: tool.config.mcp.transport,
|
|
3604
3608
|
headers: tool.headers
|
|
3605
3609
|
};
|
|
@@ -3629,7 +3633,7 @@ var updateToolHealth = async ({
|
|
|
3629
3633
|
};
|
|
3630
3634
|
var checkToolHealth = async (tool, credentialStoreRegistry) => {
|
|
3631
3635
|
try {
|
|
3632
|
-
const transportType = tool.config.mcp.transport?.type ||
|
|
3636
|
+
const transportType = tool.config.mcp.transport?.type || agentsCore.MCPTransportType.streamableHttp;
|
|
3633
3637
|
const baseConfig = {
|
|
3634
3638
|
url: tool.config.mcp.server.url
|
|
3635
3639
|
};
|
|
@@ -3663,16 +3667,16 @@ var checkToolHealth = async (tool, credentialStoreRegistry) => {
|
|
|
3663
3667
|
storeReference
|
|
3664
3668
|
);
|
|
3665
3669
|
} else {
|
|
3666
|
-
if (transportType ===
|
|
3670
|
+
if (transportType === agentsCore.MCPTransportType.sse) {
|
|
3667
3671
|
serverConfig = {
|
|
3668
|
-
type:
|
|
3672
|
+
type: agentsCore.MCPTransportType.sse,
|
|
3669
3673
|
url: baseConfig.url,
|
|
3670
3674
|
activeTools: tool.config.mcp.activeTools,
|
|
3671
3675
|
eventSourceInit: tool.config.mcp.transport?.eventSourceInit
|
|
3672
3676
|
};
|
|
3673
3677
|
} else {
|
|
3674
3678
|
serverConfig = {
|
|
3675
|
-
type:
|
|
3679
|
+
type: agentsCore.MCPTransportType.streamableHttp,
|
|
3676
3680
|
url: baseConfig.url,
|
|
3677
3681
|
activeTools: tool.config.mcp.activeTools,
|
|
3678
3682
|
requestInit: tool.config.mcp.transport?.requestInit,
|
|
@@ -3745,17 +3749,17 @@ var discoverToolsFromServer = async (tool, credentialStoreRegistry) => {
|
|
|
3745
3749
|
storeReference
|
|
3746
3750
|
);
|
|
3747
3751
|
} else {
|
|
3748
|
-
const transportType = tool.config.mcp.transport?.type ||
|
|
3749
|
-
if (transportType ===
|
|
3752
|
+
const transportType = tool.config.mcp.transport?.type || agentsCore.MCPTransportType.streamableHttp;
|
|
3753
|
+
if (transportType === agentsCore.MCPTransportType.sse) {
|
|
3750
3754
|
serverConfig = {
|
|
3751
|
-
type:
|
|
3755
|
+
type: agentsCore.MCPTransportType.sse,
|
|
3752
3756
|
url: tool.config.mcp.server.url,
|
|
3753
3757
|
activeTools: tool.config.mcp.activeTools,
|
|
3754
3758
|
eventSourceInit: tool.config.mcp.transport?.eventSourceInit
|
|
3755
3759
|
};
|
|
3756
3760
|
} else {
|
|
3757
3761
|
serverConfig = {
|
|
3758
|
-
type:
|
|
3762
|
+
type: agentsCore.MCPTransportType.streamableHttp,
|
|
3759
3763
|
url: tool.config.mcp.server.url,
|
|
3760
3764
|
activeTools: tool.config.mcp.activeTools,
|
|
3761
3765
|
requestInit: tool.config.mcp.transport?.requestInit,
|
|
@@ -4829,7 +4833,7 @@ app17.openapi(
|
|
|
4829
4833
|
id: credentialId
|
|
4830
4834
|
});
|
|
4831
4835
|
const credentialData = {
|
|
4832
|
-
type:
|
|
4836
|
+
type: agentsCore.CredentialStoreType.keychain,
|
|
4833
4837
|
credentialStoreId: "keychain-default",
|
|
4834
4838
|
retrievalParams: {
|
|
4835
4839
|
key: keychainKey
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getLogger as getLogger$1, createDatabaseClient, commonGetErrorResponses, TenantProjectParamsSchema, ArtifactComponentApiSelectSchema, getArtifactComponentsForAgent, getAgentsUsingArtifactComponent, ErrorResponseSchema, SingleResponseSchema, AgentArtifactComponentApiInsertSchema, AgentArtifactComponentApiSelectSchema, getAgentById, getArtifactComponentById, createApiError, isArtifactComponentAssociatedWithAgent, associateArtifactComponentWithAgent, RemovedResponseSchema, removeArtifactComponentFromAgent, ExistsResponseSchema, DataComponentApiSelectSchema, getDataComponentsForAgent, getAgentsUsingDataComponent, AgentDataComponentApiInsertSchema, AgentDataComponentApiSelectSchema, getDataComponent, isDataComponentAssociatedWithAgent, associateDataComponentWithAgent, removeDataComponentFromAgent, ListResponseSchema, PaginationQueryParamsSchema, AgentGraphApiSelectSchema, listAgentGraphs, IdParamsSchema, getAgentGraph, getGraphAgentInfos, FullGraphDefinitionSchema, getFullGraphDefinition, AgentGraphApiInsertSchema, createAgentGraph, AgentGraphApiUpdateSchema, updateAgentGraph, deleteAgentGraph, AgentRelationApiSelectSchema, AgentRelationQuerySchema, getAgentRelationsBySource, getAgentRelationsByTarget, getExternalAgentRelations, listAgentRelations, getAgentRelationById, AgentRelationApiInsertSchema, validateExternalAgent, validateInternalAgent, createAgentRelation, AgentRelationApiUpdateSchema, updateAgentRelation, deleteAgentRelation, AgentApiSelectSchema, listAgentsPaginated, TenantProjectIdParamsSchema, AgentApiInsertSchema, createAgent, AgentApiUpdateSchema, updateAgent, deleteAgent, AgentToolRelationApiSelectSchema, getAgentToolRelationByAgent, getAgentToolRelationByTool, listAgentToolRelations, getAgentToolRelationById, getToolsForAgent, getAgentsForTool, AgentToolRelationApiInsertSchema, createAgentToolRelation, AgentToolRelationApiUpdateSchema, updateAgentToolRelation, deleteAgentToolRelation, ApiKeyApiSelectSchema, listApiKeysPaginated, getApiKeyById, ApiKeyApiCreationResponseSchema, ApiKeyApiInsertSchema, generateApiKey, createApiKey, ApiKeyApiUpdateSchema, updateApiKey, deleteApiKey, listArtifactComponentsPaginated, ArtifactComponentApiInsertSchema, createArtifactComponent, ArtifactComponentApiUpdateSchema, updateArtifactComponent, deleteArtifactComponent, ContextConfigApiSelectSchema, listContextConfigsPaginated, getContextConfigById, ContextConfigApiInsertSchema, createContextConfig, commonUpdateErrorResponses, ContextConfigApiUpdateSchema, updateContextConfig, commonDeleteErrorResponses, deleteContextConfig, CredentialReferenceApiSelectSchema, listCredentialReferencesPaginated, getCredentialReferenceById, CredentialReferenceApiInsertSchema, createCredentialReference, CredentialReferenceApiUpdateSchema, updateCredentialReference, getCredentialStoreLookupKeyFromRetrievalParams, deleteCredentialReference, listDataComponentsPaginated, DataComponentApiInsertSchema, createDataComponent, DataComponentApiUpdateSchema, updateDataComponent, deleteDataComponent, ExternalAgentApiSelectSchema, listExternalAgentsPaginated, getExternalAgent, ExternalAgentApiInsertSchema, createExternalAgent, ExternalAgentApiUpdateSchema, updateExternalAgent, deleteExternalAgent, createFullGraphServerSide, getFullGraph, updateFullGraphServerSide, deleteFullGraph, TenantParamsSchema, ProjectApiSelectSchema, listProjectsPaginated, TenantIdParamsSchema, getProject, ProjectApiInsertSchema, createProject, ProjectApiUpdateSchema, updateProject, deleteProject, McpToolSchema, ToolStatusSchema, listToolsByStatus, dbResultToMcpTool, listTools, getToolById, ToolApiInsertSchema, createTool, ToolApiUpdateSchema, updateTool, deleteTool, getCredentialReference, createDefaultCredentialStores, CredentialStoreRegistry, ContextResolver, CredentialStuffer, McpClient, detectAuthenticationRequired, handleApiError } from '@inkeep/agents-core';
|
|
1
|
+
import { getLogger as getLogger$1, createDatabaseClient, commonGetErrorResponses, TenantProjectParamsSchema, ArtifactComponentApiSelectSchema, getArtifactComponentsForAgent, getAgentsUsingArtifactComponent, ErrorResponseSchema, SingleResponseSchema, AgentArtifactComponentApiInsertSchema, AgentArtifactComponentApiSelectSchema, getAgentById, getArtifactComponentById, createApiError, isArtifactComponentAssociatedWithAgent, associateArtifactComponentWithAgent, RemovedResponseSchema, removeArtifactComponentFromAgent, ExistsResponseSchema, DataComponentApiSelectSchema, getDataComponentsForAgent, getAgentsUsingDataComponent, AgentDataComponentApiInsertSchema, AgentDataComponentApiSelectSchema, getDataComponent, isDataComponentAssociatedWithAgent, associateDataComponentWithAgent, removeDataComponentFromAgent, ListResponseSchema, PaginationQueryParamsSchema, AgentGraphApiSelectSchema, listAgentGraphs, IdParamsSchema, getAgentGraph, getGraphAgentInfos, FullGraphDefinitionSchema, getFullGraphDefinition, AgentGraphApiInsertSchema, createAgentGraph, AgentGraphApiUpdateSchema, updateAgentGraph, deleteAgentGraph, AgentRelationApiSelectSchema, AgentRelationQuerySchema, getAgentRelationsBySource, getAgentRelationsByTarget, getExternalAgentRelations, listAgentRelations, getAgentRelationById, AgentRelationApiInsertSchema, validateExternalAgent, validateInternalAgent, createAgentRelation, AgentRelationApiUpdateSchema, updateAgentRelation, deleteAgentRelation, AgentApiSelectSchema, listAgentsPaginated, TenantProjectIdParamsSchema, AgentApiInsertSchema, createAgent, AgentApiUpdateSchema, updateAgent, deleteAgent, AgentToolRelationApiSelectSchema, getAgentToolRelationByAgent, getAgentToolRelationByTool, listAgentToolRelations, getAgentToolRelationById, getToolsForAgent, getAgentsForTool, AgentToolRelationApiInsertSchema, createAgentToolRelation, AgentToolRelationApiUpdateSchema, updateAgentToolRelation, deleteAgentToolRelation, ApiKeyApiSelectSchema, listApiKeysPaginated, getApiKeyById, ApiKeyApiCreationResponseSchema, ApiKeyApiInsertSchema, generateApiKey, createApiKey, ApiKeyApiUpdateSchema, updateApiKey, deleteApiKey, listArtifactComponentsPaginated, ArtifactComponentApiInsertSchema, createArtifactComponent, ArtifactComponentApiUpdateSchema, updateArtifactComponent, deleteArtifactComponent, ContextConfigApiSelectSchema, listContextConfigsPaginated, getContextConfigById, ContextConfigApiInsertSchema, createContextConfig, commonUpdateErrorResponses, ContextConfigApiUpdateSchema, updateContextConfig, commonDeleteErrorResponses, deleteContextConfig, CredentialReferenceApiSelectSchema, listCredentialReferencesPaginated, getCredentialReferenceById, CredentialReferenceApiInsertSchema, createCredentialReference, CredentialReferenceApiUpdateSchema, updateCredentialReference, getCredentialStoreLookupKeyFromRetrievalParams, deleteCredentialReference, listDataComponentsPaginated, DataComponentApiInsertSchema, createDataComponent, DataComponentApiUpdateSchema, updateDataComponent, deleteDataComponent, ExternalAgentApiSelectSchema, listExternalAgentsPaginated, getExternalAgent, ExternalAgentApiInsertSchema, createExternalAgent, ExternalAgentApiUpdateSchema, updateExternalAgent, deleteExternalAgent, createFullGraphServerSide, getFullGraph, updateFullGraphServerSide, deleteFullGraph, TenantParamsSchema, ProjectApiSelectSchema, listProjectsPaginated, TenantIdParamsSchema, getProject, ProjectApiInsertSchema, createProject, ProjectApiUpdateSchema, updateProject, deleteProject, McpToolSchema, ToolStatusSchema, listToolsByStatus, dbResultToMcpTool, listTools, getToolById, ToolApiInsertSchema, createTool, ToolApiUpdateSchema, updateTool, deleteTool, getCredentialReference, CredentialStoreType, createDefaultCredentialStores, CredentialStoreRegistry, ContextResolver, CredentialStuffer, McpClient, detectAuthenticationRequired, handleApiError, MCPServerType, MCPTransportType } from '@inkeep/agents-core';
|
|
2
2
|
import { Hono } from 'hono';
|
|
3
3
|
import { OpenAPIHono, createRoute, z as z$1 } from '@hono/zod-openapi';
|
|
4
4
|
import { cors } from 'hono/cors';
|
|
@@ -2448,7 +2448,8 @@ app10.openapi(
|
|
|
2448
2448
|
scopes: { tenantId, projectId },
|
|
2449
2449
|
pagination: { page, limit }
|
|
2450
2450
|
});
|
|
2451
|
-
|
|
2451
|
+
const validatedResult = ListResponseSchema(CredentialReferenceApiSelectSchema).parse(result);
|
|
2452
|
+
return c.json(validatedResult);
|
|
2452
2453
|
}
|
|
2453
2454
|
);
|
|
2454
2455
|
app10.openapi(
|
|
@@ -2485,7 +2486,8 @@ app10.openapi(
|
|
|
2485
2486
|
message: "Credential not found"
|
|
2486
2487
|
});
|
|
2487
2488
|
}
|
|
2488
|
-
|
|
2489
|
+
const validatedCredential = CredentialReferenceApiSelectSchema.parse(credential);
|
|
2490
|
+
return c.json({ data: validatedCredential });
|
|
2489
2491
|
}
|
|
2490
2492
|
);
|
|
2491
2493
|
app10.openapi(
|
|
@@ -2526,7 +2528,8 @@ app10.openapi(
|
|
|
2526
2528
|
projectId
|
|
2527
2529
|
};
|
|
2528
2530
|
const credential = await createCredentialReference(dbClient_default)(credentialData);
|
|
2529
|
-
|
|
2531
|
+
const validatedCredential = CredentialReferenceApiSelectSchema.parse(credential);
|
|
2532
|
+
return c.json({ data: validatedCredential }, 201);
|
|
2530
2533
|
}
|
|
2531
2534
|
);
|
|
2532
2535
|
app10.openapi(
|
|
@@ -2572,7 +2575,8 @@ app10.openapi(
|
|
|
2572
2575
|
message: "Credential not found"
|
|
2573
2576
|
});
|
|
2574
2577
|
}
|
|
2575
|
-
|
|
2578
|
+
const validatedCredential = CredentialReferenceApiSelectSchema.parse(updatedCredential);
|
|
2579
|
+
return c.json({ data: validatedCredential });
|
|
2576
2580
|
}
|
|
2577
2581
|
);
|
|
2578
2582
|
app10.openapi(
|
|
@@ -3571,7 +3575,7 @@ var convertToMCPToolConfig = (tool) => {
|
|
|
3571
3575
|
description: tool.name,
|
|
3572
3576
|
// Use name as description fallback
|
|
3573
3577
|
serverUrl: tool.config.mcp.server.url,
|
|
3574
|
-
mcpType: tool.config.mcp.server.url.includes("api.nango.dev") ?
|
|
3578
|
+
mcpType: tool.config.mcp.server.url.includes("api.nango.dev") ? MCPServerType.nango : MCPServerType.generic,
|
|
3575
3579
|
transport: tool.config.mcp.transport,
|
|
3576
3580
|
headers: tool.headers
|
|
3577
3581
|
};
|
|
@@ -3601,7 +3605,7 @@ var updateToolHealth = async ({
|
|
|
3601
3605
|
};
|
|
3602
3606
|
var checkToolHealth = async (tool, credentialStoreRegistry) => {
|
|
3603
3607
|
try {
|
|
3604
|
-
const transportType = tool.config.mcp.transport?.type ||
|
|
3608
|
+
const transportType = tool.config.mcp.transport?.type || MCPTransportType.streamableHttp;
|
|
3605
3609
|
const baseConfig = {
|
|
3606
3610
|
url: tool.config.mcp.server.url
|
|
3607
3611
|
};
|
|
@@ -3635,16 +3639,16 @@ var checkToolHealth = async (tool, credentialStoreRegistry) => {
|
|
|
3635
3639
|
storeReference
|
|
3636
3640
|
);
|
|
3637
3641
|
} else {
|
|
3638
|
-
if (transportType ===
|
|
3642
|
+
if (transportType === MCPTransportType.sse) {
|
|
3639
3643
|
serverConfig = {
|
|
3640
|
-
type:
|
|
3644
|
+
type: MCPTransportType.sse,
|
|
3641
3645
|
url: baseConfig.url,
|
|
3642
3646
|
activeTools: tool.config.mcp.activeTools,
|
|
3643
3647
|
eventSourceInit: tool.config.mcp.transport?.eventSourceInit
|
|
3644
3648
|
};
|
|
3645
3649
|
} else {
|
|
3646
3650
|
serverConfig = {
|
|
3647
|
-
type:
|
|
3651
|
+
type: MCPTransportType.streamableHttp,
|
|
3648
3652
|
url: baseConfig.url,
|
|
3649
3653
|
activeTools: tool.config.mcp.activeTools,
|
|
3650
3654
|
requestInit: tool.config.mcp.transport?.requestInit,
|
|
@@ -3717,17 +3721,17 @@ var discoverToolsFromServer = async (tool, credentialStoreRegistry) => {
|
|
|
3717
3721
|
storeReference
|
|
3718
3722
|
);
|
|
3719
3723
|
} else {
|
|
3720
|
-
const transportType = tool.config.mcp.transport?.type ||
|
|
3721
|
-
if (transportType ===
|
|
3724
|
+
const transportType = tool.config.mcp.transport?.type || MCPTransportType.streamableHttp;
|
|
3725
|
+
if (transportType === MCPTransportType.sse) {
|
|
3722
3726
|
serverConfig = {
|
|
3723
|
-
type:
|
|
3727
|
+
type: MCPTransportType.sse,
|
|
3724
3728
|
url: tool.config.mcp.server.url,
|
|
3725
3729
|
activeTools: tool.config.mcp.activeTools,
|
|
3726
3730
|
eventSourceInit: tool.config.mcp.transport?.eventSourceInit
|
|
3727
3731
|
};
|
|
3728
3732
|
} else {
|
|
3729
3733
|
serverConfig = {
|
|
3730
|
-
type:
|
|
3734
|
+
type: MCPTransportType.streamableHttp,
|
|
3731
3735
|
url: tool.config.mcp.server.url,
|
|
3732
3736
|
activeTools: tool.config.mcp.activeTools,
|
|
3733
3737
|
requestInit: tool.config.mcp.transport?.requestInit,
|
|
@@ -4801,7 +4805,7 @@ app17.openapi(
|
|
|
4801
4805
|
id: credentialId
|
|
4802
4806
|
});
|
|
4803
4807
|
const credentialData = {
|
|
4804
|
-
type:
|
|
4808
|
+
type: CredentialStoreType.keychain,
|
|
4805
4809
|
credentialStoreId: "keychain-default",
|
|
4806
4810
|
retrievalParams: {
|
|
4807
4811
|
key: keychainKey
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inkeep/agents-manage-api",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20250911002844",
|
|
4
4
|
"description": "Management API for Inkeep Agent Framework - handles CRUD operations and OAuth",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"pino": "^9.7.0",
|
|
26
26
|
"pino-pretty": "^13.0.0",
|
|
27
27
|
"zod": "^4.1.5",
|
|
28
|
-
"@inkeep/agents-core": "^0.0.0-dev-
|
|
28
|
+
"@inkeep/agents-core": "^0.0.0-dev-20250911002844"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@biomejs/biome": "2.1.4",
|