@inkeep/agents-core 0.22.9 → 0.22.12
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/{chunk-F3AFTJB7.js → chunk-4SE2FOJY.js} +1 -1
- package/dist/{chunk-PR3DDXVU.js → chunk-5B6IOJZY.js} +1 -0
- package/dist/{chunk-TSKVAFS4.js → chunk-NLZO4BB6.js} +125 -40
- package/dist/client-exports.cjs +1 -0
- package/dist/client-exports.d.cts +2 -2
- package/dist/client-exports.d.ts +2 -2
- package/dist/client-exports.js +2 -2
- package/dist/db/schema.cjs +1 -0
- package/dist/db/schema.d.cts +2 -2
- package/dist/db/schema.d.ts +2 -2
- package/dist/db/schema.js +1 -1
- package/dist/index.cjs +106 -1
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +24 -9
- package/dist/{schema-lnJ7dKE3.d.cts → schema-Bo7m08k2.d.ts} +26 -1
- package/dist/{schema-9o975__r.d.ts → schema-HuJ7Qh0C.d.cts} +26 -1
- package/dist/types/index.d.cts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/dist/{utility-DmLVF565.d.cts → utility-usOTNbMG.d.cts} +142 -0
- package/dist/{utility-DmLVF565.d.ts → utility-usOTNbMG.d.ts} +142 -0
- package/dist/validation/index.cjs +127 -39
- package/dist/validation/index.d.cts +54 -36
- package/dist/validation/index.d.ts +54 -36
- package/dist/validation/index.js +2 -2
- package/drizzle/0010_wet_vampiro.sql +2 -0
- package/drizzle/meta/0010_snapshot.json +2751 -0
- package/drizzle/meta/_journal.json +7 -0
- package/package.json +1 -1
|
@@ -1,11 +1,44 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { d5 as SubAgentDefinition, d4 as InternalSubAgentDefinition, cL as ExternalSubAgentApiInsert, fN as AgentWithinContextOfProjectSchema, z as FullAgentDefinition } from '../utility-
|
|
3
|
-
export { dW as AgentApiInsertSchema, dV as AgentApiSelectSchema, dX as AgentApiUpdateSchema, dT as AgentInsertSchema, gh as AgentListResponse, g1 as AgentResponse, dS as AgentSelectSchema, e as AgentStopWhen, b as AgentStopWhenSchema, dU as AgentUpdateSchema, e_ as AllAgentSchema, f3 as ApiKeyApiCreationResponseSchema, f4 as ApiKeyApiInsertSchema, f2 as ApiKeyApiSelectSchema, A as ApiKeyApiUpdateSchema, f0 as ApiKeyInsertSchema, gl as ApiKeyListResponse, g5 as ApiKeyResponse, e$ as ApiKeySelectSchema, f1 as ApiKeyUpdateSchema, eM as ArtifactComponentApiInsertSchema, eL as ArtifactComponentApiSelectSchema, eN as ArtifactComponentApiUpdateSchema, eJ as ArtifactComponentInsertSchema, gq as ArtifactComponentListResponse, ga as ArtifactComponentResponse, eI as ArtifactComponentSelectSchema, eK as ArtifactComponentUpdateSchema, fM as CanUseItemSchema, et as ContextCacheApiInsertSchema, es as ContextCacheApiSelectSchema, eu as ContextCacheApiUpdateSchema, eq as ContextCacheInsertSchema, ep as ContextCacheSelectSchema, er as ContextCacheUpdateSchema, fw as ContextConfigApiInsertSchema, fv as ContextConfigApiSelectSchema, fx as ContextConfigApiUpdateSchema, ft as ContextConfigInsertSchema, gk as ContextConfigListResponse, g4 as ContextConfigResponse, fs as ContextConfigSelectSchema, fu as ContextConfigUpdateSchema, eh as ConversationApiInsertSchema, eg as ConversationApiSelectSchema, ei as ConversationApiUpdateSchema, ee as ConversationInsertSchema, gt as ConversationListResponse, gd as ConversationResponse, ed as ConversationSelectSchema, ef as ConversationUpdateSchema, f9 as CredentialReferenceApiInsertSchema, f8 as CredentialReferenceApiSelectSchema, fa as CredentialReferenceApiUpdateSchema, f6 as CredentialReferenceInsertSchema, gm as CredentialReferenceListResponse, g6 as CredentialReferenceResponse, f5 as CredentialReferenceSelectSchema, f7 as CredentialReferenceUpdateSchema, eA as DataComponentApiInsertSchema, ez as DataComponentApiSelectSchema, eB as DataComponentApiUpdateSchema, ex as DataComponentBaseSchema, ew as DataComponentInsertSchema, gp as DataComponentListResponse, g9 as DataComponentResponse, ev as DataComponentSelectSchema, ey as DataComponentUpdateSchema, fR as ErrorResponseSchema, fS as ExistsResponseSchema, eY as ExternalAgentApiInsertSchema, eX as ExternalAgentApiSelectSchema, eZ as ExternalAgentApiUpdateSchema, eV as ExternalAgentInsertSchema, gj as ExternalAgentListResponse, g3 as ExternalAgentResponse, eU as ExternalAgentSelectSchema, eW as ExternalAgentUpdateSchema, dR as ExternalSubAgentRelationApiInsertSchema, dQ as ExternalSubAgentRelationInsertSchema, fq as FetchConfigSchema, fr as FetchDefinitionSchema, a as FullAgentAgentInsertSchema, f_ as FullProjectDefinitionSchema, F as FunctionApiInsertSchema, j as FunctionApiSelectSchema, k as FunctionApiUpdateSchema, fo as FunctionInsertSchema, gn as FunctionListResponse, g7 as FunctionResponse, fn as FunctionSelectSchema, fl as FunctionToolApiInsertSchema, fk as FunctionToolApiSelectSchema, fm as FunctionToolApiUpdateSchema, dC as FunctionToolConfig, dB as FunctionToolConfigSchema, fi as FunctionToolInsertSchema, go as FunctionToolListResponse, g8 as FunctionToolResponse, fh as FunctionToolSelectSchema, fj as FunctionToolUpdateSchema, fp as FunctionUpdateSchema, gz as HeadersScopeSchema, fI as LedgerArtifactApiInsertSchema, fH as LedgerArtifactApiSelectSchema, fJ as LedgerArtifactApiUpdateSchema, fF as LedgerArtifactInsertSchema, fE as LedgerArtifactSelectSchema, fG as LedgerArtifactUpdateSchema, fP as ListResponseSchema, dw as MAX_ID_LENGTH, fc as MCPToolConfigSchema, dv as MIN_ID_LENGTH, ea as McpToolDefinitionSchema, fb as McpToolSchema, e8 as McpTransportConfigSchema, en as MessageApiInsertSchema, em as MessageApiSelectSchema, eo as MessageApiUpdateSchema, ek as MessageInsertSchema, gu as MessageListResponse, ge as MessageResponse, ej as MessageSelectSchema, el as MessageUpdateSchema, dz as ModelSchema, g as ModelSettings, M as ModelSettingsSchema, gI as PaginationQueryParamsSchema, fO as PaginationSchema, fY as ProjectApiInsertSchema, fX as ProjectApiSelectSchema, fZ as ProjectApiUpdateSchema, fV as ProjectInsertSchema, gf as ProjectListResponse, dA as ProjectModelSchema, f$ as ProjectResponse, fU as ProjectSelectSchema, fW as ProjectUpdateSchema, fT as RemovedResponseSchema, fQ as SingleResponseSchema, fK as StatusComponentSchema, fL as StatusUpdateSchema, d as StopWhen, S as StopWhenSchema, dH as SubAgentApiInsertSchema, dG as SubAgentApiSelectSchema, dI as SubAgentApiUpdateSchema, eS as SubAgentArtifactComponentApiInsertSchema, eR as SubAgentArtifactComponentApiSelectSchema, eT as SubAgentArtifactComponentApiUpdateSchema, eP as SubAgentArtifactComponentInsertSchema, gy as SubAgentArtifactComponentListResponse, gw as SubAgentArtifactComponentResponse, eO as SubAgentArtifactComponentSelectSchema, eQ as SubAgentArtifactComponentUpdateSchema, eG as SubAgentDataComponentApiInsertSchema, eF as SubAgentDataComponentApiSelectSchema, eH as SubAgentDataComponentApiUpdateSchema, eD as SubAgentDataComponentInsertSchema, gx as SubAgentDataComponentListResponse, gv as SubAgentDataComponentResponse, eC as SubAgentDataComponentSelectSchema, eE as SubAgentDataComponentUpdateSchema, dE as SubAgentInsertSchema, gg as SubAgentListResponse, dN as SubAgentRelationApiInsertSchema, dM as SubAgentRelationApiSelectSchema, dO as SubAgentRelationApiUpdateSchema, dK as SubAgentRelationInsertSchema, gr as SubAgentRelationListResponse, dP as SubAgentRelationQuerySchema, gb as SubAgentRelationResponse, dJ as SubAgentRelationSelectSchema, dL as SubAgentRelationUpdateSchema, g0 as SubAgentResponse, dD as SubAgentSelectSchema, f as SubAgentStopWhen, c as SubAgentStopWhenSchema, fC as SubAgentToolRelationApiInsertSchema, fB as SubAgentToolRelationApiSelectSchema, fD as SubAgentToolRelationApiUpdateSchema, fz as SubAgentToolRelationInsertSchema, gs as SubAgentToolRelationListResponse, gc as SubAgentToolRelationResponse, fy as SubAgentToolRelationSelectSchema, fA as SubAgentToolRelationUpdateSchema, dF as SubAgentUpdateSchema, e0 as TaskApiInsertSchema, d$ as TaskApiSelectSchema, e1 as TaskApiUpdateSchema, dZ as TaskInsertSchema, e6 as TaskRelationApiInsertSchema, e5 as TaskRelationApiSelectSchema, e7 as TaskRelationApiUpdateSchema, e3 as TaskRelationInsertSchema, e2 as TaskRelationSelectSchema, e4 as TaskRelationUpdateSchema, dY as TaskSelectSchema, d_ as TaskUpdateSchema, gB as TenantIdParamsSchema, gA as TenantParamsSchema, gF as TenantProjectAgentIdParamsSchema, gE as TenantProjectAgentParamsSchema, gH as TenantProjectAgentSubAgentIdParamsSchema, gG as TenantProjectAgentSubAgentParamsSchema, gD as TenantProjectIdParamsSchema, gC as TenantProjectParamsSchema, ff as ToolApiInsertSchema, fe as ToolApiSelectSchema, fg as ToolApiUpdateSchema, ec as ToolInsertSchema, gi as ToolListResponse, g2 as ToolResponse, eb as ToolSelectSchema, e9 as ToolStatusSchema, fd as ToolUpdateSchema, dx as URL_SAFE_ID_PATTERN, dy as resourceIdSchema } from '../utility-
|
|
2
|
+
import { d5 as SubAgentDefinition, d4 as InternalSubAgentDefinition, cL as ExternalSubAgentApiInsert, fN as AgentWithinContextOfProjectSchema, z as FullAgentDefinition } from '../utility-usOTNbMG.js';
|
|
3
|
+
export { dW as AgentApiInsertSchema, dV as AgentApiSelectSchema, dX as AgentApiUpdateSchema, dT as AgentInsertSchema, gh as AgentListResponse, g1 as AgentResponse, dS as AgentSelectSchema, e as AgentStopWhen, b as AgentStopWhenSchema, dU as AgentUpdateSchema, e_ as AllAgentSchema, f3 as ApiKeyApiCreationResponseSchema, f4 as ApiKeyApiInsertSchema, f2 as ApiKeyApiSelectSchema, A as ApiKeyApiUpdateSchema, f0 as ApiKeyInsertSchema, gl as ApiKeyListResponse, g5 as ApiKeyResponse, e$ as ApiKeySelectSchema, f1 as ApiKeyUpdateSchema, eM as ArtifactComponentApiInsertSchema, eL as ArtifactComponentApiSelectSchema, eN as ArtifactComponentApiUpdateSchema, eJ as ArtifactComponentInsertSchema, gq as ArtifactComponentListResponse, ga as ArtifactComponentResponse, eI as ArtifactComponentSelectSchema, eK as ArtifactComponentUpdateSchema, fM as CanUseItemSchema, et as ContextCacheApiInsertSchema, es as ContextCacheApiSelectSchema, eu as ContextCacheApiUpdateSchema, eq as ContextCacheInsertSchema, ep as ContextCacheSelectSchema, er as ContextCacheUpdateSchema, fw as ContextConfigApiInsertSchema, fv as ContextConfigApiSelectSchema, fx as ContextConfigApiUpdateSchema, ft as ContextConfigInsertSchema, gk as ContextConfigListResponse, g4 as ContextConfigResponse, fs as ContextConfigSelectSchema, fu as ContextConfigUpdateSchema, eh as ConversationApiInsertSchema, eg as ConversationApiSelectSchema, ei as ConversationApiUpdateSchema, ee as ConversationInsertSchema, gt as ConversationListResponse, gd as ConversationResponse, ed as ConversationSelectSchema, ef as ConversationUpdateSchema, f9 as CredentialReferenceApiInsertSchema, f8 as CredentialReferenceApiSelectSchema, fa as CredentialReferenceApiUpdateSchema, f6 as CredentialReferenceInsertSchema, gm as CredentialReferenceListResponse, g6 as CredentialReferenceResponse, f5 as CredentialReferenceSelectSchema, f7 as CredentialReferenceUpdateSchema, eA as DataComponentApiInsertSchema, ez as DataComponentApiSelectSchema, eB as DataComponentApiUpdateSchema, ex as DataComponentBaseSchema, ew as DataComponentInsertSchema, gp as DataComponentListResponse, g9 as DataComponentResponse, ev as DataComponentSelectSchema, ey as DataComponentUpdateSchema, fR as ErrorResponseSchema, fS as ExistsResponseSchema, eY as ExternalAgentApiInsertSchema, eX as ExternalAgentApiSelectSchema, eZ as ExternalAgentApiUpdateSchema, eV as ExternalAgentInsertSchema, gj as ExternalAgentListResponse, g3 as ExternalAgentResponse, eU as ExternalAgentSelectSchema, eW as ExternalAgentUpdateSchema, dR as ExternalSubAgentRelationApiInsertSchema, dQ as ExternalSubAgentRelationInsertSchema, fq as FetchConfigSchema, fr as FetchDefinitionSchema, a as FullAgentAgentInsertSchema, f_ as FullProjectDefinitionSchema, F as FunctionApiInsertSchema, j as FunctionApiSelectSchema, k as FunctionApiUpdateSchema, fo as FunctionInsertSchema, gn as FunctionListResponse, g7 as FunctionResponse, fn as FunctionSelectSchema, fl as FunctionToolApiInsertSchema, fk as FunctionToolApiSelectSchema, fm as FunctionToolApiUpdateSchema, dC as FunctionToolConfig, dB as FunctionToolConfigSchema, fi as FunctionToolInsertSchema, go as FunctionToolListResponse, g8 as FunctionToolResponse, fh as FunctionToolSelectSchema, fj as FunctionToolUpdateSchema, fp as FunctionUpdateSchema, gz as HeadersScopeSchema, fI as LedgerArtifactApiInsertSchema, fH as LedgerArtifactApiSelectSchema, fJ as LedgerArtifactApiUpdateSchema, fF as LedgerArtifactInsertSchema, fE as LedgerArtifactSelectSchema, fG as LedgerArtifactUpdateSchema, fP as ListResponseSchema, dw as MAX_ID_LENGTH, fc as MCPToolConfigSchema, dv as MIN_ID_LENGTH, ea as McpToolDefinitionSchema, fb as McpToolSchema, e8 as McpTransportConfigSchema, en as MessageApiInsertSchema, em as MessageApiSelectSchema, eo as MessageApiUpdateSchema, ek as MessageInsertSchema, gu as MessageListResponse, ge as MessageResponse, ej as MessageSelectSchema, el as MessageUpdateSchema, dz as ModelSchema, g as ModelSettings, M as ModelSettingsSchema, gI as PaginationQueryParamsSchema, fO as PaginationSchema, fY as ProjectApiInsertSchema, fX as ProjectApiSelectSchema, fZ as ProjectApiUpdateSchema, fV as ProjectInsertSchema, gf as ProjectListResponse, dA as ProjectModelSchema, f$ as ProjectResponse, fU as ProjectSelectSchema, fW as ProjectUpdateSchema, fT as RemovedResponseSchema, fQ as SingleResponseSchema, fK as StatusComponentSchema, fL as StatusUpdateSchema, d as StopWhen, S as StopWhenSchema, dH as SubAgentApiInsertSchema, dG as SubAgentApiSelectSchema, dI as SubAgentApiUpdateSchema, eS as SubAgentArtifactComponentApiInsertSchema, eR as SubAgentArtifactComponentApiSelectSchema, eT as SubAgentArtifactComponentApiUpdateSchema, eP as SubAgentArtifactComponentInsertSchema, gy as SubAgentArtifactComponentListResponse, gw as SubAgentArtifactComponentResponse, eO as SubAgentArtifactComponentSelectSchema, eQ as SubAgentArtifactComponentUpdateSchema, eG as SubAgentDataComponentApiInsertSchema, eF as SubAgentDataComponentApiSelectSchema, eH as SubAgentDataComponentApiUpdateSchema, eD as SubAgentDataComponentInsertSchema, gx as SubAgentDataComponentListResponse, gv as SubAgentDataComponentResponse, eC as SubAgentDataComponentSelectSchema, eE as SubAgentDataComponentUpdateSchema, dE as SubAgentInsertSchema, gg as SubAgentListResponse, dN as SubAgentRelationApiInsertSchema, dM as SubAgentRelationApiSelectSchema, dO as SubAgentRelationApiUpdateSchema, dK as SubAgentRelationInsertSchema, gr as SubAgentRelationListResponse, dP as SubAgentRelationQuerySchema, gb as SubAgentRelationResponse, dJ as SubAgentRelationSelectSchema, dL as SubAgentRelationUpdateSchema, g0 as SubAgentResponse, dD as SubAgentSelectSchema, f as SubAgentStopWhen, c as SubAgentStopWhenSchema, fC as SubAgentToolRelationApiInsertSchema, fB as SubAgentToolRelationApiSelectSchema, fD as SubAgentToolRelationApiUpdateSchema, fz as SubAgentToolRelationInsertSchema, gs as SubAgentToolRelationListResponse, gc as SubAgentToolRelationResponse, fy as SubAgentToolRelationSelectSchema, fA as SubAgentToolRelationUpdateSchema, dF as SubAgentUpdateSchema, e0 as TaskApiInsertSchema, d$ as TaskApiSelectSchema, e1 as TaskApiUpdateSchema, dZ as TaskInsertSchema, e6 as TaskRelationApiInsertSchema, e5 as TaskRelationApiSelectSchema, e7 as TaskRelationApiUpdateSchema, e3 as TaskRelationInsertSchema, e2 as TaskRelationSelectSchema, e4 as TaskRelationUpdateSchema, dY as TaskSelectSchema, d_ as TaskUpdateSchema, gB as TenantIdParamsSchema, gA as TenantParamsSchema, gF as TenantProjectAgentIdParamsSchema, gE as TenantProjectAgentParamsSchema, gH as TenantProjectAgentSubAgentIdParamsSchema, gG as TenantProjectAgentSubAgentParamsSchema, gD as TenantProjectIdParamsSchema, gC as TenantProjectParamsSchema, ff as ToolApiInsertSchema, fe as ToolApiSelectSchema, fg as ToolApiUpdateSchema, ec as ToolInsertSchema, gi as ToolListResponse, g2 as ToolResponse, eb as ToolSelectSchema, e9 as ToolStatusSchema, fd as ToolUpdateSchema, dx as URL_SAFE_ID_PATTERN, dy as resourceIdSchema } from '../utility-usOTNbMG.js';
|
|
4
4
|
export { P as PropsValidationResult, v as validatePropsAsJsonSchema } from '../props-validation-BMR1qNiy.js';
|
|
5
5
|
import 'drizzle-zod';
|
|
6
6
|
import 'drizzle-orm/sqlite-core';
|
|
7
7
|
import '@hono/zod-openapi';
|
|
8
8
|
|
|
9
|
+
declare function isInternalAgent(agent: SubAgentDefinition): agent is InternalSubAgentDefinition;
|
|
10
|
+
declare function isExternalAgent(agent: SubAgentDefinition): agent is ExternalSubAgentApiInsert;
|
|
11
|
+
declare function validateAndTypeAgentData(data: unknown): z.infer<typeof AgentWithinContextOfProjectSchema>;
|
|
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(agentData: FullAgentDefinition, 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(agentData: FullAgentDefinition, 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(agentData: FullAgentDefinition, availableArtifactComponentIds?: Set<string>): void;
|
|
28
|
+
/**
|
|
29
|
+
* Validates agent relationships (transfer and delegation targets exist)
|
|
30
|
+
*/
|
|
31
|
+
declare function validateAgentRelationships(agentData: FullAgentDefinition): void;
|
|
32
|
+
/**
|
|
33
|
+
* Validates the agent structure before creation/update
|
|
34
|
+
* Note: With scoped architecture, project-scoped resource validation should be done at project level
|
|
35
|
+
*/
|
|
36
|
+
declare function validateAgentStructure(agentData: FullAgentDefinition, projectResources?: {
|
|
37
|
+
toolIds?: Set<string>;
|
|
38
|
+
dataComponentIds?: Set<string>;
|
|
39
|
+
artifactComponentIds?: Set<string>;
|
|
40
|
+
}): void;
|
|
41
|
+
|
|
9
42
|
/**
|
|
10
43
|
* Agent transfer event data
|
|
11
44
|
* Used when an agent transfers control to another agent
|
|
@@ -78,39 +111,6 @@ declare const A2AMessageMetadataSchema: z.ZodObject<{
|
|
|
78
111
|
}, z.core.$strip>;
|
|
79
112
|
type A2AMessageMetadata = z.infer<typeof A2AMessageMetadataSchema>;
|
|
80
113
|
|
|
81
|
-
declare function isInternalAgent(agent: SubAgentDefinition): agent is InternalSubAgentDefinition;
|
|
82
|
-
declare function isExternalAgent(agent: SubAgentDefinition): agent is ExternalSubAgentApiInsert;
|
|
83
|
-
declare function validateAndTypeAgentData(data: unknown): z.infer<typeof AgentWithinContextOfProjectSchema>;
|
|
84
|
-
/**
|
|
85
|
-
* Validates that all tool IDs referenced in agents exist in the tools record
|
|
86
|
-
* Note: With scoped architecture, tool validation should be done at the project level
|
|
87
|
-
* This function is kept for backward compatibility but will need project-scoped tool data
|
|
88
|
-
*/
|
|
89
|
-
declare function validateToolReferences(agentData: FullAgentDefinition, availableToolIds?: Set<string>): void;
|
|
90
|
-
/**
|
|
91
|
-
* Validates that all dataComponent IDs referenced in agents exist in the dataComponents record
|
|
92
|
-
* Note: With scoped architecture, dataComponent validation should be done at the project level
|
|
93
|
-
*/
|
|
94
|
-
declare function validateDataComponentReferences(agentData: FullAgentDefinition, availableDataComponentIds?: Set<string>): void;
|
|
95
|
-
/**
|
|
96
|
-
* Validates that all artifactComponent IDs referenced in agents exist in the artifactComponents record.
|
|
97
|
-
* Note: With scoped architecture, artifactComponent validation should be done at the project level
|
|
98
|
-
*/
|
|
99
|
-
declare function validateArtifactComponentReferences(agentData: FullAgentDefinition, availableArtifactComponentIds?: Set<string>): void;
|
|
100
|
-
/**
|
|
101
|
-
* Validates agent relationships (transfer and delegation targets exist)
|
|
102
|
-
*/
|
|
103
|
-
declare function validateAgentRelationships(agentData: FullAgentDefinition): void;
|
|
104
|
-
/**
|
|
105
|
-
* Validates the agent structure before creation/update
|
|
106
|
-
* Note: With scoped architecture, project-scoped resource validation should be done at project level
|
|
107
|
-
*/
|
|
108
|
-
declare function validateAgentStructure(agentData: FullAgentDefinition, projectResources?: {
|
|
109
|
-
toolIds?: Set<string>;
|
|
110
|
-
dataComponentIds?: Set<string>;
|
|
111
|
-
artifactComponentIds?: Set<string>;
|
|
112
|
-
}): void;
|
|
113
|
-
|
|
114
114
|
/**
|
|
115
115
|
* Valid URL-safe characters for resource IDs based on RFC 3986.
|
|
116
116
|
*
|
|
@@ -133,4 +133,22 @@ declare function isValidResourceId(id: string): boolean;
|
|
|
133
133
|
*/
|
|
134
134
|
declare function generateIdFromName(name: string): string;
|
|
135
135
|
|
|
136
|
-
|
|
136
|
+
/**
|
|
137
|
+
* Validation utilities for component preview code
|
|
138
|
+
*/
|
|
139
|
+
interface PreviewValidationResult {
|
|
140
|
+
isValid: boolean;
|
|
141
|
+
errors: Array<{
|
|
142
|
+
field: string;
|
|
143
|
+
message: string;
|
|
144
|
+
}>;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Validates component preview code and data
|
|
148
|
+
*/
|
|
149
|
+
declare function validatePreview(preview: {
|
|
150
|
+
code: string;
|
|
151
|
+
data: Record<string, unknown>;
|
|
152
|
+
}): PreviewValidationResult;
|
|
153
|
+
|
|
154
|
+
export { type A2AMessageMetadata, A2AMessageMetadataSchema, AgentWithinContextOfProjectSchema, type DataOperationDetails, DataOperationDetailsSchema, type DataOperationEvent, DataOperationEventSchema, type DelegationReturnedData, DelegationReturnedDataSchema, type DelegationSentData, DelegationSentDataSchema, type PreviewValidationResult, type TransferData, TransferDataSchema, generateIdFromName, isExternalAgent, isInternalAgent, isValidResourceId, validateAgentRelationships, validateAgentStructure, validateAndTypeAgentData, validateArtifactComponentReferences, validateDataComponentReferences, validatePreview, validateToolReferences };
|
package/dist/validation/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { A2AMessageMetadataSchema, DataOperationDetailsSchema, DataOperationEventSchema, DelegationReturnedDataSchema, DelegationSentDataSchema, TransferDataSchema, generateIdFromName, isExternalAgent, isInternalAgent, isValidResourceId, validateAgentRelationships, validateAgentStructure, validateAndTypeAgentData, validateArtifactComponentReferences, validateDataComponentReferences, validateToolReferences } from '../chunk-
|
|
2
|
-
export { AgentApiInsertSchema, AgentApiSelectSchema, AgentApiUpdateSchema, AgentInsertSchema, AgentListResponse, AgentResponse, AgentSelectSchema, AgentStopWhenSchema, AgentUpdateSchema, AgentWithinContextOfProjectSchema, AllAgentSchema, ApiKeyApiCreationResponseSchema, ApiKeyApiInsertSchema, ApiKeyApiSelectSchema, ApiKeyApiUpdateSchema, ApiKeyInsertSchema, ApiKeyListResponse, ApiKeyResponse, ApiKeySelectSchema, ApiKeyUpdateSchema, ArtifactComponentApiInsertSchema, ArtifactComponentApiSelectSchema, ArtifactComponentApiUpdateSchema, ArtifactComponentInsertSchema, ArtifactComponentListResponse, ArtifactComponentResponse, ArtifactComponentSelectSchema, ArtifactComponentUpdateSchema, CanUseItemSchema, ContextCacheApiInsertSchema, ContextCacheApiSelectSchema, ContextCacheApiUpdateSchema, ContextCacheInsertSchema, ContextCacheSelectSchema, ContextCacheUpdateSchema, ContextConfigApiInsertSchema, ContextConfigApiSelectSchema, ContextConfigApiUpdateSchema, ContextConfigInsertSchema, ContextConfigListResponse, ContextConfigResponse, ContextConfigSelectSchema, ContextConfigUpdateSchema, ConversationApiInsertSchema, ConversationApiSelectSchema, ConversationApiUpdateSchema, ConversationInsertSchema, ConversationListResponse, ConversationResponse, ConversationSelectSchema, ConversationUpdateSchema, CredentialReferenceApiInsertSchema, CredentialReferenceApiSelectSchema, CredentialReferenceApiUpdateSchema, CredentialReferenceInsertSchema, CredentialReferenceListResponse, CredentialReferenceResponse, CredentialReferenceSelectSchema, CredentialReferenceUpdateSchema, DataComponentApiInsertSchema, DataComponentApiSelectSchema, DataComponentApiUpdateSchema, DataComponentBaseSchema, DataComponentInsertSchema, DataComponentListResponse, DataComponentResponse, DataComponentSelectSchema, DataComponentUpdateSchema, ErrorResponseSchema, ExistsResponseSchema, ExternalAgentApiInsertSchema, ExternalAgentApiSelectSchema, ExternalAgentApiUpdateSchema, ExternalAgentInsertSchema, ExternalAgentListResponse, ExternalAgentResponse, ExternalAgentSelectSchema, ExternalAgentUpdateSchema, ExternalSubAgentRelationApiInsertSchema, ExternalSubAgentRelationInsertSchema, FetchConfigSchema, FetchDefinitionSchema, FullAgentAgentInsertSchema, FullProjectDefinitionSchema, FunctionApiInsertSchema, FunctionApiSelectSchema, FunctionApiUpdateSchema, FunctionInsertSchema, FunctionListResponse, FunctionResponse, FunctionSelectSchema, FunctionToolApiInsertSchema, FunctionToolApiSelectSchema, FunctionToolApiUpdateSchema, FunctionToolConfigSchema, FunctionToolInsertSchema, FunctionToolListResponse, FunctionToolResponse, FunctionToolSelectSchema, FunctionToolUpdateSchema, FunctionUpdateSchema, HeadersScopeSchema, LedgerArtifactApiInsertSchema, LedgerArtifactApiSelectSchema, LedgerArtifactApiUpdateSchema, LedgerArtifactInsertSchema, LedgerArtifactSelectSchema, LedgerArtifactUpdateSchema, ListResponseSchema, MAX_ID_LENGTH, MCPToolConfigSchema, MIN_ID_LENGTH, McpToolDefinitionSchema, McpToolSchema, McpTransportConfigSchema, MessageApiInsertSchema, MessageApiSelectSchema, MessageApiUpdateSchema, MessageInsertSchema, MessageListResponse, MessageResponse, MessageSelectSchema, MessageUpdateSchema, ModelSchema, ModelSettingsSchema, PaginationQueryParamsSchema, PaginationSchema, ProjectApiInsertSchema, ProjectApiSelectSchema, ProjectApiUpdateSchema, ProjectInsertSchema, ProjectListResponse, ProjectModelSchema, ProjectResponse, ProjectSelectSchema, ProjectUpdateSchema, RemovedResponseSchema, SingleResponseSchema, StatusComponentSchema, StatusUpdateSchema, StopWhenSchema, SubAgentApiInsertSchema, SubAgentApiSelectSchema, SubAgentApiUpdateSchema, SubAgentArtifactComponentApiInsertSchema, SubAgentArtifactComponentApiSelectSchema, SubAgentArtifactComponentApiUpdateSchema, SubAgentArtifactComponentInsertSchema, SubAgentArtifactComponentListResponse, SubAgentArtifactComponentResponse, SubAgentArtifactComponentSelectSchema, SubAgentArtifactComponentUpdateSchema, SubAgentDataComponentApiInsertSchema, SubAgentDataComponentApiSelectSchema, SubAgentDataComponentApiUpdateSchema, SubAgentDataComponentInsertSchema, SubAgentDataComponentListResponse, SubAgentDataComponentResponse, SubAgentDataComponentSelectSchema, SubAgentDataComponentUpdateSchema, SubAgentInsertSchema, SubAgentListResponse, SubAgentRelationApiInsertSchema, SubAgentRelationApiSelectSchema, SubAgentRelationApiUpdateSchema, SubAgentRelationInsertSchema, SubAgentRelationListResponse, SubAgentRelationQuerySchema, SubAgentRelationResponse, SubAgentRelationSelectSchema, SubAgentRelationUpdateSchema, SubAgentResponse, SubAgentSelectSchema, SubAgentStopWhenSchema, SubAgentToolRelationApiInsertSchema, SubAgentToolRelationApiSelectSchema, SubAgentToolRelationApiUpdateSchema, SubAgentToolRelationInsertSchema, SubAgentToolRelationListResponse, SubAgentToolRelationResponse, SubAgentToolRelationSelectSchema, SubAgentToolRelationUpdateSchema, SubAgentUpdateSchema, TaskApiInsertSchema, TaskApiSelectSchema, TaskApiUpdateSchema, TaskInsertSchema, TaskRelationApiInsertSchema, TaskRelationApiSelectSchema, TaskRelationApiUpdateSchema, TaskRelationInsertSchema, TaskRelationSelectSchema, TaskRelationUpdateSchema, TaskSelectSchema, TaskUpdateSchema, TenantIdParamsSchema, TenantParamsSchema, TenantProjectAgentIdParamsSchema, TenantProjectAgentParamsSchema, TenantProjectAgentSubAgentIdParamsSchema, TenantProjectAgentSubAgentParamsSchema, TenantProjectIdParamsSchema, TenantProjectParamsSchema, ToolApiInsertSchema, ToolApiSelectSchema, ToolApiUpdateSchema, ToolInsertSchema, ToolListResponse, ToolResponse, ToolSelectSchema, ToolStatusSchema, ToolUpdateSchema, URL_SAFE_ID_PATTERN, resourceIdSchema, validatePropsAsJsonSchema } from '../chunk-
|
|
1
|
+
export { A2AMessageMetadataSchema, DataOperationDetailsSchema, DataOperationEventSchema, DelegationReturnedDataSchema, DelegationSentDataSchema, TransferDataSchema, generateIdFromName, isExternalAgent, isInternalAgent, isValidResourceId, validateAgentRelationships, validateAgentStructure, validateAndTypeAgentData, validateArtifactComponentReferences, validateDataComponentReferences, validatePreview, validateToolReferences } from '../chunk-NLZO4BB6.js';
|
|
2
|
+
export { AgentApiInsertSchema, AgentApiSelectSchema, AgentApiUpdateSchema, AgentInsertSchema, AgentListResponse, AgentResponse, AgentSelectSchema, AgentStopWhenSchema, AgentUpdateSchema, AgentWithinContextOfProjectSchema, AllAgentSchema, ApiKeyApiCreationResponseSchema, ApiKeyApiInsertSchema, ApiKeyApiSelectSchema, ApiKeyApiUpdateSchema, ApiKeyInsertSchema, ApiKeyListResponse, ApiKeyResponse, ApiKeySelectSchema, ApiKeyUpdateSchema, ArtifactComponentApiInsertSchema, ArtifactComponentApiSelectSchema, ArtifactComponentApiUpdateSchema, ArtifactComponentInsertSchema, ArtifactComponentListResponse, ArtifactComponentResponse, ArtifactComponentSelectSchema, ArtifactComponentUpdateSchema, CanUseItemSchema, ContextCacheApiInsertSchema, ContextCacheApiSelectSchema, ContextCacheApiUpdateSchema, ContextCacheInsertSchema, ContextCacheSelectSchema, ContextCacheUpdateSchema, ContextConfigApiInsertSchema, ContextConfigApiSelectSchema, ContextConfigApiUpdateSchema, ContextConfigInsertSchema, ContextConfigListResponse, ContextConfigResponse, ContextConfigSelectSchema, ContextConfigUpdateSchema, ConversationApiInsertSchema, ConversationApiSelectSchema, ConversationApiUpdateSchema, ConversationInsertSchema, ConversationListResponse, ConversationResponse, ConversationSelectSchema, ConversationUpdateSchema, CredentialReferenceApiInsertSchema, CredentialReferenceApiSelectSchema, CredentialReferenceApiUpdateSchema, CredentialReferenceInsertSchema, CredentialReferenceListResponse, CredentialReferenceResponse, CredentialReferenceSelectSchema, CredentialReferenceUpdateSchema, DataComponentApiInsertSchema, DataComponentApiSelectSchema, DataComponentApiUpdateSchema, DataComponentBaseSchema, DataComponentInsertSchema, DataComponentListResponse, DataComponentResponse, DataComponentSelectSchema, DataComponentUpdateSchema, ErrorResponseSchema, ExistsResponseSchema, ExternalAgentApiInsertSchema, ExternalAgentApiSelectSchema, ExternalAgentApiUpdateSchema, ExternalAgentInsertSchema, ExternalAgentListResponse, ExternalAgentResponse, ExternalAgentSelectSchema, ExternalAgentUpdateSchema, ExternalSubAgentRelationApiInsertSchema, ExternalSubAgentRelationInsertSchema, FetchConfigSchema, FetchDefinitionSchema, FullAgentAgentInsertSchema, FullProjectDefinitionSchema, FunctionApiInsertSchema, FunctionApiSelectSchema, FunctionApiUpdateSchema, FunctionInsertSchema, FunctionListResponse, FunctionResponse, FunctionSelectSchema, FunctionToolApiInsertSchema, FunctionToolApiSelectSchema, FunctionToolApiUpdateSchema, FunctionToolConfigSchema, FunctionToolInsertSchema, FunctionToolListResponse, FunctionToolResponse, FunctionToolSelectSchema, FunctionToolUpdateSchema, FunctionUpdateSchema, HeadersScopeSchema, LedgerArtifactApiInsertSchema, LedgerArtifactApiSelectSchema, LedgerArtifactApiUpdateSchema, LedgerArtifactInsertSchema, LedgerArtifactSelectSchema, LedgerArtifactUpdateSchema, ListResponseSchema, MAX_ID_LENGTH, MCPToolConfigSchema, MIN_ID_LENGTH, McpToolDefinitionSchema, McpToolSchema, McpTransportConfigSchema, MessageApiInsertSchema, MessageApiSelectSchema, MessageApiUpdateSchema, MessageInsertSchema, MessageListResponse, MessageResponse, MessageSelectSchema, MessageUpdateSchema, ModelSchema, ModelSettingsSchema, PaginationQueryParamsSchema, PaginationSchema, ProjectApiInsertSchema, ProjectApiSelectSchema, ProjectApiUpdateSchema, ProjectInsertSchema, ProjectListResponse, ProjectModelSchema, ProjectResponse, ProjectSelectSchema, ProjectUpdateSchema, RemovedResponseSchema, SingleResponseSchema, StatusComponentSchema, StatusUpdateSchema, StopWhenSchema, SubAgentApiInsertSchema, SubAgentApiSelectSchema, SubAgentApiUpdateSchema, SubAgentArtifactComponentApiInsertSchema, SubAgentArtifactComponentApiSelectSchema, SubAgentArtifactComponentApiUpdateSchema, SubAgentArtifactComponentInsertSchema, SubAgentArtifactComponentListResponse, SubAgentArtifactComponentResponse, SubAgentArtifactComponentSelectSchema, SubAgentArtifactComponentUpdateSchema, SubAgentDataComponentApiInsertSchema, SubAgentDataComponentApiSelectSchema, SubAgentDataComponentApiUpdateSchema, SubAgentDataComponentInsertSchema, SubAgentDataComponentListResponse, SubAgentDataComponentResponse, SubAgentDataComponentSelectSchema, SubAgentDataComponentUpdateSchema, SubAgentInsertSchema, SubAgentListResponse, SubAgentRelationApiInsertSchema, SubAgentRelationApiSelectSchema, SubAgentRelationApiUpdateSchema, SubAgentRelationInsertSchema, SubAgentRelationListResponse, SubAgentRelationQuerySchema, SubAgentRelationResponse, SubAgentRelationSelectSchema, SubAgentRelationUpdateSchema, SubAgentResponse, SubAgentSelectSchema, SubAgentStopWhenSchema, SubAgentToolRelationApiInsertSchema, SubAgentToolRelationApiSelectSchema, SubAgentToolRelationApiUpdateSchema, SubAgentToolRelationInsertSchema, SubAgentToolRelationListResponse, SubAgentToolRelationResponse, SubAgentToolRelationSelectSchema, SubAgentToolRelationUpdateSchema, SubAgentUpdateSchema, TaskApiInsertSchema, TaskApiSelectSchema, TaskApiUpdateSchema, TaskInsertSchema, TaskRelationApiInsertSchema, TaskRelationApiSelectSchema, TaskRelationApiUpdateSchema, TaskRelationInsertSchema, TaskRelationSelectSchema, TaskRelationUpdateSchema, TaskSelectSchema, TaskUpdateSchema, TenantIdParamsSchema, TenantParamsSchema, TenantProjectAgentIdParamsSchema, TenantProjectAgentParamsSchema, TenantProjectAgentSubAgentIdParamsSchema, TenantProjectAgentSubAgentParamsSchema, TenantProjectIdParamsSchema, TenantProjectParamsSchema, ToolApiInsertSchema, ToolApiSelectSchema, ToolApiUpdateSchema, ToolInsertSchema, ToolListResponse, ToolResponse, ToolSelectSchema, ToolStatusSchema, ToolUpdateSchema, URL_SAFE_ID_PATTERN, resourceIdSchema, validatePropsAsJsonSchema } from '../chunk-4SE2FOJY.js';
|