@inkeep/agents-manage-api 0.31.5 → 0.31.6

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.
Files changed (3) hide show
  1. package/dist/index.cjs +28 -133
  2. package/dist/index.js +24 -129
  3. package/package.json +2 -2
package/dist/index.cjs CHANGED
@@ -211,23 +211,14 @@ app.openapi(
211
211
  operationId: "get-related-agent-infos",
212
212
  tags: ["Agent"],
213
213
  request: {
214
- params: agentsCore.TenantProjectParamsSchema.extend({
215
- agentId: zod.z.string(),
216
- subAgentId: zod.z.string()
217
- })
214
+ params: agentsCore.TenantProjectAgentSubAgentParamsSchema
218
215
  },
219
216
  responses: {
220
217
  200: {
221
218
  description: "Related agent infos retrieved successfully",
222
219
  content: {
223
220
  "application/json": {
224
- schema: agentsCore.ListResponseSchema(
225
- zod.z.object({
226
- id: zod.z.string(),
227
- name: zod.z.string(),
228
- description: zod.z.string()
229
- })
230
- )
221
+ schema: agentsCore.ListResponseSchema(agentsCore.RelatedAgentInfoSchema)
231
222
  }
232
223
  }
233
224
  },
@@ -420,20 +411,6 @@ app.openapi(
420
411
  var agent_default = app;
421
412
  var logger2 = agentsCore.getLogger("agentFull");
422
413
  var app2 = new zodOpenapi.OpenAPIHono();
423
- var AgentIdParamsSchema = zod.z.object({
424
- tenantId: zod.z.string().openapi({
425
- description: "Tenant identifier",
426
- example: "tenant_123"
427
- }),
428
- projectId: zod.z.string().openapi({
429
- description: "Project identifier",
430
- example: "project_456"
431
- }),
432
- agentId: zod.z.string().openapi({
433
- description: "Agent identifier",
434
- example: "agent_789"
435
- })
436
- }).openapi("AgentIdParams");
437
414
  app2.openapi(
438
415
  zodOpenapi.createRoute({
439
416
  method: "post",
@@ -492,7 +469,7 @@ app2.openapi(
492
469
  tags: ["Full Agent"],
493
470
  description: "Retrieve a complete agent definition with all agents, tools, and relationships",
494
471
  request: {
495
- params: AgentIdParamsSchema
472
+ params: agentsCore.TenantProjectAgentParamsSchema
496
473
  },
497
474
  responses: {
498
475
  200: {
@@ -545,7 +522,7 @@ app2.openapi(
545
522
  tags: ["Full Agent"],
546
523
  description: "Update or create a complete agent with all agents, tools, and relationships from JSON definition",
547
524
  request: {
548
- params: AgentIdParamsSchema,
525
+ params: agentsCore.TenantProjectAgentParamsSchema,
549
526
  body: {
550
527
  content: {
551
528
  "application/json": {
@@ -630,7 +607,7 @@ app2.openapi(
630
607
  tags: ["Full Agent"],
631
608
  description: "Delete a complete agent and cascade to all related entities (relationships, not other agents/tools)",
632
609
  request: {
633
- params: AgentIdParamsSchema
610
+ params: agentsCore.TenantProjectAgentParamsSchema
634
611
  },
635
612
  responses: {
636
613
  204: {
@@ -1366,27 +1343,6 @@ app5.openapi(
1366
1343
  );
1367
1344
  var contextConfigs_default = app5;
1368
1345
  var app6 = new zodOpenapi.OpenAPIHono();
1369
- var CredentialStoreSchema = zod.z.object({
1370
- id: zod.z.string().describe("Unique identifier of the credential store"),
1371
- type: zod.z.enum(agentsCore.CredentialStoreType),
1372
- available: zod.z.boolean().describe("Whether the store is functional and ready to use"),
1373
- reason: zod.z.string().nullable().describe("Reason why store is not available, if applicable")
1374
- });
1375
- var CredentialStoreListResponseSchema = zod.z.object({
1376
- data: zod.z.array(CredentialStoreSchema).describe("List of credential stores")
1377
- });
1378
- var CreateCredentialInStoreRequestSchema = zod.z.object({
1379
- key: zod.z.string().describe("The credential key"),
1380
- value: zod.z.string().describe("The credential value"),
1381
- metadata: zod.z.record(zod.z.string(), zod.z.string()).nullish().describe("The metadata for the credential")
1382
- });
1383
- var CreateCredentialInStoreResponseSchema = zod.z.object({
1384
- data: zod.z.object({
1385
- key: zod.z.string().describe("The credential key"),
1386
- storeId: zod.z.string().describe("The store ID where credential was created"),
1387
- createdAt: zod.z.string().describe("ISO timestamp of creation")
1388
- })
1389
- });
1390
1346
  app6.openapi(
1391
1347
  zodOpenapi.createRoute({
1392
1348
  method: "get",
@@ -1402,7 +1358,7 @@ app6.openapi(
1402
1358
  description: "List of credential stores retrieved successfully",
1403
1359
  content: {
1404
1360
  "application/json": {
1405
- schema: CredentialStoreListResponseSchema
1361
+ schema: agentsCore.CredentialStoreListResponseSchema
1406
1362
  }
1407
1363
  }
1408
1364
  },
@@ -1436,13 +1392,11 @@ app6.openapi(
1436
1392
  operationId: "create-credential-in-store",
1437
1393
  tags: ["Credential Store"],
1438
1394
  request: {
1439
- params: agentsCore.TenantProjectIdParamsSchema.extend({
1440
- id: zod.z.string().describe("The credential store ID")
1441
- }),
1395
+ params: agentsCore.TenantProjectIdParamsSchema,
1442
1396
  body: {
1443
1397
  content: {
1444
1398
  "application/json": {
1445
- schema: CreateCredentialInStoreRequestSchema
1399
+ schema: agentsCore.CreateCredentialInStoreRequestSchema
1446
1400
  }
1447
1401
  }
1448
1402
  }
@@ -1452,7 +1406,7 @@ app6.openapi(
1452
1406
  description: "Credential created successfully",
1453
1407
  content: {
1454
1408
  "application/json": {
1455
- schema: CreateCredentialInStoreResponseSchema
1409
+ schema: agentsCore.CreateCredentialInStoreResponseSchema
1456
1410
  }
1457
1411
  }
1458
1412
  },
@@ -2485,9 +2439,7 @@ app11.openapi(
2485
2439
  operationId: "get-function-tool",
2486
2440
  tags: ["Function Tools"],
2487
2441
  request: {
2488
- params: agentsCore.TenantProjectAgentParamsSchema.extend({
2489
- id: zod.z.string()
2490
- })
2442
+ params: agentsCore.TenantProjectAgentIdParamsSchema
2491
2443
  },
2492
2444
  responses: {
2493
2445
  200: {
@@ -2586,9 +2538,7 @@ app11.openapi(
2586
2538
  operationId: "update-function-tool",
2587
2539
  tags: ["Function Tools"],
2588
2540
  request: {
2589
- params: agentsCore.TenantProjectAgentParamsSchema.extend({
2590
- id: zod.z.string()
2591
- }),
2541
+ params: agentsCore.TenantProjectAgentIdParamsSchema,
2592
2542
  body: {
2593
2543
  content: {
2594
2544
  "application/json": {
@@ -2648,9 +2598,7 @@ app11.openapi(
2648
2598
  operationId: "delete-function-tool",
2649
2599
  tags: ["Function Tools"],
2650
2600
  request: {
2651
- params: agentsCore.TenantProjectAgentParamsSchema.extend({
2652
- id: zod.z.string()
2653
- })
2601
+ params: agentsCore.TenantProjectAgentIdParamsSchema
2654
2602
  },
2655
2603
  responses: {
2656
2604
  204: {
@@ -2921,18 +2869,14 @@ app13.openapi(
2921
2869
  operationId: "get-artifact-components-for-agent",
2922
2870
  tags: ["Agent Artifact Component Relations"],
2923
2871
  request: {
2924
- params: agentsCore.TenantProjectAgentParamsSchema.extend({
2925
- subAgentId: zod.z.string()
2926
- })
2872
+ params: agentsCore.TenantProjectAgentSubAgentParamsSchema
2927
2873
  },
2928
2874
  responses: {
2929
2875
  200: {
2930
2876
  description: "Artifact components retrieved successfully",
2931
2877
  content: {
2932
2878
  "application/json": {
2933
- schema: zod.z.object({
2934
- data: zod.z.array(agentsCore.ArtifactComponentApiSelectSchema)
2935
- })
2879
+ schema: agentsCore.SingleResponseSchema(zod.z.array(agentsCore.ArtifactComponentApiSelectSchema))
2936
2880
  }
2937
2881
  }
2938
2882
  },
@@ -2966,14 +2910,7 @@ app13.openapi(
2966
2910
  description: "Agents retrieved successfully",
2967
2911
  content: {
2968
2912
  "application/json": {
2969
- schema: zod.z.object({
2970
- data: zod.z.array(
2971
- zod.z.object({
2972
- subAgentId: zod.z.string(),
2973
- createdAt: zod.z.string()
2974
- })
2975
- )
2976
- })
2913
+ schema: agentsCore.SingleResponseSchema(zod.z.array(agentsCore.ComponentAssociationSchema))
2977
2914
  }
2978
2915
  }
2979
2916
  },
@@ -3074,8 +3011,7 @@ app13.openapi(
3074
3011
  operationId: "remove-artifact-component-from-agent",
3075
3012
  tags: ["Agent Artifact Component Relations"],
3076
3013
  request: {
3077
- params: agentsCore.TenantProjectAgentParamsSchema.extend({
3078
- subAgentId: zod.z.string(),
3014
+ params: agentsCore.TenantProjectAgentSubAgentParamsSchema.extend({
3079
3015
  artifactComponentId: zod.z.string()
3080
3016
  })
3081
3017
  },
@@ -3117,8 +3053,7 @@ app13.openapi(
3117
3053
  operationId: "check-artifact-component-agent-association",
3118
3054
  tags: ["Agent Artifact Component Relations"],
3119
3055
  request: {
3120
- params: agentsCore.TenantProjectAgentParamsSchema.extend({
3121
- subAgentId: zod.z.string(),
3056
+ params: agentsCore.TenantProjectAgentSubAgentParamsSchema.extend({
3122
3057
  artifactComponentId: zod.z.string()
3123
3058
  })
3124
3059
  },
@@ -3153,18 +3088,14 @@ app14.openapi(
3153
3088
  operationId: "get-data-components-for-agent",
3154
3089
  tags: ["Agent Data Component Relations"],
3155
3090
  request: {
3156
- params: agentsCore.TenantProjectAgentParamsSchema.extend({
3157
- subAgentId: zod.z.string()
3158
- })
3091
+ params: agentsCore.TenantProjectAgentSubAgentParamsSchema
3159
3092
  },
3160
3093
  responses: {
3161
3094
  200: {
3162
3095
  description: "Data components retrieved successfully",
3163
3096
  content: {
3164
3097
  "application/json": {
3165
- schema: zod.z.object({
3166
- data: zod.z.array(agentsCore.DataComponentApiSelectSchema)
3167
- })
3098
+ schema: agentsCore.SingleResponseSchema(zod.z.array(agentsCore.DataComponentApiSelectSchema))
3168
3099
  }
3169
3100
  }
3170
3101
  },
@@ -3196,14 +3127,7 @@ app14.openapi(
3196
3127
  description: "Agents retrieved successfully",
3197
3128
  content: {
3198
3129
  "application/json": {
3199
- schema: zod.z.object({
3200
- data: zod.z.array(
3201
- zod.z.object({
3202
- subAgentId: zod.z.string(),
3203
- createdAt: zod.z.string()
3204
- })
3205
- )
3206
- })
3130
+ schema: agentsCore.SingleResponseSchema(zod.z.array(agentsCore.ComponentAssociationSchema))
3207
3131
  }
3208
3132
  }
3209
3133
  },
@@ -3300,8 +3224,7 @@ app14.openapi(
3300
3224
  operationId: "remove-data-component-from-agent",
3301
3225
  tags: ["Agent Data Component Relations"],
3302
3226
  request: {
3303
- params: agentsCore.TenantProjectAgentParamsSchema.extend({
3304
- subAgentId: zod.z.string(),
3227
+ params: agentsCore.TenantProjectAgentSubAgentParamsSchema.extend({
3305
3228
  dataComponentId: zod.z.string()
3306
3229
  })
3307
3230
  },
@@ -3343,8 +3266,7 @@ app14.openapi(
3343
3266
  operationId: "check-data-component-agent-association",
3344
3267
  tags: ["Agent Data Component Relations"],
3345
3268
  request: {
3346
- params: agentsCore.TenantProjectAgentParamsSchema.extend({
3347
- subAgentId: zod.z.string(),
3269
+ params: agentsCore.TenantProjectAgentSubAgentParamsSchema.extend({
3348
3270
  dataComponentId: zod.z.string()
3349
3271
  })
3350
3272
  },
@@ -5086,17 +5008,6 @@ function generateOAuthCallbackPage(params) {
5086
5008
  </html>
5087
5009
  `;
5088
5010
  }
5089
- var OAuthLoginQuerySchema = zodOpenapi.z.object({
5090
- tenantId: zodOpenapi.z.string().min(1, "Tenant ID is required"),
5091
- projectId: zodOpenapi.z.string().min(1, "Project ID is required"),
5092
- toolId: zodOpenapi.z.string().min(1, "Tool ID is required")
5093
- });
5094
- var OAuthCallbackQuerySchema = zodOpenapi.z.object({
5095
- code: zodOpenapi.z.string().min(1, "Authorization code is required"),
5096
- state: zodOpenapi.z.string().min(1, "State parameter is required"),
5097
- error: zodOpenapi.z.string().optional(),
5098
- error_description: zodOpenapi.z.string().optional()
5099
- });
5100
5011
  app22.openapi(
5101
5012
  zodOpenapi.createRoute({
5102
5013
  method: "get",
@@ -5106,7 +5017,7 @@ app22.openapi(
5106
5017
  operationId: "initiate-oauth-login-public",
5107
5018
  tags: ["OAuth"],
5108
5019
  request: {
5109
- query: OAuthLoginQuerySchema
5020
+ query: agentsCore.OAuthLoginQuerySchema
5110
5021
  },
5111
5022
  responses: {
5112
5023
  302: {
@@ -5171,7 +5082,7 @@ app22.openapi(
5171
5082
  operationId: "oauth-callback",
5172
5083
  tags: ["OAuth"],
5173
5084
  request: {
5174
- query: OAuthCallbackQuerySchema
5085
+ query: agentsCore.OAuthCallbackQuerySchema
5175
5086
  },
5176
5087
  responses: {
5177
5088
  302: {
@@ -5308,22 +5219,6 @@ app22.openapi(
5308
5219
  var oauth_default = app22;
5309
5220
  var logger8 = agentsCore.getLogger("projectFull");
5310
5221
  var app23 = new zodOpenapi.OpenAPIHono();
5311
- var ProjectIdParamsSchema = zod.z.object({
5312
- tenantId: zod.z.string().openapi({
5313
- description: "Tenant identifier",
5314
- example: "tenant_123"
5315
- }),
5316
- projectId: zod.z.string().openapi({
5317
- description: "Project identifier",
5318
- example: "project_456"
5319
- })
5320
- }).openapi("ProjectIdParams");
5321
- var TenantParamsSchema2 = zod.z.object({
5322
- tenantId: zod.z.string().openapi({
5323
- description: "Tenant identifier",
5324
- example: "tenant_123"
5325
- })
5326
- }).openapi("TenantParams");
5327
5222
  app23.openapi(
5328
5223
  zodOpenapi.createRoute({
5329
5224
  method: "post",
@@ -5333,7 +5228,7 @@ app23.openapi(
5333
5228
  tags: ["Full Project"],
5334
5229
  description: "Create a complete project with all Agents, Sub Agents, tools, and relationships from JSON definition",
5335
5230
  request: {
5336
- params: TenantParamsSchema2,
5231
+ params: agentsCore.TenantParamsSchema,
5337
5232
  body: {
5338
5233
  content: {
5339
5234
  "application/json": {
@@ -5393,7 +5288,7 @@ app23.openapi(
5393
5288
  tags: ["Full Project"],
5394
5289
  description: "Retrieve a complete project definition with all Agents, Sub Agents, tools, and relationships",
5395
5290
  request: {
5396
- params: ProjectIdParamsSchema
5291
+ params: agentsCore.TenantProjectParamsSchema
5397
5292
  },
5398
5293
  responses: {
5399
5294
  200: {
@@ -5446,7 +5341,7 @@ app23.openapi(
5446
5341
  tags: ["Full Project"],
5447
5342
  description: "Update or create a complete project with all Agents, Sub Agents, tools, and relationships from JSON definition",
5448
5343
  request: {
5449
- params: ProjectIdParamsSchema,
5344
+ params: agentsCore.TenantProjectParamsSchema,
5450
5345
  body: {
5451
5346
  content: {
5452
5347
  "application/json": {
@@ -5530,7 +5425,7 @@ app23.openapi(
5530
5425
  tags: ["Full Project"],
5531
5426
  description: "Delete a complete project and cascade to all related entities (Agents, Sub Agents, tools, relationships)",
5532
5427
  request: {
5533
- params: ProjectIdParamsSchema
5428
+ params: agentsCore.TenantProjectParamsSchema
5534
5429
  },
5535
5430
  responses: {
5536
5431
  204: {
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { loadEnvironmentFiles, getLogger, createDatabaseClient, commonGetErrorResponses, AgentListResponse, PaginationQueryParamsSchema, TenantProjectParamsSchema, listAgents, AgentResponse, TenantProjectIdParamsSchema, getAgentById, createApiError, ListResponseSchema, getAgentSubAgentInfos, SingleResponseSchema, TenantProjectAgentParamsSchema, AgentWithinContextOfProjectSchema, getFullAgentDefinition, AgentApiInsertSchema, createAgent, generateId, AgentApiUpdateSchema, updateAgent, ErrorResponseSchema, deleteAgent, createFullAgentServerSide, getFullAgent, updateFullAgentServerSide, deleteFullAgent, ApiKeyListResponse, listApiKeysPaginated, ApiKeyResponse, getApiKeyById, ApiKeyApiCreationResponseSchema, ApiKeyApiInsertSchema, generateApiKey, createApiKey, ApiKeyApiUpdateSchema, updateApiKey, deleteApiKey, ArtifactComponentListResponse, listArtifactComponentsPaginated, ArtifactComponentResponse, getArtifactComponentById, ArtifactComponentApiInsertSchema, validatePropsAsJsonSchema, createArtifactComponent, ArtifactComponentApiUpdateSchema, updateArtifactComponent, deleteArtifactComponent, ContextConfigListResponse, listContextConfigsPaginated, ContextConfigResponse, TenantProjectAgentIdParamsSchema, getContextConfigById, ContextConfigApiInsertSchema, createContextConfig, commonUpdateErrorResponses, ContextConfigApiUpdateSchema, updateContextConfig, commonDeleteErrorResponses, deleteContextConfig, CredentialStoreType, CredentialReferenceListResponse, listCredentialReferencesPaginated, CredentialReferenceApiSelectSchema, CredentialReferenceResponse, getCredentialReferenceWithResources, CredentialReferenceApiInsertSchema, createCredentialReference, CredentialReferenceApiUpdateSchema, updateCredentialReference, getCredentialReferenceById, getCredentialStoreLookupKeyFromRetrievalParams, deleteCredentialReference, DataComponentListResponse, listDataComponentsPaginated, DataComponentResponse, getDataComponent, DataComponentApiInsertSchema, createDataComponent, DataComponentApiUpdateSchema, updateDataComponent, deleteDataComponent, ExternalAgentListResponse, listExternalAgentsPaginated, ExternalAgentResponse, getExternalAgent, ExternalAgentApiInsertSchema, createExternalAgent, ExternalAgentApiUpdateSchema, updateExternalAgent, deleteExternalAgent, FunctionListResponse, listFunctions, FunctionResponse, getFunction, FunctionApiInsertSchema, upsertFunction, FunctionApiUpdateSchema, deleteFunction, FunctionToolApiSelectSchema, listFunctionTools, getFunctionToolById, FunctionToolApiInsertSchema, createFunctionTool, FunctionToolApiUpdateSchema, updateFunctionTool, deleteFunctionTool, ProjectListResponse, TenantParamsSchema, listProjectsPaginated, ProjectResponse, TenantIdParamsSchema, getProject, ProjectApiInsertSchema, createProject, ProjectApiUpdateSchema, updateProject, deleteProject, ArtifactComponentApiSelectSchema, getArtifactComponentsForAgent, getAgentsUsingArtifactComponent, SubAgentArtifactComponentApiInsertSchema, SubAgentArtifactComponentApiSelectSchema, getSubAgentById, isArtifactComponentAssociatedWithAgent, associateArtifactComponentWithAgent, RemovedResponseSchema, removeArtifactComponentFromAgent, ExistsResponseSchema, DataComponentApiSelectSchema, getDataComponentsForAgent, getAgentsUsingDataComponent, SubAgentDataComponentApiInsertSchema, SubAgentDataComponentApiSelectSchema, isDataComponentAssociatedWithAgent, associateDataComponentWithAgent, removeDataComponentFromAgent, TenantProjectAgentSubAgentParamsSchema, SubAgentExternalAgentRelationApiSelectSchema, listSubAgentExternalAgentRelations, TenantProjectAgentSubAgentIdParamsSchema, getSubAgentExternalAgentRelationById, SubAgentExternalAgentRelationApiInsertSchema, createSubAgentExternalAgentRelation, SubAgentExternalAgentRelationApiUpdateSchema, updateSubAgentExternalAgentRelation, deleteSubAgentExternalAgentRelation, SubAgentRelationApiSelectSchema, SubAgentRelationQuerySchema, getAgentRelationsBySource, getSubAgentRelationsByTarget, listAgentRelations, getAgentRelationById, SubAgentRelationApiInsertSchema, validateSubAgent, createSubAgentRelation, SubAgentRelationApiUpdateSchema, updateAgentRelation, deleteSubAgentRelation, SubAgentListResponse, listSubAgentsPaginated, SubAgentResponse, SubAgentApiInsertSchema, createSubAgent, SubAgentApiUpdateSchema, updateSubAgent, deleteSubAgent, SubAgentTeamAgentRelationApiSelectSchema, listSubAgentTeamAgentRelations, getSubAgentTeamAgentRelationById, SubAgentTeamAgentRelationApiInsertSchema, createSubAgentTeamAgentRelation, SubAgentTeamAgentRelationApiUpdateSchema, updateSubAgentTeamAgentRelation, deleteSubAgentTeamAgentRelation, SubAgentToolRelationApiSelectSchema, getAgentToolRelationByAgent, getAgentToolRelationByTool, listAgentToolRelations, getAgentToolRelationById, getAgentsForTool, SubAgentToolRelationApiInsertSchema, createAgentToolRelation, SubAgentToolRelationApiUpdateSchema, updateAgentToolRelation, deleteAgentToolRelation, McpToolSchema, ToolStatusSchema, listTools, dbResultToMcpTool, getToolById, ToolApiInsertSchema, createTool, ToolApiUpdateSchema, updateTool, deleteTool, FullProjectDefinitionSchema, createFullProjectServerSide, getFullProject, updateFullProjectServerSide, deleteFullProject, createDefaultCredentialStores, CredentialStoreRegistry, initiateMcpOAuthFlow, exchangeMcpAuthorizationCode, handleApiError } from '@inkeep/agents-core';
1
+ import { loadEnvironmentFiles, getLogger, createDatabaseClient, commonGetErrorResponses, AgentListResponse, PaginationQueryParamsSchema, TenantProjectParamsSchema, listAgents, AgentResponse, TenantProjectIdParamsSchema, getAgentById, createApiError, ListResponseSchema, TenantProjectAgentSubAgentParamsSchema, RelatedAgentInfoSchema, getAgentSubAgentInfos, SingleResponseSchema, TenantProjectAgentParamsSchema, AgentWithinContextOfProjectSchema, getFullAgentDefinition, AgentApiInsertSchema, createAgent, generateId, AgentApiUpdateSchema, updateAgent, ErrorResponseSchema, deleteAgent, createFullAgentServerSide, getFullAgent, updateFullAgentServerSide, deleteFullAgent, ApiKeyListResponse, listApiKeysPaginated, ApiKeyResponse, getApiKeyById, ApiKeyApiCreationResponseSchema, ApiKeyApiInsertSchema, generateApiKey, createApiKey, ApiKeyApiUpdateSchema, updateApiKey, deleteApiKey, ArtifactComponentListResponse, listArtifactComponentsPaginated, ArtifactComponentResponse, getArtifactComponentById, ArtifactComponentApiInsertSchema, validatePropsAsJsonSchema, createArtifactComponent, ArtifactComponentApiUpdateSchema, updateArtifactComponent, deleteArtifactComponent, ContextConfigListResponse, listContextConfigsPaginated, ContextConfigResponse, TenantProjectAgentIdParamsSchema, getContextConfigById, ContextConfigApiInsertSchema, createContextConfig, commonUpdateErrorResponses, ContextConfigApiUpdateSchema, updateContextConfig, commonDeleteErrorResponses, deleteContextConfig, CredentialStoreListResponseSchema, CreateCredentialInStoreResponseSchema, CreateCredentialInStoreRequestSchema, CredentialReferenceListResponse, listCredentialReferencesPaginated, CredentialReferenceApiSelectSchema, CredentialReferenceResponse, getCredentialReferenceWithResources, CredentialReferenceApiInsertSchema, createCredentialReference, CredentialReferenceApiUpdateSchema, updateCredentialReference, getCredentialReferenceById, getCredentialStoreLookupKeyFromRetrievalParams, deleteCredentialReference, DataComponentListResponse, listDataComponentsPaginated, DataComponentResponse, getDataComponent, DataComponentApiInsertSchema, createDataComponent, DataComponentApiUpdateSchema, updateDataComponent, deleteDataComponent, ExternalAgentListResponse, listExternalAgentsPaginated, ExternalAgentResponse, getExternalAgent, ExternalAgentApiInsertSchema, createExternalAgent, ExternalAgentApiUpdateSchema, updateExternalAgent, deleteExternalAgent, FunctionListResponse, listFunctions, FunctionResponse, getFunction, FunctionApiInsertSchema, upsertFunction, FunctionApiUpdateSchema, deleteFunction, FunctionToolApiSelectSchema, listFunctionTools, getFunctionToolById, FunctionToolApiInsertSchema, createFunctionTool, FunctionToolApiUpdateSchema, updateFunctionTool, deleteFunctionTool, ProjectListResponse, TenantParamsSchema, listProjectsPaginated, ProjectResponse, TenantIdParamsSchema, getProject, ProjectApiInsertSchema, createProject, ProjectApiUpdateSchema, updateProject, deleteProject, ArtifactComponentApiSelectSchema, getArtifactComponentsForAgent, ComponentAssociationSchema, getAgentsUsingArtifactComponent, SubAgentArtifactComponentApiInsertSchema, SubAgentArtifactComponentApiSelectSchema, getSubAgentById, isArtifactComponentAssociatedWithAgent, associateArtifactComponentWithAgent, RemovedResponseSchema, removeArtifactComponentFromAgent, ExistsResponseSchema, DataComponentApiSelectSchema, getDataComponentsForAgent, getAgentsUsingDataComponent, SubAgentDataComponentApiInsertSchema, SubAgentDataComponentApiSelectSchema, isDataComponentAssociatedWithAgent, associateDataComponentWithAgent, removeDataComponentFromAgent, SubAgentExternalAgentRelationApiSelectSchema, listSubAgentExternalAgentRelations, TenantProjectAgentSubAgentIdParamsSchema, getSubAgentExternalAgentRelationById, SubAgentExternalAgentRelationApiInsertSchema, createSubAgentExternalAgentRelation, SubAgentExternalAgentRelationApiUpdateSchema, updateSubAgentExternalAgentRelation, deleteSubAgentExternalAgentRelation, SubAgentRelationApiSelectSchema, SubAgentRelationQuerySchema, getAgentRelationsBySource, getSubAgentRelationsByTarget, listAgentRelations, getAgentRelationById, SubAgentRelationApiInsertSchema, validateSubAgent, createSubAgentRelation, SubAgentRelationApiUpdateSchema, updateAgentRelation, deleteSubAgentRelation, SubAgentListResponse, listSubAgentsPaginated, SubAgentResponse, SubAgentApiInsertSchema, createSubAgent, SubAgentApiUpdateSchema, updateSubAgent, deleteSubAgent, SubAgentTeamAgentRelationApiSelectSchema, listSubAgentTeamAgentRelations, getSubAgentTeamAgentRelationById, SubAgentTeamAgentRelationApiInsertSchema, createSubAgentTeamAgentRelation, SubAgentTeamAgentRelationApiUpdateSchema, updateSubAgentTeamAgentRelation, deleteSubAgentTeamAgentRelation, SubAgentToolRelationApiSelectSchema, getAgentToolRelationByAgent, getAgentToolRelationByTool, listAgentToolRelations, getAgentToolRelationById, getAgentsForTool, SubAgentToolRelationApiInsertSchema, createAgentToolRelation, SubAgentToolRelationApiUpdateSchema, updateAgentToolRelation, deleteAgentToolRelation, McpToolSchema, ToolStatusSchema, listTools, dbResultToMcpTool, getToolById, ToolApiInsertSchema, createTool, ToolApiUpdateSchema, updateTool, deleteTool, OAuthLoginQuerySchema, OAuthCallbackQuerySchema, CredentialStoreType, FullProjectDefinitionSchema, createFullProjectServerSide, getFullProject, updateFullProjectServerSide, deleteFullProject, createDefaultCredentialStores, CredentialStoreRegistry, initiateMcpOAuthFlow, exchangeMcpAuthorizationCode, handleApiError } from '@inkeep/agents-core';
2
2
  import { OpenAPIHono, createRoute, z as z$1 } from '@hono/zod-openapi';
3
3
  import { Hono } from 'hono';
4
4
  import { cors } from 'hono/cors';
@@ -207,23 +207,14 @@ app.openapi(
207
207
  operationId: "get-related-agent-infos",
208
208
  tags: ["Agent"],
209
209
  request: {
210
- params: TenantProjectParamsSchema.extend({
211
- agentId: z.string(),
212
- subAgentId: z.string()
213
- })
210
+ params: TenantProjectAgentSubAgentParamsSchema
214
211
  },
215
212
  responses: {
216
213
  200: {
217
214
  description: "Related agent infos retrieved successfully",
218
215
  content: {
219
216
  "application/json": {
220
- schema: ListResponseSchema(
221
- z.object({
222
- id: z.string(),
223
- name: z.string(),
224
- description: z.string()
225
- })
226
- )
217
+ schema: ListResponseSchema(RelatedAgentInfoSchema)
227
218
  }
228
219
  }
229
220
  },
@@ -416,20 +407,6 @@ app.openapi(
416
407
  var agent_default = app;
417
408
  var logger2 = getLogger("agentFull");
418
409
  var app2 = new OpenAPIHono();
419
- var AgentIdParamsSchema = z.object({
420
- tenantId: z.string().openapi({
421
- description: "Tenant identifier",
422
- example: "tenant_123"
423
- }),
424
- projectId: z.string().openapi({
425
- description: "Project identifier",
426
- example: "project_456"
427
- }),
428
- agentId: z.string().openapi({
429
- description: "Agent identifier",
430
- example: "agent_789"
431
- })
432
- }).openapi("AgentIdParams");
433
410
  app2.openapi(
434
411
  createRoute({
435
412
  method: "post",
@@ -488,7 +465,7 @@ app2.openapi(
488
465
  tags: ["Full Agent"],
489
466
  description: "Retrieve a complete agent definition with all agents, tools, and relationships",
490
467
  request: {
491
- params: AgentIdParamsSchema
468
+ params: TenantProjectAgentParamsSchema
492
469
  },
493
470
  responses: {
494
471
  200: {
@@ -541,7 +518,7 @@ app2.openapi(
541
518
  tags: ["Full Agent"],
542
519
  description: "Update or create a complete agent with all agents, tools, and relationships from JSON definition",
543
520
  request: {
544
- params: AgentIdParamsSchema,
521
+ params: TenantProjectAgentParamsSchema,
545
522
  body: {
546
523
  content: {
547
524
  "application/json": {
@@ -626,7 +603,7 @@ app2.openapi(
626
603
  tags: ["Full Agent"],
627
604
  description: "Delete a complete agent and cascade to all related entities (relationships, not other agents/tools)",
628
605
  request: {
629
- params: AgentIdParamsSchema
606
+ params: TenantProjectAgentParamsSchema
630
607
  },
631
608
  responses: {
632
609
  204: {
@@ -1362,27 +1339,6 @@ app5.openapi(
1362
1339
  );
1363
1340
  var contextConfigs_default = app5;
1364
1341
  var app6 = new OpenAPIHono();
1365
- var CredentialStoreSchema = z.object({
1366
- id: z.string().describe("Unique identifier of the credential store"),
1367
- type: z.enum(CredentialStoreType),
1368
- available: z.boolean().describe("Whether the store is functional and ready to use"),
1369
- reason: z.string().nullable().describe("Reason why store is not available, if applicable")
1370
- });
1371
- var CredentialStoreListResponseSchema = z.object({
1372
- data: z.array(CredentialStoreSchema).describe("List of credential stores")
1373
- });
1374
- var CreateCredentialInStoreRequestSchema = z.object({
1375
- key: z.string().describe("The credential key"),
1376
- value: z.string().describe("The credential value"),
1377
- metadata: z.record(z.string(), z.string()).nullish().describe("The metadata for the credential")
1378
- });
1379
- var CreateCredentialInStoreResponseSchema = z.object({
1380
- data: z.object({
1381
- key: z.string().describe("The credential key"),
1382
- storeId: z.string().describe("The store ID where credential was created"),
1383
- createdAt: z.string().describe("ISO timestamp of creation")
1384
- })
1385
- });
1386
1342
  app6.openapi(
1387
1343
  createRoute({
1388
1344
  method: "get",
@@ -1432,9 +1388,7 @@ app6.openapi(
1432
1388
  operationId: "create-credential-in-store",
1433
1389
  tags: ["Credential Store"],
1434
1390
  request: {
1435
- params: TenantProjectIdParamsSchema.extend({
1436
- id: z.string().describe("The credential store ID")
1437
- }),
1391
+ params: TenantProjectIdParamsSchema,
1438
1392
  body: {
1439
1393
  content: {
1440
1394
  "application/json": {
@@ -2481,9 +2435,7 @@ app11.openapi(
2481
2435
  operationId: "get-function-tool",
2482
2436
  tags: ["Function Tools"],
2483
2437
  request: {
2484
- params: TenantProjectAgentParamsSchema.extend({
2485
- id: z.string()
2486
- })
2438
+ params: TenantProjectAgentIdParamsSchema
2487
2439
  },
2488
2440
  responses: {
2489
2441
  200: {
@@ -2582,9 +2534,7 @@ app11.openapi(
2582
2534
  operationId: "update-function-tool",
2583
2535
  tags: ["Function Tools"],
2584
2536
  request: {
2585
- params: TenantProjectAgentParamsSchema.extend({
2586
- id: z.string()
2587
- }),
2537
+ params: TenantProjectAgentIdParamsSchema,
2588
2538
  body: {
2589
2539
  content: {
2590
2540
  "application/json": {
@@ -2644,9 +2594,7 @@ app11.openapi(
2644
2594
  operationId: "delete-function-tool",
2645
2595
  tags: ["Function Tools"],
2646
2596
  request: {
2647
- params: TenantProjectAgentParamsSchema.extend({
2648
- id: z.string()
2649
- })
2597
+ params: TenantProjectAgentIdParamsSchema
2650
2598
  },
2651
2599
  responses: {
2652
2600
  204: {
@@ -2917,18 +2865,14 @@ app13.openapi(
2917
2865
  operationId: "get-artifact-components-for-agent",
2918
2866
  tags: ["Agent Artifact Component Relations"],
2919
2867
  request: {
2920
- params: TenantProjectAgentParamsSchema.extend({
2921
- subAgentId: z.string()
2922
- })
2868
+ params: TenantProjectAgentSubAgentParamsSchema
2923
2869
  },
2924
2870
  responses: {
2925
2871
  200: {
2926
2872
  description: "Artifact components retrieved successfully",
2927
2873
  content: {
2928
2874
  "application/json": {
2929
- schema: z.object({
2930
- data: z.array(ArtifactComponentApiSelectSchema)
2931
- })
2875
+ schema: SingleResponseSchema(z.array(ArtifactComponentApiSelectSchema))
2932
2876
  }
2933
2877
  }
2934
2878
  },
@@ -2962,14 +2906,7 @@ app13.openapi(
2962
2906
  description: "Agents retrieved successfully",
2963
2907
  content: {
2964
2908
  "application/json": {
2965
- schema: z.object({
2966
- data: z.array(
2967
- z.object({
2968
- subAgentId: z.string(),
2969
- createdAt: z.string()
2970
- })
2971
- )
2972
- })
2909
+ schema: SingleResponseSchema(z.array(ComponentAssociationSchema))
2973
2910
  }
2974
2911
  }
2975
2912
  },
@@ -3070,8 +3007,7 @@ app13.openapi(
3070
3007
  operationId: "remove-artifact-component-from-agent",
3071
3008
  tags: ["Agent Artifact Component Relations"],
3072
3009
  request: {
3073
- params: TenantProjectAgentParamsSchema.extend({
3074
- subAgentId: z.string(),
3010
+ params: TenantProjectAgentSubAgentParamsSchema.extend({
3075
3011
  artifactComponentId: z.string()
3076
3012
  })
3077
3013
  },
@@ -3113,8 +3049,7 @@ app13.openapi(
3113
3049
  operationId: "check-artifact-component-agent-association",
3114
3050
  tags: ["Agent Artifact Component Relations"],
3115
3051
  request: {
3116
- params: TenantProjectAgentParamsSchema.extend({
3117
- subAgentId: z.string(),
3052
+ params: TenantProjectAgentSubAgentParamsSchema.extend({
3118
3053
  artifactComponentId: z.string()
3119
3054
  })
3120
3055
  },
@@ -3149,18 +3084,14 @@ app14.openapi(
3149
3084
  operationId: "get-data-components-for-agent",
3150
3085
  tags: ["Agent Data Component Relations"],
3151
3086
  request: {
3152
- params: TenantProjectAgentParamsSchema.extend({
3153
- subAgentId: z.string()
3154
- })
3087
+ params: TenantProjectAgentSubAgentParamsSchema
3155
3088
  },
3156
3089
  responses: {
3157
3090
  200: {
3158
3091
  description: "Data components retrieved successfully",
3159
3092
  content: {
3160
3093
  "application/json": {
3161
- schema: z.object({
3162
- data: z.array(DataComponentApiSelectSchema)
3163
- })
3094
+ schema: SingleResponseSchema(z.array(DataComponentApiSelectSchema))
3164
3095
  }
3165
3096
  }
3166
3097
  },
@@ -3192,14 +3123,7 @@ app14.openapi(
3192
3123
  description: "Agents retrieved successfully",
3193
3124
  content: {
3194
3125
  "application/json": {
3195
- schema: z.object({
3196
- data: z.array(
3197
- z.object({
3198
- subAgentId: z.string(),
3199
- createdAt: z.string()
3200
- })
3201
- )
3202
- })
3126
+ schema: SingleResponseSchema(z.array(ComponentAssociationSchema))
3203
3127
  }
3204
3128
  }
3205
3129
  },
@@ -3296,8 +3220,7 @@ app14.openapi(
3296
3220
  operationId: "remove-data-component-from-agent",
3297
3221
  tags: ["Agent Data Component Relations"],
3298
3222
  request: {
3299
- params: TenantProjectAgentParamsSchema.extend({
3300
- subAgentId: z.string(),
3223
+ params: TenantProjectAgentSubAgentParamsSchema.extend({
3301
3224
  dataComponentId: z.string()
3302
3225
  })
3303
3226
  },
@@ -3339,8 +3262,7 @@ app14.openapi(
3339
3262
  operationId: "check-data-component-agent-association",
3340
3263
  tags: ["Agent Data Component Relations"],
3341
3264
  request: {
3342
- params: TenantProjectAgentParamsSchema.extend({
3343
- subAgentId: z.string(),
3265
+ params: TenantProjectAgentSubAgentParamsSchema.extend({
3344
3266
  dataComponentId: z.string()
3345
3267
  })
3346
3268
  },
@@ -5082,17 +5004,6 @@ function generateOAuthCallbackPage(params) {
5082
5004
  </html>
5083
5005
  `;
5084
5006
  }
5085
- var OAuthLoginQuerySchema = z$1.object({
5086
- tenantId: z$1.string().min(1, "Tenant ID is required"),
5087
- projectId: z$1.string().min(1, "Project ID is required"),
5088
- toolId: z$1.string().min(1, "Tool ID is required")
5089
- });
5090
- var OAuthCallbackQuerySchema = z$1.object({
5091
- code: z$1.string().min(1, "Authorization code is required"),
5092
- state: z$1.string().min(1, "State parameter is required"),
5093
- error: z$1.string().optional(),
5094
- error_description: z$1.string().optional()
5095
- });
5096
5007
  app22.openapi(
5097
5008
  createRoute({
5098
5009
  method: "get",
@@ -5304,22 +5215,6 @@ app22.openapi(
5304
5215
  var oauth_default = app22;
5305
5216
  var logger8 = getLogger("projectFull");
5306
5217
  var app23 = new OpenAPIHono();
5307
- var ProjectIdParamsSchema = z.object({
5308
- tenantId: z.string().openapi({
5309
- description: "Tenant identifier",
5310
- example: "tenant_123"
5311
- }),
5312
- projectId: z.string().openapi({
5313
- description: "Project identifier",
5314
- example: "project_456"
5315
- })
5316
- }).openapi("ProjectIdParams");
5317
- var TenantParamsSchema2 = z.object({
5318
- tenantId: z.string().openapi({
5319
- description: "Tenant identifier",
5320
- example: "tenant_123"
5321
- })
5322
- }).openapi("TenantParams");
5323
5218
  app23.openapi(
5324
5219
  createRoute({
5325
5220
  method: "post",
@@ -5329,7 +5224,7 @@ app23.openapi(
5329
5224
  tags: ["Full Project"],
5330
5225
  description: "Create a complete project with all Agents, Sub Agents, tools, and relationships from JSON definition",
5331
5226
  request: {
5332
- params: TenantParamsSchema2,
5227
+ params: TenantParamsSchema,
5333
5228
  body: {
5334
5229
  content: {
5335
5230
  "application/json": {
@@ -5389,7 +5284,7 @@ app23.openapi(
5389
5284
  tags: ["Full Project"],
5390
5285
  description: "Retrieve a complete project definition with all Agents, Sub Agents, tools, and relationships",
5391
5286
  request: {
5392
- params: ProjectIdParamsSchema
5287
+ params: TenantProjectParamsSchema
5393
5288
  },
5394
5289
  responses: {
5395
5290
  200: {
@@ -5442,7 +5337,7 @@ app23.openapi(
5442
5337
  tags: ["Full Project"],
5443
5338
  description: "Update or create a complete project with all Agents, Sub Agents, tools, and relationships from JSON definition",
5444
5339
  request: {
5445
- params: ProjectIdParamsSchema,
5340
+ params: TenantProjectParamsSchema,
5446
5341
  body: {
5447
5342
  content: {
5448
5343
  "application/json": {
@@ -5526,7 +5421,7 @@ app23.openapi(
5526
5421
  tags: ["Full Project"],
5527
5422
  description: "Delete a complete project and cascade to all related entities (Agents, Sub Agents, tools, relationships)",
5528
5423
  request: {
5529
- params: ProjectIdParamsSchema
5424
+ params: TenantProjectParamsSchema
5530
5425
  },
5531
5426
  responses: {
5532
5427
  204: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inkeep/agents-manage-api",
3
- "version": "0.31.5",
3
+ "version": "0.31.6",
4
4
  "description": "Agents Manage API for Inkeep Agent Framework - handles CRUD operations and OAuth",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -23,7 +23,7 @@
23
23
  "openid-client": "^6.6.4",
24
24
  "pino": "^9.7.0",
25
25
  "zod": "^4.1.11",
26
- "@inkeep/agents-core": "^0.31.5"
26
+ "@inkeep/agents-core": "^0.31.6"
27
27
  },
28
28
  "optionalDependencies": {
29
29
  "keytar": "^7.9.0"