@inkeep/agents-manage-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.
package/dist/index.cjs CHANGED
@@ -12,6 +12,7 @@ var honoPino = require('hono-pino');
12
12
  var factory = require('hono/factory');
13
13
  var zod = require('zod');
14
14
  var swaggerUi = require('@hono/swagger-ui');
15
+ var nanoid = require('nanoid');
15
16
 
16
17
  var __defProp = Object.defineProperty;
17
18
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
@@ -322,7 +323,7 @@ app.openapi(
322
323
  const agent = await agentsCore.createAgent(dbClient_default)({
323
324
  tenantId,
324
325
  projectId,
325
- id: validatedBody.id || agentsCore.generateId(),
326
+ id: validatedBody.id || nanoid.nanoid(),
326
327
  name: validatedBody.name,
327
328
  defaultSubAgentId: validatedBody.defaultSubAgentId,
328
329
  contextConfigId: validatedBody.contextConfigId ?? void 0
@@ -1039,7 +1040,7 @@ app4.openapi(
1039
1040
  });
1040
1041
  }
1041
1042
  }
1042
- const finalId = body.id ? String(body.id) : agentsCore.generateId();
1043
+ const finalId = body.id ? String(body.id) : nanoid.nanoid();
1043
1044
  const componentData = {
1044
1045
  tenantId,
1045
1046
  projectId,
@@ -2065,7 +2066,7 @@ app9.openapi(
2065
2066
  tenantId,
2066
2067
  projectId,
2067
2068
  agentId,
2068
- id: body.id ? String(body.id) : agentsCore.generateId(),
2069
+ id: body.id ? String(body.id) : nanoid.nanoid(),
2069
2070
  name: body.name,
2070
2071
  description: body.description,
2071
2072
  baseUrl: body.baseUrl,
@@ -2295,7 +2296,7 @@ app10.openapi(
2295
2296
  const { tenantId, projectId } = c.req.valid("param");
2296
2297
  const functionData = c.req.valid("json");
2297
2298
  try {
2298
- const id = functionData.id || agentsCore.generateId();
2299
+ const id = functionData.id || nanoid.nanoid();
2299
2300
  await agentsCore.upsertFunction(dbClient_default)({
2300
2301
  data: {
2301
2302
  ...functionData,
@@ -2553,7 +2554,7 @@ app11.openapi(
2553
2554
  const { tenantId, projectId, agentId } = c.req.valid("param");
2554
2555
  const body = c.req.valid("json");
2555
2556
  try {
2556
- const id = body.id || agentsCore.generateId();
2557
+ const id = body.id || nanoid.nanoid();
2557
2558
  const functionTool = await agentsCore.createFunctionTool(dbClient_default)({
2558
2559
  scopes: { tenantId, projectId, agentId },
2559
2560
  data: {
@@ -3555,7 +3556,7 @@ app15.openapi(
3555
3556
  const relationData = {
3556
3557
  agentId,
3557
3558
  tenantId,
3558
- id: agentsCore.generateId(),
3559
+ id: nanoid.nanoid(),
3559
3560
  projectId,
3560
3561
  sourceSubAgentId: body.sourceSubAgentId,
3561
3562
  targetSubAgentId: isExternalAgent ? void 0 : body.targetSubAgentId,
@@ -3769,7 +3770,7 @@ app16.openapi(
3769
3770
  async (c) => {
3770
3771
  const { tenantId, projectId, agentId } = c.req.valid("param");
3771
3772
  const body = c.req.valid("json");
3772
- const subAgentId = body.id ? String(body.id) : agentsCore.generateId();
3773
+ const subAgentId = body.id ? String(body.id) : nanoid.nanoid();
3773
3774
  const subAgent = await agentsCore.createSubAgent(dbClient_default)({
3774
3775
  ...body,
3775
3776
  id: subAgentId,
@@ -4299,7 +4300,7 @@ app18.openapi(
4299
4300
  const body = c.req.valid("json");
4300
4301
  const credentialStores = c.get("credentialStores");
4301
4302
  logger5.info({ body }, "body");
4302
- const id = body.id || agentsCore.generateId();
4303
+ const id = body.id || nanoid.nanoid();
4303
4304
  const tool = await agentsCore.createTool(dbClient_default)({
4304
4305
  tenantId,
4305
4306
  projectId,
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, getCredentialReferenceWithTools, 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, SubAgentRelationApiSelectSchema, SubAgentRelationQuerySchema, getAgentRelationsBySource, getSubAgentRelationsByTarget, getExternalAgentRelations, listAgentRelations, getAgentRelationById, SubAgentRelationApiInsertSchema, validateExternalAgent, validateInternalSubAgent, createSubAgentRelation, SubAgentRelationApiUpdateSchema, updateAgentRelation, deleteSubAgentRelation, SubAgentListResponse, listSubAgentsPaginated, SubAgentResponse, SubAgentApiInsertSchema, createSubAgent, SubAgentApiUpdateSchema, updateSubAgent, deleteSubAgent, SubAgentToolRelationApiSelectSchema, getAgentToolRelationByAgent, getAgentToolRelationByTool, listAgentToolRelations, getAgentToolRelationById, getAgentsForTool, SubAgentToolRelationApiInsertSchema, createAgentToolRelation, SubAgentToolRelationApiUpdateSchema, updateAgentToolRelation, deleteAgentToolRelation, McpToolSchema, ToolStatusSchema, listTools, dbResultToMcpTool, getToolById, ToolApiInsertSchema, createTool, ToolApiUpdateSchema, updateTool, deleteTool, generateIdFromName, 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, getAgentSubAgentInfos, SingleResponseSchema, TenantProjectAgentParamsSchema, AgentWithinContextOfProjectSchema, getFullAgentDefinition, AgentApiInsertSchema, createAgent, 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, getCredentialReferenceWithTools, 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, SubAgentRelationApiSelectSchema, SubAgentRelationQuerySchema, getAgentRelationsBySource, getSubAgentRelationsByTarget, getExternalAgentRelations, listAgentRelations, getAgentRelationById, SubAgentRelationApiInsertSchema, validateExternalAgent, validateInternalSubAgent, createSubAgentRelation, SubAgentRelationApiUpdateSchema, updateAgentRelation, deleteSubAgentRelation, SubAgentListResponse, listSubAgentsPaginated, SubAgentResponse, SubAgentApiInsertSchema, createSubAgent, SubAgentApiUpdateSchema, updateSubAgent, deleteSubAgent, SubAgentToolRelationApiSelectSchema, getAgentToolRelationByAgent, getAgentToolRelationByTool, listAgentToolRelations, getAgentToolRelationById, getAgentsForTool, SubAgentToolRelationApiInsertSchema, createAgentToolRelation, SubAgentToolRelationApiUpdateSchema, updateAgentToolRelation, deleteAgentToolRelation, McpToolSchema, ToolStatusSchema, listTools, dbResultToMcpTool, getToolById, ToolApiInsertSchema, createTool, ToolApiUpdateSchema, updateTool, deleteTool, generateIdFromName, 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';
@@ -8,6 +8,7 @@ import { pinoLogger } from 'hono-pino';
8
8
  import { createMiddleware } from 'hono/factory';
9
9
  import { z } from 'zod';
10
10
  import { swaggerUI } from '@hono/swagger-ui';
11
+ import { nanoid } from 'nanoid';
11
12
 
12
13
  var __defProp = Object.defineProperty;
13
14
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
@@ -318,7 +319,7 @@ app.openapi(
318
319
  const agent = await createAgent(dbClient_default)({
319
320
  tenantId,
320
321
  projectId,
321
- id: validatedBody.id || generateId(),
322
+ id: validatedBody.id || nanoid(),
322
323
  name: validatedBody.name,
323
324
  defaultSubAgentId: validatedBody.defaultSubAgentId,
324
325
  contextConfigId: validatedBody.contextConfigId ?? void 0
@@ -1035,7 +1036,7 @@ app4.openapi(
1035
1036
  });
1036
1037
  }
1037
1038
  }
1038
- const finalId = body.id ? String(body.id) : generateId();
1039
+ const finalId = body.id ? String(body.id) : nanoid();
1039
1040
  const componentData = {
1040
1041
  tenantId,
1041
1042
  projectId,
@@ -2061,7 +2062,7 @@ app9.openapi(
2061
2062
  tenantId,
2062
2063
  projectId,
2063
2064
  agentId,
2064
- id: body.id ? String(body.id) : generateId(),
2065
+ id: body.id ? String(body.id) : nanoid(),
2065
2066
  name: body.name,
2066
2067
  description: body.description,
2067
2068
  baseUrl: body.baseUrl,
@@ -2291,7 +2292,7 @@ app10.openapi(
2291
2292
  const { tenantId, projectId } = c.req.valid("param");
2292
2293
  const functionData = c.req.valid("json");
2293
2294
  try {
2294
- const id = functionData.id || generateId();
2295
+ const id = functionData.id || nanoid();
2295
2296
  await upsertFunction(dbClient_default)({
2296
2297
  data: {
2297
2298
  ...functionData,
@@ -2549,7 +2550,7 @@ app11.openapi(
2549
2550
  const { tenantId, projectId, agentId } = c.req.valid("param");
2550
2551
  const body = c.req.valid("json");
2551
2552
  try {
2552
- const id = body.id || generateId();
2553
+ const id = body.id || nanoid();
2553
2554
  const functionTool = await createFunctionTool(dbClient_default)({
2554
2555
  scopes: { tenantId, projectId, agentId },
2555
2556
  data: {
@@ -3551,7 +3552,7 @@ app15.openapi(
3551
3552
  const relationData = {
3552
3553
  agentId,
3553
3554
  tenantId,
3554
- id: generateId(),
3555
+ id: nanoid(),
3555
3556
  projectId,
3556
3557
  sourceSubAgentId: body.sourceSubAgentId,
3557
3558
  targetSubAgentId: isExternalAgent ? void 0 : body.targetSubAgentId,
@@ -3765,7 +3766,7 @@ app16.openapi(
3765
3766
  async (c) => {
3766
3767
  const { tenantId, projectId, agentId } = c.req.valid("param");
3767
3768
  const body = c.req.valid("json");
3768
- const subAgentId = body.id ? String(body.id) : generateId();
3769
+ const subAgentId = body.id ? String(body.id) : nanoid();
3769
3770
  const subAgent = await createSubAgent(dbClient_default)({
3770
3771
  ...body,
3771
3772
  id: subAgentId,
@@ -4295,7 +4296,7 @@ app18.openapi(
4295
4296
  const body = c.req.valid("json");
4296
4297
  const credentialStores = c.get("credentialStores");
4297
4298
  logger5.info({ body }, "body");
4298
- const id = body.id || generateId();
4299
+ const id = body.id || nanoid();
4299
4300
  const tool = await createTool(dbClient_default)({
4300
4301
  tenantId,
4301
4302
  projectId,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inkeep/agents-manage-api",
3
- "version": "0.24.0",
3
+ "version": "0.24.1",
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.24.0"
26
+ "@inkeep/agents-core": "^0.24.1"
27
27
  },
28
28
  "optionalDependencies": {
29
29
  "keytar": "^7.9.0"