@inkeep/agents-core 0.6.4 → 0.6.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.
@@ -0,0 +1,64 @@
1
+ import { z } from 'zod';
2
+ import { cU as AgentDefinition, cT as InternalAgentDefinition, cy as ExternalAgentApiInsert, fs as FullGraphDefinitionSchema, t as FullGraphDefinition } from '../utility-CgaoTJn6.cjs';
3
+ export { du as AgentApiInsertSchema, dt as AgentApiSelectSchema, dv as AgentApiUpdateSchema, eF as AgentArtifactComponentApiInsertSchema, eE as AgentArtifactComponentApiSelectSchema, eG as AgentArtifactComponentApiUpdateSchema, eC as AgentArtifactComponentInsertSchema, eB as AgentArtifactComponentSelectSchema, eD as AgentArtifactComponentUpdateSchema, et as AgentDataComponentApiInsertSchema, es as AgentDataComponentApiSelectSchema, eu as AgentDataComponentApiUpdateSchema, eq as AgentDataComponentInsertSchema, ep as AgentDataComponentSelectSchema, er as AgentDataComponentUpdateSchema, dJ as AgentGraphApiInsertSchema, dI as AgentGraphApiSelectSchema, dK as AgentGraphApiUpdateSchema, dG as AgentGraphInsertSchema, dF as AgentGraphSelectSchema, dH as AgentGraphUpdateSchema, dr as AgentInsertSchema, dA as AgentRelationApiInsertSchema, dz as AgentRelationApiSelectSchema, dB as AgentRelationApiUpdateSchema, dx as AgentRelationInsertSchema, dC as AgentRelationQuerySchema, dw as AgentRelationSelectSchema, dy as AgentRelationUpdateSchema, dq as AgentSelectSchema, c as AgentStopWhen, A as AgentStopWhenSchema, fh as AgentToolRelationApiInsertSchema, fg as AgentToolRelationApiSelectSchema, fi as AgentToolRelationApiUpdateSchema, fe as AgentToolRelationInsertSchema, fd as AgentToolRelationSelectSchema, ff as AgentToolRelationUpdateSchema, ds as AgentUpdateSchema, eN as AllAgentSchema, eS as ApiKeyApiCreationResponseSchema, eT as ApiKeyApiInsertSchema, eR as ApiKeyApiSelectSchema, eU as ApiKeyApiUpdateSchema, eP as ApiKeyInsertSchema, eO as ApiKeySelectSchema, eQ as ApiKeyUpdateSchema, ez as ArtifactComponentApiInsertSchema, ey as ArtifactComponentApiSelectSchema, eA as ArtifactComponentApiUpdateSchema, ew as ArtifactComponentInsertSchema, ev as ArtifactComponentSelectSchema, ex as ArtifactComponentUpdateSchema, fr as CanUseItemSchema, eg as ContextCacheApiInsertSchema, ef as ContextCacheApiSelectSchema, eh as ContextCacheApiUpdateSchema, ed as ContextCacheInsertSchema, ec as ContextCacheSelectSchema, ee as ContextCacheUpdateSchema, fb as ContextConfigApiInsertSchema, fa as ContextConfigApiSelectSchema, fc as ContextConfigApiUpdateSchema, f8 as ContextConfigInsertSchema, f7 as ContextConfigSelectSchema, f9 as ContextConfigUpdateSchema, e4 as ConversationApiInsertSchema, e3 as ConversationApiSelectSchema, e5 as ConversationApiUpdateSchema, e1 as ConversationInsertSchema, e0 as ConversationSelectSchema, e2 as ConversationUpdateSchema, eZ as CredentialReferenceApiInsertSchema, eY as CredentialReferenceApiSelectSchema, e_ as CredentialReferenceApiUpdateSchema, eW as CredentialReferenceInsertSchema, eV as CredentialReferenceSelectSchema, eX as CredentialReferenceUpdateSchema, en as DataComponentApiInsertSchema, em as DataComponentApiSelectSchema, eo as DataComponentApiUpdateSchema, ek as DataComponentBaseSchema, ej as DataComponentInsertSchema, ei as DataComponentSelectSchema, el as DataComponentUpdateSchema, fx as ErrorResponseSchema, fy as ExistsResponseSchema, eL as ExternalAgentApiInsertSchema, eK as ExternalAgentApiSelectSchema, eM as ExternalAgentApiUpdateSchema, eI as ExternalAgentInsertSchema, dE as ExternalAgentRelationApiInsertSchema, dD as ExternalAgentRelationInsertSchema, eH as ExternalAgentSelectSchema, eJ as ExternalAgentUpdateSchema, f5 as FetchConfigSchema, f6 as FetchDefinitionSchema, F as FullGraphAgentInsertSchema, fG as FullProjectDefinitionSchema, b as GraphStopWhen, G as GraphStopWhenSchema, ft as GraphWithinContextOfProjectSchema, fH as HeadersScopeSchema, fO as IdParamsSchema, fn as LedgerArtifactApiInsertSchema, fm as LedgerArtifactApiSelectSchema, fo as LedgerArtifactApiUpdateSchema, fk as LedgerArtifactInsertSchema, fj as LedgerArtifactSelectSchema, fl as LedgerArtifactUpdateSchema, fv as ListResponseSchema, dj as MAX_ID_LENGTH, f0 as MCPToolConfigSchema, di as MIN_ID_LENGTH, dZ as McpToolDefinitionSchema, e$ as McpToolSchema, dX as McpTransportConfigSchema, ea as MessageApiInsertSchema, e9 as MessageApiSelectSchema, eb as MessageApiUpdateSchema, e7 as MessageInsertSchema, e6 as MessageSelectSchema, e8 as MessageUpdateSchema, dn as ModelSchema, dm as ModelSettingsSchema, fP as PaginationQueryParamsSchema, fu as PaginationSchema, fE as ProjectApiInsertSchema, fD as ProjectApiSelectSchema, fF as ProjectApiUpdateSchema, fB as ProjectInsertSchema, dp as ProjectModelSchema, fA as ProjectSelectSchema, fC as ProjectUpdateSchema, fz as RemovedResponseSchema, fw as SingleResponseSchema, fp as StatusComponentSchema, fq as StatusUpdateSchema, a as StopWhen, S as StopWhenSchema, dP as TaskApiInsertSchema, dO as TaskApiSelectSchema, dQ as TaskApiUpdateSchema, dM as TaskInsertSchema, dV as TaskRelationApiInsertSchema, dU as TaskRelationApiSelectSchema, dW as TaskRelationApiUpdateSchema, dS as TaskRelationInsertSchema, dR as TaskRelationSelectSchema, dT as TaskRelationUpdateSchema, dL as TaskSelectSchema, dN as TaskUpdateSchema, fN as TenantIdParamsSchema, fI as TenantParamsSchema, fL as TenantProjectGraphIdParamsSchema, fK as TenantProjectGraphParamsSchema, fM as TenantProjectIdParamsSchema, fJ as TenantProjectParamsSchema, f3 as ToolApiInsertSchema, f2 as ToolApiSelectSchema, f4 as ToolApiUpdateSchema, d$ as ToolInsertSchema, d_ as ToolSelectSchema, dY as ToolStatusSchema, f1 as ToolUpdateSchema, dk as URL_SAFE_ID_PATTERN, dl as resourceIdSchema } from '../utility-CgaoTJn6.cjs';
4
+ import 'drizzle-zod';
5
+ import 'drizzle-orm/sqlite-core';
6
+ import '@hono/zod-openapi';
7
+ import '@modelcontextprotocol/sdk/client/streamableHttp.js';
8
+
9
+ declare function isInternalAgent(agent: AgentDefinition): agent is InternalAgentDefinition;
10
+ declare function isExternalAgent(agent: AgentDefinition): agent is ExternalAgentApiInsert;
11
+ declare function validateAndTypeGraphData(data: unknown): z.infer<typeof FullGraphDefinitionSchema>;
12
+ /**
13
+ * Validates that all tool IDs referenced in agents exist in the tools record
14
+ * Note: With scoped architecture, tool validation should be done at the project level
15
+ * This function is kept for backward compatibility but will need project-scoped tool data
16
+ */
17
+ declare function validateToolReferences(graphData: FullGraphDefinition, availableToolIds?: Set<string>): void;
18
+ /**
19
+ * Validates that all dataComponent IDs referenced in agents exist in the dataComponents record
20
+ * Note: With scoped architecture, dataComponent validation should be done at the project level
21
+ */
22
+ declare function validateDataComponentReferences(graphData: FullGraphDefinition, availableDataComponentIds?: Set<string>): void;
23
+ /**
24
+ * Validates that all artifactComponent IDs referenced in agents exist in the artifactComponents record.
25
+ * Note: With scoped architecture, artifactComponent validation should be done at the project level
26
+ */
27
+ declare function validateArtifactComponentReferences(graphData: FullGraphDefinition, availableArtifactComponentIds?: Set<string>): void;
28
+ /**
29
+ * Validates agent relationships (transfer and delegation targets exist)
30
+ */
31
+ declare function validateAgentRelationships(graphData: FullGraphDefinition): void;
32
+ /**
33
+ * Validates the graph structure before creation/update
34
+ * Note: With scoped architecture, project-scoped resource validation should be done at project level
35
+ */
36
+ declare function validateGraphStructure(graphData: FullGraphDefinition, projectResources?: {
37
+ toolIds?: Set<string>;
38
+ dataComponentIds?: Set<string>;
39
+ artifactComponentIds?: Set<string>;
40
+ }): void;
41
+
42
+ /**
43
+ * Valid URL-safe characters for resource IDs based on RFC 3986.
44
+ *
45
+ * Allowed characters:
46
+ * - Letters: a-z, A-Z
47
+ * - Numbers: 0-9
48
+ * - Hyphens: -
49
+ * - Underscores: _
50
+ *
51
+ * Note: While dots (.) and tildes (~) are technically URL-safe,
52
+ * we exclude them for consistency with existing patterns in the codebase.
53
+ */
54
+ /**
55
+ * Helper function to validate if a string is a valid resource ID
56
+ */
57
+ declare function isValidResourceId(id: string): boolean;
58
+ /**
59
+ * Helper function to generate a URL-safe ID from a name or title.
60
+ * Converts to lowercase and replaces invalid characters with hyphens.
61
+ */
62
+ declare function generateIdFromName(name: string): string;
63
+
64
+ export { FullGraphDefinitionSchema, generateIdFromName, isExternalAgent, isInternalAgent, isValidResourceId, validateAgentRelationships, validateAndTypeGraphData, validateArtifactComponentReferences, validateDataComponentReferences, validateGraphStructure, validateToolReferences };
@@ -0,0 +1,64 @@
1
+ import { z } from 'zod';
2
+ import { cU as AgentDefinition, cT as InternalAgentDefinition, cy as ExternalAgentApiInsert, fs as FullGraphDefinitionSchema, t as FullGraphDefinition } from '../utility-CgaoTJn6.js';
3
+ export { du as AgentApiInsertSchema, dt as AgentApiSelectSchema, dv as AgentApiUpdateSchema, eF as AgentArtifactComponentApiInsertSchema, eE as AgentArtifactComponentApiSelectSchema, eG as AgentArtifactComponentApiUpdateSchema, eC as AgentArtifactComponentInsertSchema, eB as AgentArtifactComponentSelectSchema, eD as AgentArtifactComponentUpdateSchema, et as AgentDataComponentApiInsertSchema, es as AgentDataComponentApiSelectSchema, eu as AgentDataComponentApiUpdateSchema, eq as AgentDataComponentInsertSchema, ep as AgentDataComponentSelectSchema, er as AgentDataComponentUpdateSchema, dJ as AgentGraphApiInsertSchema, dI as AgentGraphApiSelectSchema, dK as AgentGraphApiUpdateSchema, dG as AgentGraphInsertSchema, dF as AgentGraphSelectSchema, dH as AgentGraphUpdateSchema, dr as AgentInsertSchema, dA as AgentRelationApiInsertSchema, dz as AgentRelationApiSelectSchema, dB as AgentRelationApiUpdateSchema, dx as AgentRelationInsertSchema, dC as AgentRelationQuerySchema, dw as AgentRelationSelectSchema, dy as AgentRelationUpdateSchema, dq as AgentSelectSchema, c as AgentStopWhen, A as AgentStopWhenSchema, fh as AgentToolRelationApiInsertSchema, fg as AgentToolRelationApiSelectSchema, fi as AgentToolRelationApiUpdateSchema, fe as AgentToolRelationInsertSchema, fd as AgentToolRelationSelectSchema, ff as AgentToolRelationUpdateSchema, ds as AgentUpdateSchema, eN as AllAgentSchema, eS as ApiKeyApiCreationResponseSchema, eT as ApiKeyApiInsertSchema, eR as ApiKeyApiSelectSchema, eU as ApiKeyApiUpdateSchema, eP as ApiKeyInsertSchema, eO as ApiKeySelectSchema, eQ as ApiKeyUpdateSchema, ez as ArtifactComponentApiInsertSchema, ey as ArtifactComponentApiSelectSchema, eA as ArtifactComponentApiUpdateSchema, ew as ArtifactComponentInsertSchema, ev as ArtifactComponentSelectSchema, ex as ArtifactComponentUpdateSchema, fr as CanUseItemSchema, eg as ContextCacheApiInsertSchema, ef as ContextCacheApiSelectSchema, eh as ContextCacheApiUpdateSchema, ed as ContextCacheInsertSchema, ec as ContextCacheSelectSchema, ee as ContextCacheUpdateSchema, fb as ContextConfigApiInsertSchema, fa as ContextConfigApiSelectSchema, fc as ContextConfigApiUpdateSchema, f8 as ContextConfigInsertSchema, f7 as ContextConfigSelectSchema, f9 as ContextConfigUpdateSchema, e4 as ConversationApiInsertSchema, e3 as ConversationApiSelectSchema, e5 as ConversationApiUpdateSchema, e1 as ConversationInsertSchema, e0 as ConversationSelectSchema, e2 as ConversationUpdateSchema, eZ as CredentialReferenceApiInsertSchema, eY as CredentialReferenceApiSelectSchema, e_ as CredentialReferenceApiUpdateSchema, eW as CredentialReferenceInsertSchema, eV as CredentialReferenceSelectSchema, eX as CredentialReferenceUpdateSchema, en as DataComponentApiInsertSchema, em as DataComponentApiSelectSchema, eo as DataComponentApiUpdateSchema, ek as DataComponentBaseSchema, ej as DataComponentInsertSchema, ei as DataComponentSelectSchema, el as DataComponentUpdateSchema, fx as ErrorResponseSchema, fy as ExistsResponseSchema, eL as ExternalAgentApiInsertSchema, eK as ExternalAgentApiSelectSchema, eM as ExternalAgentApiUpdateSchema, eI as ExternalAgentInsertSchema, dE as ExternalAgentRelationApiInsertSchema, dD as ExternalAgentRelationInsertSchema, eH as ExternalAgentSelectSchema, eJ as ExternalAgentUpdateSchema, f5 as FetchConfigSchema, f6 as FetchDefinitionSchema, F as FullGraphAgentInsertSchema, fG as FullProjectDefinitionSchema, b as GraphStopWhen, G as GraphStopWhenSchema, ft as GraphWithinContextOfProjectSchema, fH as HeadersScopeSchema, fO as IdParamsSchema, fn as LedgerArtifactApiInsertSchema, fm as LedgerArtifactApiSelectSchema, fo as LedgerArtifactApiUpdateSchema, fk as LedgerArtifactInsertSchema, fj as LedgerArtifactSelectSchema, fl as LedgerArtifactUpdateSchema, fv as ListResponseSchema, dj as MAX_ID_LENGTH, f0 as MCPToolConfigSchema, di as MIN_ID_LENGTH, dZ as McpToolDefinitionSchema, e$ as McpToolSchema, dX as McpTransportConfigSchema, ea as MessageApiInsertSchema, e9 as MessageApiSelectSchema, eb as MessageApiUpdateSchema, e7 as MessageInsertSchema, e6 as MessageSelectSchema, e8 as MessageUpdateSchema, dn as ModelSchema, dm as ModelSettingsSchema, fP as PaginationQueryParamsSchema, fu as PaginationSchema, fE as ProjectApiInsertSchema, fD as ProjectApiSelectSchema, fF as ProjectApiUpdateSchema, fB as ProjectInsertSchema, dp as ProjectModelSchema, fA as ProjectSelectSchema, fC as ProjectUpdateSchema, fz as RemovedResponseSchema, fw as SingleResponseSchema, fp as StatusComponentSchema, fq as StatusUpdateSchema, a as StopWhen, S as StopWhenSchema, dP as TaskApiInsertSchema, dO as TaskApiSelectSchema, dQ as TaskApiUpdateSchema, dM as TaskInsertSchema, dV as TaskRelationApiInsertSchema, dU as TaskRelationApiSelectSchema, dW as TaskRelationApiUpdateSchema, dS as TaskRelationInsertSchema, dR as TaskRelationSelectSchema, dT as TaskRelationUpdateSchema, dL as TaskSelectSchema, dN as TaskUpdateSchema, fN as TenantIdParamsSchema, fI as TenantParamsSchema, fL as TenantProjectGraphIdParamsSchema, fK as TenantProjectGraphParamsSchema, fM as TenantProjectIdParamsSchema, fJ as TenantProjectParamsSchema, f3 as ToolApiInsertSchema, f2 as ToolApiSelectSchema, f4 as ToolApiUpdateSchema, d$ as ToolInsertSchema, d_ as ToolSelectSchema, dY as ToolStatusSchema, f1 as ToolUpdateSchema, dk as URL_SAFE_ID_PATTERN, dl as resourceIdSchema } from '../utility-CgaoTJn6.js';
4
+ import 'drizzle-zod';
5
+ import 'drizzle-orm/sqlite-core';
6
+ import '@hono/zod-openapi';
7
+ import '@modelcontextprotocol/sdk/client/streamableHttp.js';
8
+
9
+ declare function isInternalAgent(agent: AgentDefinition): agent is InternalAgentDefinition;
10
+ declare function isExternalAgent(agent: AgentDefinition): agent is ExternalAgentApiInsert;
11
+ declare function validateAndTypeGraphData(data: unknown): z.infer<typeof FullGraphDefinitionSchema>;
12
+ /**
13
+ * Validates that all tool IDs referenced in agents exist in the tools record
14
+ * Note: With scoped architecture, tool validation should be done at the project level
15
+ * This function is kept for backward compatibility but will need project-scoped tool data
16
+ */
17
+ declare function validateToolReferences(graphData: FullGraphDefinition, availableToolIds?: Set<string>): void;
18
+ /**
19
+ * Validates that all dataComponent IDs referenced in agents exist in the dataComponents record
20
+ * Note: With scoped architecture, dataComponent validation should be done at the project level
21
+ */
22
+ declare function validateDataComponentReferences(graphData: FullGraphDefinition, availableDataComponentIds?: Set<string>): void;
23
+ /**
24
+ * Validates that all artifactComponent IDs referenced in agents exist in the artifactComponents record.
25
+ * Note: With scoped architecture, artifactComponent validation should be done at the project level
26
+ */
27
+ declare function validateArtifactComponentReferences(graphData: FullGraphDefinition, availableArtifactComponentIds?: Set<string>): void;
28
+ /**
29
+ * Validates agent relationships (transfer and delegation targets exist)
30
+ */
31
+ declare function validateAgentRelationships(graphData: FullGraphDefinition): void;
32
+ /**
33
+ * Validates the graph structure before creation/update
34
+ * Note: With scoped architecture, project-scoped resource validation should be done at project level
35
+ */
36
+ declare function validateGraphStructure(graphData: FullGraphDefinition, projectResources?: {
37
+ toolIds?: Set<string>;
38
+ dataComponentIds?: Set<string>;
39
+ artifactComponentIds?: Set<string>;
40
+ }): void;
41
+
42
+ /**
43
+ * Valid URL-safe characters for resource IDs based on RFC 3986.
44
+ *
45
+ * Allowed characters:
46
+ * - Letters: a-z, A-Z
47
+ * - Numbers: 0-9
48
+ * - Hyphens: -
49
+ * - Underscores: _
50
+ *
51
+ * Note: While dots (.) and tildes (~) are technically URL-safe,
52
+ * we exclude them for consistency with existing patterns in the codebase.
53
+ */
54
+ /**
55
+ * Helper function to validate if a string is a valid resource ID
56
+ */
57
+ declare function isValidResourceId(id: string): boolean;
58
+ /**
59
+ * Helper function to generate a URL-safe ID from a name or title.
60
+ * Converts to lowercase and replaces invalid characters with hyphens.
61
+ */
62
+ declare function generateIdFromName(name: string): string;
63
+
64
+ export { FullGraphDefinitionSchema, generateIdFromName, isExternalAgent, isInternalAgent, isValidResourceId, validateAgentRelationships, validateAndTypeGraphData, validateArtifactComponentReferences, validateDataComponentReferences, validateGraphStructure, validateToolReferences };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inkeep/agents-core",
3
- "version": "0.6.4",
3
+ "version": "0.6.6",
4
4
  "description": "Agents Core contains the database schema, types, and validation schemas for Inkeep Agent Framework, along with core components.",
5
5
  "type": "module",
6
6
  "license": "SEE LICENSE IN LICENSE.md",