@inkeep/agents-manage-api 0.0.0-dev-20251008182848 → 0.0.0-dev-20251008200151

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
@@ -2037,6 +2037,16 @@ app8.openapi(
2037
2037
  async (c) => {
2038
2038
  const { tenantId, projectId } = c.req.valid("param");
2039
2039
  const body = c.req.valid("json");
2040
+ if (body.props !== null && body.props !== void 0) {
2041
+ const propsValidation = agentsCore.validatePropsAsJsonSchema(body.props);
2042
+ if (!propsValidation.isValid) {
2043
+ const errorMessages = propsValidation.errors.map((e) => `${e.field}: ${e.message}`).join(", ");
2044
+ throw agentsCore.createApiError({
2045
+ code: "bad_request",
2046
+ message: `Invalid props schema: ${errorMessages}`
2047
+ });
2048
+ }
2049
+ }
2040
2050
  const finalId = body.id ? String(body.id) : nanoid.nanoid();
2041
2051
  const componentData = {
2042
2052
  tenantId,
@@ -2044,8 +2054,7 @@ app8.openapi(
2044
2054
  id: finalId,
2045
2055
  name: String(body.name),
2046
2056
  description: String(body.description),
2047
- summaryProps: body.summaryProps || void 0,
2048
- fullProps: body.fullProps || void 0
2057
+ props: body.props ?? null
2049
2058
  };
2050
2059
  try {
2051
2060
  const artifactComponent = await agentsCore.createArtifactComponent(dbClient_default)({
@@ -2095,15 +2104,30 @@ app8.openapi(
2095
2104
  async (c) => {
2096
2105
  const { tenantId, projectId, id } = c.req.valid("param");
2097
2106
  const body = c.req.valid("json");
2107
+ if (body.props !== void 0 && body.props !== null) {
2108
+ const propsValidation = agentsCore.validatePropsAsJsonSchema(body.props);
2109
+ if (!propsValidation.isValid) {
2110
+ const errorMessages = propsValidation.errors.map((e) => `${e.field}: ${e.message}`).join(", ");
2111
+ throw agentsCore.createApiError({
2112
+ code: "bad_request",
2113
+ message: `Invalid props schema: ${errorMessages}`
2114
+ });
2115
+ }
2116
+ }
2117
+ const updateData = {};
2118
+ if (body.name !== void 0) {
2119
+ updateData.name = String(body.name);
2120
+ }
2121
+ if (body.description !== void 0) {
2122
+ updateData.description = String(body.description);
2123
+ }
2124
+ if (body.props !== void 0) {
2125
+ updateData.props = body.props ?? null;
2126
+ }
2098
2127
  const updatedArtifactComponent = await agentsCore.updateArtifactComponent(dbClient_default)({
2099
2128
  scopes: { tenantId, projectId },
2100
2129
  id,
2101
- data: {
2102
- name: body.name ? String(body.name) : void 0,
2103
- description: body.description ? String(body.description) : void 0,
2104
- summaryProps: body.summaryProps || void 0,
2105
- fullProps: body.fullProps || void 0
2106
- }
2130
+ data: updateData
2107
2131
  });
2108
2132
  if (!updatedArtifactComponent) {
2109
2133
  throw agentsCore.createApiError({
@@ -2686,6 +2710,16 @@ app11.openapi(
2686
2710
  async (c) => {
2687
2711
  const { tenantId, projectId } = c.req.valid("param");
2688
2712
  const body = c.req.valid("json");
2713
+ if (body.props) {
2714
+ const propsValidation = agentsCore.validatePropsAsJsonSchema(body.props);
2715
+ if (!propsValidation.isValid) {
2716
+ const errorMessages = propsValidation.errors.map((e) => `${e.field}: ${e.message}`).join(", ");
2717
+ throw agentsCore.createApiError({
2718
+ code: "bad_request",
2719
+ message: `Invalid props schema: ${errorMessages}`
2720
+ });
2721
+ }
2722
+ }
2689
2723
  const dataComponentData = {
2690
2724
  ...body,
2691
2725
  tenantId,
@@ -2727,6 +2761,16 @@ app11.openapi(
2727
2761
  async (c) => {
2728
2762
  const { tenantId, projectId, id } = c.req.valid("param");
2729
2763
  const body = c.req.valid("json");
2764
+ if (body.props !== void 0 && body.props !== null) {
2765
+ const propsValidation = agentsCore.validatePropsAsJsonSchema(body.props);
2766
+ if (!propsValidation.isValid) {
2767
+ const errorMessages = propsValidation.errors.map((e) => `${e.field}: ${e.message}`).join(", ");
2768
+ throw agentsCore.createApiError({
2769
+ code: "bad_request",
2770
+ message: `Invalid props schema: ${errorMessages}`
2771
+ });
2772
+ }
2773
+ }
2730
2774
  const updatedDataComponent = await agentsCore.updateDataComponent(dbClient_default)({
2731
2775
  scopes: { tenantId, projectId },
2732
2776
  dataComponentId: id,
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { loadEnvironmentFiles, getLogger, createDatabaseClient, commonGetErrorResponses, TenantProjectGraphParamsSchema, 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, TenantProjectParamsSchema, AgentGraphApiSelectSchema, listAgentGraphs, IdParamsSchema, getAgentGraphById, getGraphAgentInfos, FullGraphDefinitionSchema, getFullGraphDefinition, AgentGraphApiInsertSchema, createAgentGraph, AgentGraphApiUpdateSchema, updateAgentGraph, deleteAgentGraph, AgentRelationApiSelectSchema, AgentRelationQuerySchema, getAgentRelationsBySource, getAgentRelationsByTarget, getExternalAgentRelations, listAgentRelations, TenantProjectGraphIdParamsSchema, getAgentRelationById, AgentRelationApiInsertSchema, validateExternalAgent, validateInternalAgent, createAgentRelation, AgentRelationApiUpdateSchema, updateAgentRelation, deleteAgentRelation, AgentApiSelectSchema, listAgentsPaginated, AgentApiInsertSchema, createAgent, AgentApiUpdateSchema, updateAgent, deleteAgent, AgentToolRelationApiSelectSchema, getAgentToolRelationByAgent, getAgentToolRelationByTool, listAgentToolRelations, getAgentToolRelationById, 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, getCredentialReferenceWithTools, CredentialReferenceApiInsertSchema, createCredentialReference, CredentialReferenceApiUpdateSchema, updateCredentialReference, getCredentialReferenceById, 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, listTools, dbResultToMcpTool, getToolById, ToolApiInsertSchema, createTool, ToolApiUpdateSchema, updateTool, deleteTool, CredentialStoreType, generateIdFromName, FullProjectDefinitionSchema, createFullProjectServerSide, getFullProject, updateFullProjectServerSide, deleteFullProject, createDefaultCredentialStores, CredentialStoreRegistry, discoverOAuthEndpoints, handleApiError } from '@inkeep/agents-core';
1
+ import { loadEnvironmentFiles, getLogger, createDatabaseClient, commonGetErrorResponses, TenantProjectGraphParamsSchema, 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, TenantProjectParamsSchema, AgentGraphApiSelectSchema, listAgentGraphs, IdParamsSchema, getAgentGraphById, getGraphAgentInfos, FullGraphDefinitionSchema, getFullGraphDefinition, AgentGraphApiInsertSchema, createAgentGraph, AgentGraphApiUpdateSchema, updateAgentGraph, deleteAgentGraph, AgentRelationApiSelectSchema, AgentRelationQuerySchema, getAgentRelationsBySource, getAgentRelationsByTarget, getExternalAgentRelations, listAgentRelations, TenantProjectGraphIdParamsSchema, getAgentRelationById, AgentRelationApiInsertSchema, validateExternalAgent, validateInternalAgent, createAgentRelation, AgentRelationApiUpdateSchema, updateAgentRelation, deleteAgentRelation, AgentApiSelectSchema, listAgentsPaginated, AgentApiInsertSchema, createAgent, AgentApiUpdateSchema, updateAgent, deleteAgent, AgentToolRelationApiSelectSchema, getAgentToolRelationByAgent, getAgentToolRelationByTool, listAgentToolRelations, getAgentToolRelationById, getAgentsForTool, AgentToolRelationApiInsertSchema, createAgentToolRelation, AgentToolRelationApiUpdateSchema, updateAgentToolRelation, deleteAgentToolRelation, ApiKeyApiSelectSchema, listApiKeysPaginated, getApiKeyById, ApiKeyApiCreationResponseSchema, ApiKeyApiInsertSchema, generateApiKey, createApiKey, ApiKeyApiUpdateSchema, updateApiKey, deleteApiKey, listArtifactComponentsPaginated, ArtifactComponentApiInsertSchema, validatePropsAsJsonSchema, createArtifactComponent, ArtifactComponentApiUpdateSchema, updateArtifactComponent, deleteArtifactComponent, ContextConfigApiSelectSchema, listContextConfigsPaginated, getContextConfigById, ContextConfigApiInsertSchema, createContextConfig, commonUpdateErrorResponses, ContextConfigApiUpdateSchema, updateContextConfig, commonDeleteErrorResponses, deleteContextConfig, CredentialReferenceApiSelectSchema, listCredentialReferencesPaginated, getCredentialReferenceWithTools, CredentialReferenceApiInsertSchema, createCredentialReference, CredentialReferenceApiUpdateSchema, updateCredentialReference, getCredentialReferenceById, 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, listTools, dbResultToMcpTool, getToolById, ToolApiInsertSchema, createTool, ToolApiUpdateSchema, updateTool, deleteTool, CredentialStoreType, generateIdFromName, FullProjectDefinitionSchema, createFullProjectServerSide, getFullProject, updateFullProjectServerSide, deleteFullProject, createDefaultCredentialStores, CredentialStoreRegistry, discoverOAuthEndpoints, 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';
@@ -2033,6 +2033,16 @@ app8.openapi(
2033
2033
  async (c) => {
2034
2034
  const { tenantId, projectId } = c.req.valid("param");
2035
2035
  const body = c.req.valid("json");
2036
+ if (body.props !== null && body.props !== void 0) {
2037
+ const propsValidation = validatePropsAsJsonSchema(body.props);
2038
+ if (!propsValidation.isValid) {
2039
+ const errorMessages = propsValidation.errors.map((e) => `${e.field}: ${e.message}`).join(", ");
2040
+ throw createApiError({
2041
+ code: "bad_request",
2042
+ message: `Invalid props schema: ${errorMessages}`
2043
+ });
2044
+ }
2045
+ }
2036
2046
  const finalId = body.id ? String(body.id) : nanoid();
2037
2047
  const componentData = {
2038
2048
  tenantId,
@@ -2040,8 +2050,7 @@ app8.openapi(
2040
2050
  id: finalId,
2041
2051
  name: String(body.name),
2042
2052
  description: String(body.description),
2043
- summaryProps: body.summaryProps || void 0,
2044
- fullProps: body.fullProps || void 0
2053
+ props: body.props ?? null
2045
2054
  };
2046
2055
  try {
2047
2056
  const artifactComponent = await createArtifactComponent(dbClient_default)({
@@ -2091,15 +2100,30 @@ app8.openapi(
2091
2100
  async (c) => {
2092
2101
  const { tenantId, projectId, id } = c.req.valid("param");
2093
2102
  const body = c.req.valid("json");
2103
+ if (body.props !== void 0 && body.props !== null) {
2104
+ const propsValidation = validatePropsAsJsonSchema(body.props);
2105
+ if (!propsValidation.isValid) {
2106
+ const errorMessages = propsValidation.errors.map((e) => `${e.field}: ${e.message}`).join(", ");
2107
+ throw createApiError({
2108
+ code: "bad_request",
2109
+ message: `Invalid props schema: ${errorMessages}`
2110
+ });
2111
+ }
2112
+ }
2113
+ const updateData = {};
2114
+ if (body.name !== void 0) {
2115
+ updateData.name = String(body.name);
2116
+ }
2117
+ if (body.description !== void 0) {
2118
+ updateData.description = String(body.description);
2119
+ }
2120
+ if (body.props !== void 0) {
2121
+ updateData.props = body.props ?? null;
2122
+ }
2094
2123
  const updatedArtifactComponent = await updateArtifactComponent(dbClient_default)({
2095
2124
  scopes: { tenantId, projectId },
2096
2125
  id,
2097
- data: {
2098
- name: body.name ? String(body.name) : void 0,
2099
- description: body.description ? String(body.description) : void 0,
2100
- summaryProps: body.summaryProps || void 0,
2101
- fullProps: body.fullProps || void 0
2102
- }
2126
+ data: updateData
2103
2127
  });
2104
2128
  if (!updatedArtifactComponent) {
2105
2129
  throw createApiError({
@@ -2682,6 +2706,16 @@ app11.openapi(
2682
2706
  async (c) => {
2683
2707
  const { tenantId, projectId } = c.req.valid("param");
2684
2708
  const body = c.req.valid("json");
2709
+ if (body.props) {
2710
+ const propsValidation = validatePropsAsJsonSchema(body.props);
2711
+ if (!propsValidation.isValid) {
2712
+ const errorMessages = propsValidation.errors.map((e) => `${e.field}: ${e.message}`).join(", ");
2713
+ throw createApiError({
2714
+ code: "bad_request",
2715
+ message: `Invalid props schema: ${errorMessages}`
2716
+ });
2717
+ }
2718
+ }
2685
2719
  const dataComponentData = {
2686
2720
  ...body,
2687
2721
  tenantId,
@@ -2723,6 +2757,16 @@ app11.openapi(
2723
2757
  async (c) => {
2724
2758
  const { tenantId, projectId, id } = c.req.valid("param");
2725
2759
  const body = c.req.valid("json");
2760
+ if (body.props !== void 0 && body.props !== null) {
2761
+ const propsValidation = validatePropsAsJsonSchema(body.props);
2762
+ if (!propsValidation.isValid) {
2763
+ const errorMessages = propsValidation.errors.map((e) => `${e.field}: ${e.message}`).join(", ");
2764
+ throw createApiError({
2765
+ code: "bad_request",
2766
+ message: `Invalid props schema: ${errorMessages}`
2767
+ });
2768
+ }
2769
+ }
2726
2770
  const updatedDataComponent = await updateDataComponent(dbClient_default)({
2727
2771
  scopes: { tenantId, projectId },
2728
2772
  dataComponentId: id,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inkeep/agents-manage-api",
3
- "version": "0.0.0-dev-20251008182848",
3
+ "version": "0.0.0-dev-20251008200151",
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.0.0-dev-20251008182848"
26
+ "@inkeep/agents-core": "^0.0.0-dev-20251008200151"
27
27
  },
28
28
  "optionalDependencies": {
29
29
  "keytar": "^7.9.0"