@inkeep/agents-core 0.0.0-dev-20260120175022 → 0.0.0-dev-20260120193424

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 (63) hide show
  1. package/dist/auth/auth-schema.d.ts +82 -82
  2. package/dist/auth/auth-validation-schemas.d.ts +129 -129
  3. package/dist/auth/auth.d.ts +53 -53
  4. package/dist/auth/permissions.d.ts +13 -13
  5. package/dist/client-exports.d.ts +6 -2
  6. package/dist/client-exports.js +2 -2
  7. package/dist/constants/otel-attributes.d.ts +3 -0
  8. package/dist/constants/otel-attributes.js +3 -0
  9. package/dist/data-access/index.d.ts +3 -1
  10. package/dist/data-access/index.js +3 -1
  11. package/dist/data-access/manage/agentFull.js +114 -0
  12. package/dist/data-access/manage/agents.d.ts +16 -16
  13. package/dist/data-access/manage/agents.js +27 -0
  14. package/dist/data-access/manage/artifactComponents.d.ts +10 -10
  15. package/dist/data-access/manage/contextConfigs.d.ts +12 -12
  16. package/dist/data-access/manage/dataComponents.d.ts +6 -6
  17. package/dist/data-access/manage/functionTools.d.ts +12 -12
  18. package/dist/data-access/manage/projectFull.d.ts +4 -0
  19. package/dist/data-access/manage/projectFull.js +31 -8
  20. package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +18 -18
  21. package/dist/data-access/manage/subAgentRelations.d.ts +24 -24
  22. package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +18 -18
  23. package/dist/data-access/manage/subAgents.d.ts +12 -12
  24. package/dist/data-access/manage/tools.d.ts +27 -27
  25. package/dist/data-access/manage/triggers.d.ts +84 -0
  26. package/dist/data-access/manage/triggers.js +95 -0
  27. package/dist/data-access/runtime/apiKeys.d.ts +20 -20
  28. package/dist/data-access/runtime/conversations.d.ts +16 -16
  29. package/dist/data-access/runtime/evalRuns.d.ts +2 -2
  30. package/dist/data-access/runtime/evalRuns.js +11 -1
  31. package/dist/data-access/runtime/messages.d.ts +12 -12
  32. package/dist/data-access/runtime/tasks.d.ts +5 -5
  33. package/dist/data-access/runtime/triggerInvocations.d.ts +62 -0
  34. package/dist/data-access/runtime/triggerInvocations.js +54 -0
  35. package/dist/db/manage/manage-schema.d.ts +269 -4
  36. package/dist/db/manage/manage-schema.js +31 -2
  37. package/dist/db/runtime/runtime-schema.d.ts +364 -149
  38. package/dist/db/runtime/runtime-schema.js +33 -3
  39. package/dist/dolt/branch.d.ts +55 -1
  40. package/dist/dolt/branch.js +85 -1
  41. package/dist/dolt/index.d.ts +2 -2
  42. package/dist/dolt/index.js +2 -2
  43. package/dist/index.d.ts +10 -6
  44. package/dist/index.js +10 -6
  45. package/dist/types/entities.d.ts +14 -2
  46. package/dist/types/index.d.ts +2 -2
  47. package/dist/utils/index.d.ts +3 -1
  48. package/dist/utils/index.js +3 -1
  49. package/dist/utils/template-interpolation.d.ts +22 -0
  50. package/dist/utils/template-interpolation.js +62 -0
  51. package/dist/utils/trigger-auth.d.ts +32 -0
  52. package/dist/utils/trigger-auth.js +130 -0
  53. package/dist/validation/index.d.ts +2 -2
  54. package/dist/validation/index.js +2 -2
  55. package/dist/validation/schemas.d.ts +3465 -1227
  56. package/dist/validation/schemas.js +87 -4
  57. package/drizzle/manage/0001_broken_wendell_vaughn.sql +19 -0
  58. package/drizzle/manage/meta/0001_snapshot.json +3115 -0
  59. package/drizzle/manage/meta/_journal.json +7 -0
  60. package/drizzle/runtime/0009_freezing_leo.sql +17 -0
  61. package/drizzle/runtime/meta/0009_snapshot.json +2397 -0
  62. package/drizzle/runtime/meta/_journal.json +7 -0
  63. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  import { schemaValidationDefaults } from "../constants/schema-validation/defaults.js";
2
2
  import { CredentialStoreType, MCPServerType, MCPTransportType, TOOL_STATUS_VALUES, VALID_RELATION_TYPES } from "../types/utility.js";
3
- import { agents, artifactComponents, contextConfigs, credentialReferences, dataComponents, dataset, datasetItem, datasetRunConfig, datasetRunConfigAgentRelations, evaluationJobConfig, evaluationJobConfigEvaluatorRelations, evaluationRunConfig, evaluationRunConfigEvaluationSuiteConfigRelations, evaluationSuiteConfig, evaluationSuiteConfigEvaluatorRelations, evaluator, externalAgents, functionTools, functions, projects, subAgentArtifactComponents, subAgentDataComponents, subAgentExternalAgentRelations, subAgentFunctionToolRelations, subAgentRelations, subAgentTeamAgentRelations, subAgentToolRelations, subAgents, tools } from "../db/manage/manage-schema.js";
4
- import { apiKeys, contextCache, conversations, datasetRun, datasetRunConversationRelations, evaluationResult, evaluationRun, ledgerArtifacts, messages, projectMetadata, taskRelations, tasks } from "../db/runtime/runtime-schema.js";
3
+ import { agents, artifactComponents, contextConfigs, credentialReferences, dataComponents, dataset, datasetItem, datasetRunConfig, datasetRunConfigAgentRelations, evaluationJobConfig, evaluationJobConfigEvaluatorRelations, evaluationRunConfig, evaluationRunConfigEvaluationSuiteConfigRelations, evaluationSuiteConfig, evaluationSuiteConfigEvaluatorRelations, evaluator, externalAgents, functionTools, functions, projects, subAgentArtifactComponents, subAgentDataComponents, subAgentExternalAgentRelations, subAgentFunctionToolRelations, subAgentRelations, subAgentTeamAgentRelations, subAgentToolRelations, subAgents, tools, triggers } from "../db/manage/manage-schema.js";
4
+ import { apiKeys, contextCache, conversations, datasetRun, datasetRunConversationRelations, evaluationResult, evaluationRun, ledgerArtifacts, messages, projectMetadata, taskRelations, tasks, triggerInvocations } from "../db/runtime/runtime-schema.js";
5
5
  import { ResolvedRefSchema } from "./dolt-schemas.js";
6
6
  import { MAX_ID_LENGTH, MIN_ID_LENGTH, URL_SAFE_ID_PATTERN, createInsertSchema, createResourceIdSchema, createSelectSchema, registerFieldSchemas, resourceIdSchema } from "./drizzle-schema-helpers.js";
7
7
  import { z } from "@hono/zod-openapi";
@@ -143,6 +143,78 @@ const AgentUpdateSchema = AgentInsertSchema.partial();
143
143
  const AgentApiSelectSchema = createApiSchema(AgentSelectSchema).openapi("Agent");
144
144
  const AgentApiInsertSchema = createApiInsertSchema(AgentInsertSchema).extend({ id: resourceIdSchema }).openapi("AgentCreate");
145
145
  const AgentApiUpdateSchema = createApiUpdateSchema(AgentUpdateSchema).openapi("AgentUpdate");
146
+ const TriggerAuthenticationSchema = z.discriminatedUnion("type", [
147
+ z.object({
148
+ type: z.literal("api_key"),
149
+ data: z.object({
150
+ name: z.string().describe("Header name for the API key"),
151
+ value: z.string().describe("Expected API key value")
152
+ }),
153
+ add_position: z.literal("header")
154
+ }),
155
+ z.object({
156
+ type: z.literal("basic_auth"),
157
+ data: z.object({
158
+ username: z.string().describe("Expected username"),
159
+ password: z.string().describe("Expected password")
160
+ }),
161
+ add_position: z.literal("header")
162
+ }),
163
+ z.object({
164
+ type: z.literal("bearer_token"),
165
+ data: z.object({ token: z.string().describe("Expected bearer token") }),
166
+ add_position: z.literal("header")
167
+ }),
168
+ z.object({ type: z.literal("none") })
169
+ ]).openapi("TriggerAuthentication");
170
+ const TriggerOutputTransformSchema = z.object({
171
+ jmespath: z.string().optional().describe("JMESPath expression for payload transformation"),
172
+ objectTransformation: z.record(z.string(), z.string()).optional().describe("Object transformation mapping")
173
+ }).openapi("TriggerOutputTransform");
174
+ const TriggerInvocationStatusEnum = z.enum([
175
+ "pending",
176
+ "success",
177
+ "failed"
178
+ ]);
179
+ const TriggerSelectSchema = createSelectSchema(triggers);
180
+ const TriggerInsertSchema = createInsertSchema(triggers, {
181
+ id: () => resourceIdSchema,
182
+ name: () => z.string().trim().nonempty().describe("Trigger name"),
183
+ description: () => z.string().optional().describe("Trigger description"),
184
+ enabled: () => z.boolean().default(true).describe("Whether the trigger is enabled"),
185
+ inputSchema: () => z.record(z.string(), z.unknown()).optional().describe("JSON Schema for input validation"),
186
+ outputTransform: () => TriggerOutputTransformSchema.optional(),
187
+ messageTemplate: () => z.string().trim().nonempty().describe("Message template with {{placeholder}} syntax"),
188
+ authentication: () => TriggerAuthenticationSchema.optional(),
189
+ signingSecret: () => z.string().optional().describe("HMAC-SHA256 signing secret")
190
+ });
191
+ const TriggerUpdateSchema = z.object({
192
+ name: z.string().trim().nonempty().describe("Trigger name").optional(),
193
+ description: z.string().optional().describe("Trigger description"),
194
+ enabled: z.boolean().describe("Whether the trigger is enabled").optional(),
195
+ inputSchema: z.record(z.string(), z.unknown()).optional().describe("JSON Schema for input validation"),
196
+ outputTransform: TriggerOutputTransformSchema.optional(),
197
+ messageTemplate: z.string().trim().nonempty().describe("Message template with {{placeholder}} syntax").optional(),
198
+ authentication: TriggerAuthenticationSchema.optional(),
199
+ signingSecret: z.string().optional().describe("HMAC-SHA256 signing secret")
200
+ });
201
+ const TriggerApiSelectSchema = createAgentScopedApiSchema(TriggerSelectSchema).openapi("Trigger");
202
+ const TriggerApiInsertSchema = createAgentScopedApiInsertSchema(TriggerInsertSchema).extend({ id: resourceIdSchema.optional() }).openapi("TriggerCreate");
203
+ const TriggerApiUpdateSchema = TriggerUpdateSchema.openapi("TriggerUpdate");
204
+ const TriggerInvocationSelectSchema = createSelectSchema(triggerInvocations);
205
+ const TriggerInvocationInsertSchema = createInsertSchema(triggerInvocations, {
206
+ id: () => resourceIdSchema,
207
+ triggerId: () => resourceIdSchema,
208
+ conversationId: () => resourceIdSchema.optional(),
209
+ status: () => TriggerInvocationStatusEnum.default("pending"),
210
+ requestPayload: () => z.record(z.string(), z.unknown()).describe("Original webhook payload"),
211
+ transformedPayload: () => z.record(z.string(), z.unknown()).optional().describe("Transformed payload"),
212
+ errorMessage: () => z.string().optional().describe("Error message if status is failed")
213
+ });
214
+ const TriggerInvocationUpdateSchema = TriggerInvocationInsertSchema.partial();
215
+ const TriggerInvocationApiSelectSchema = createAgentScopedApiSchema(TriggerInvocationSelectSchema).openapi("TriggerInvocation");
216
+ const TriggerInvocationApiInsertSchema = createAgentScopedApiInsertSchema(TriggerInvocationInsertSchema).extend({ id: resourceIdSchema }).openapi("TriggerInvocationCreate");
217
+ const TriggerInvocationApiUpdateSchema = createAgentScopedApiUpdateSchema(TriggerInvocationUpdateSchema).openapi("TriggerInvocationUpdate");
146
218
  const TaskSelectSchema = createSelectSchema(tasks);
147
219
  const TaskInsertSchema = createInsertSchema(tasks).extend({
148
220
  id: resourceIdSchema,
@@ -358,7 +430,7 @@ const EvaluationJobFilterCriteriaSchema = z.object({
358
430
  startDate: z.string(),
359
431
  endDate: z.string()
360
432
  }).optional()
361
- }).loose().openapi("EvaluationJobFilterCriteria");
433
+ }).openapi("EvaluationJobFilterCriteria");
362
434
  const TriggerEvaluationJobSchema = z.object({
363
435
  evaluationJobConfigId: z.string(),
364
436
  evaluatorIds: z.array(z.string()),
@@ -746,6 +818,7 @@ const AgentWithinContextOfProjectSchema = AgentApiInsertSchema.extend({
746
818
  teamAgents: z.record(z.string(), TeamAgentSchema).optional(),
747
819
  functionTools: z.record(z.string(), FunctionToolApiInsertSchema).optional(),
748
820
  functions: z.record(z.string(), FunctionApiInsertSchema).optional(),
821
+ triggers: z.record(z.string(), TriggerApiInsertSchema).optional(),
749
822
  contextConfig: z.optional(ContextConfigApiInsertSchema),
750
823
  statusUpdates: z.optional(StatusUpdateSchema),
751
824
  models: ModelSchema.optional(),
@@ -868,6 +941,8 @@ const SubAgentRelationResponse = z.object({ data: SubAgentRelationApiSelectSchem
868
941
  const SubAgentToolRelationResponse = z.object({ data: SubAgentToolRelationApiSelectSchema }).openapi("SubAgentToolRelationResponse");
869
942
  const ConversationResponse = z.object({ data: ConversationApiSelectSchema }).openapi("ConversationResponse");
870
943
  const MessageResponse = z.object({ data: MessageApiSelectSchema }).openapi("MessageResponse");
944
+ const TriggerResponse = z.object({ data: TriggerApiSelectSchema }).openapi("TriggerResponse");
945
+ const TriggerInvocationResponse = z.object({ data: TriggerInvocationApiSelectSchema }).openapi("TriggerInvocationResponse");
871
946
  const ProjectListResponse = z.object({
872
947
  data: z.array(ProjectApiSelectSchema),
873
948
  pagination: PaginationSchema
@@ -936,6 +1011,14 @@ const MessageListResponse = z.object({
936
1011
  data: z.array(MessageApiSelectSchema),
937
1012
  pagination: PaginationSchema
938
1013
  }).openapi("MessageListResponse");
1014
+ const TriggerListResponse = z.object({
1015
+ data: z.array(TriggerApiSelectSchema),
1016
+ pagination: PaginationSchema
1017
+ }).openapi("TriggerListResponse");
1018
+ const TriggerInvocationListResponse = z.object({
1019
+ data: z.array(TriggerInvocationApiSelectSchema),
1020
+ pagination: PaginationSchema
1021
+ }).openapi("TriggerInvocationListResponse");
939
1022
  const SubAgentDataComponentResponse = z.object({ data: SubAgentDataComponentApiSelectSchema }).openapi("SubAgentDataComponentResponse");
940
1023
  const SubAgentArtifactComponentResponse = z.object({ data: SubAgentArtifactComponentApiSelectSchema }).openapi("SubAgentArtifactComponentResponse");
941
1024
  const SubAgentDataComponentListResponse = z.object({
@@ -1050,4 +1133,4 @@ const ProjectMetadataSelectSchema = createSelectSchema(projectMetadata);
1050
1133
  const ProjectMetadataInsertSchema = createInsertSchema(projectMetadata).omit({ createdAt: true });
1051
1134
 
1052
1135
  //#endregion
1053
- export { AgentApiInsertSchema, AgentApiSelectSchema, AgentApiUpdateSchema, AgentInsertSchema, AgentListResponse, AgentResponse, AgentSelectSchema, AgentStopWhenSchema, AgentUpdateSchema, AgentWithinContextOfProjectResponse, AgentWithinContextOfProjectSchema, AgentWithinContextOfProjectSelectResponse, AgentWithinContextOfProjectSelectSchema, AgentWithinContextOfProjectSelectSchemaWithRelationIds, AllAgentSchema, ApiKeyApiCreationResponseSchema, ApiKeyApiInsertSchema, ApiKeyApiSelectSchema, ApiKeyApiUpdateSchema, ApiKeyInsertSchema, ApiKeyListResponse, ApiKeyResponse, ApiKeySelectSchema, ApiKeyUpdateSchema, ArtifactComponentApiInsertSchema, ArtifactComponentApiSelectSchema, ArtifactComponentApiUpdateSchema, ArtifactComponentArrayResponse, ArtifactComponentInsertSchema, ArtifactComponentListResponse, ArtifactComponentResponse, ArtifactComponentSelectSchema, ArtifactComponentUpdateSchema, CanUseItemSchema, ComponentAssociationListResponse, ComponentAssociationSchema, ContextCacheApiInsertSchema, ContextCacheApiSelectSchema, ContextCacheApiUpdateSchema, ContextCacheInsertSchema, ContextCacheSelectSchema, ContextCacheUpdateSchema, ContextConfigApiInsertSchema, ContextConfigApiSelectSchema, ContextConfigApiUpdateSchema, ContextConfigInsertSchema, ContextConfigListResponse, ContextConfigResponse, ContextConfigSelectSchema, ContextConfigUpdateSchema, ConversationApiInsertSchema, ConversationApiSelectSchema, ConversationApiUpdateSchema, ConversationInsertSchema, ConversationListResponse, ConversationResponse, ConversationSelectSchema, ConversationUpdateSchema, CreateCredentialInStoreRequestSchema, CreateCredentialInStoreResponseSchema, CredentialReferenceApiInsertSchema, CredentialReferenceApiSelectSchema, CredentialReferenceApiUpdateSchema, CredentialReferenceInsertSchema, CredentialReferenceListResponse, CredentialReferenceResponse, CredentialReferenceSelectSchema, CredentialReferenceUpdateSchema, CredentialStoreListResponseSchema, CredentialStoreSchema, DataComponentApiInsertSchema, DataComponentApiSelectSchema, DataComponentApiUpdateSchema, DataComponentArrayResponse, DataComponentBaseSchema, DataComponentInsertSchema, DataComponentListResponse, DataComponentResponse, DataComponentSelectSchema, DataComponentUpdateSchema, DatasetApiInsertSchema, DatasetApiSelectSchema, DatasetApiUpdateSchema, DatasetInsertSchema, DatasetItemApiInsertSchema, DatasetItemApiSelectSchema, DatasetItemApiUpdateSchema, DatasetItemInsertSchema, DatasetItemSelectSchema, DatasetItemUpdateSchema, DatasetRunApiInsertSchema, DatasetRunApiSelectSchema, DatasetRunApiUpdateSchema, DatasetRunConfigAgentRelationApiInsertSchema, DatasetRunConfigAgentRelationApiSelectSchema, DatasetRunConfigAgentRelationApiUpdateSchema, DatasetRunConfigAgentRelationInsertSchema, DatasetRunConfigAgentRelationSelectSchema, DatasetRunConfigAgentRelationUpdateSchema, DatasetRunConfigApiInsertSchema, DatasetRunConfigApiSelectSchema, DatasetRunConfigApiUpdateSchema, DatasetRunConfigInsertSchema, DatasetRunConfigSelectSchema, DatasetRunConfigUpdateSchema, DatasetRunConversationRelationApiInsertSchema, DatasetRunConversationRelationApiSelectSchema, DatasetRunConversationRelationApiUpdateSchema, DatasetRunConversationRelationInsertSchema, DatasetRunConversationRelationSelectSchema, DatasetRunConversationRelationUpdateSchema, DatasetRunInsertSchema, DatasetRunItemSchema, DatasetRunSelectSchema, DatasetRunUpdateSchema, DatasetSelectSchema, DatasetUpdateSchema, ErrorResponseSchema, EvaluationJobConfigApiInsertSchema, EvaluationJobConfigApiSelectSchema, EvaluationJobConfigApiUpdateSchema, EvaluationJobConfigEvaluatorRelationApiInsertSchema, EvaluationJobConfigEvaluatorRelationApiSelectSchema, EvaluationJobConfigEvaluatorRelationApiUpdateSchema, EvaluationJobConfigEvaluatorRelationInsertSchema, EvaluationJobConfigEvaluatorRelationSelectSchema, EvaluationJobConfigEvaluatorRelationUpdateSchema, EvaluationJobConfigInsertSchema, EvaluationJobConfigSelectSchema, EvaluationJobConfigUpdateSchema, EvaluationJobFilterCriteriaSchema, EvaluationResultApiInsertSchema, EvaluationResultApiSelectSchema, EvaluationResultApiUpdateSchema, EvaluationResultInsertSchema, EvaluationResultSelectSchema, EvaluationResultUpdateSchema, EvaluationRunApiInsertSchema, EvaluationRunApiSelectSchema, EvaluationRunApiUpdateSchema, EvaluationRunConfigApiInsertSchema, EvaluationRunConfigApiSelectSchema, EvaluationRunConfigApiUpdateSchema, EvaluationRunConfigEvaluationSuiteConfigRelationApiInsertSchema, EvaluationRunConfigEvaluationSuiteConfigRelationApiSelectSchema, EvaluationRunConfigEvaluationSuiteConfigRelationApiUpdateSchema, EvaluationRunConfigEvaluationSuiteConfigRelationInsertSchema, EvaluationRunConfigEvaluationSuiteConfigRelationSelectSchema, EvaluationRunConfigEvaluationSuiteConfigRelationUpdateSchema, EvaluationRunConfigInsertSchema, EvaluationRunConfigSelectSchema, EvaluationRunConfigUpdateSchema, EvaluationRunConfigWithSuiteConfigsApiSelectSchema, EvaluationRunInsertSchema, EvaluationRunSelectSchema, EvaluationRunUpdateSchema, EvaluationSuiteConfigApiInsertSchema, EvaluationSuiteConfigApiSelectSchema, EvaluationSuiteConfigApiUpdateSchema, EvaluationSuiteConfigEvaluatorRelationApiInsertSchema, EvaluationSuiteConfigEvaluatorRelationApiSelectSchema, EvaluationSuiteConfigEvaluatorRelationApiUpdateSchema, EvaluationSuiteConfigEvaluatorRelationInsertSchema, EvaluationSuiteConfigEvaluatorRelationSelectSchema, EvaluationSuiteConfigEvaluatorRelationUpdateSchema, EvaluationSuiteConfigInsertSchema, EvaluationSuiteConfigSelectSchema, EvaluationSuiteConfigUpdateSchema, EvaluatorApiInsertSchema, EvaluatorApiSelectSchema, EvaluatorApiUpdateSchema, EvaluatorInsertSchema, EvaluatorSelectSchema, EvaluatorUpdateSchema, ExistsResponseSchema, ExternalAgentApiInsertSchema, ExternalAgentApiSelectSchema, ExternalAgentApiUpdateSchema, ExternalAgentInsertSchema, ExternalAgentListResponse, ExternalAgentResponse, ExternalAgentSelectSchema, ExternalAgentUpdateSchema, ExternalSubAgentRelationApiInsertSchema, ExternalSubAgentRelationInsertSchema, FetchConfigSchema, FetchDefinitionSchema, FullAgentAgentInsertSchema, FullAgentSubAgentSelectSchema, FullAgentSubAgentSelectSchemaWithRelationIds, FullProjectDefinitionResponse, FullProjectDefinitionSchema, FullProjectSelectResponse, FullProjectSelectSchema, FullProjectSelectSchemaWithRelationIds, FullProjectSelectWithRelationIdsResponse, 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, MCPCatalogListResponse, MCPToolConfigSchema, MIN_ID_LENGTH, McpToolDefinitionSchema, McpToolListResponse, McpToolResponse, McpToolSchema, McpTransportConfigSchema, MessageApiInsertSchema, MessageApiSelectSchema, MessageApiUpdateSchema, MessageInsertSchema, MessageListResponse, MessageResponse, MessageSelectSchema, MessageUpdateSchema, ModelSchema, ModelSettingsSchema, OAuthCallbackQuerySchema, OAuthLoginQuerySchema, PaginationQueryParamsSchema, PaginationSchema, PaginationWithRefQueryParamsSchema, PrebuiltMCPServerSchema, ProjectApiInsertSchema, ProjectApiSelectSchema, ProjectApiUpdateSchema, ProjectInsertSchema, ProjectListResponse, ProjectMetadataInsertSchema, ProjectMetadataSelectSchema, ProjectModelSchema, ProjectResponse, ProjectSelectSchema, ProjectUpdateSchema, RefQueryParamSchema, RelatedAgentInfoListResponse, RelatedAgentInfoSchema, RemovedResponseSchema, SimulationAgentSchema, SingleResponseSchema, StatusComponentSchema, StatusUpdateSchema, StopWhenSchema, SubAgentApiInsertSchema, SubAgentApiSelectSchema, SubAgentApiUpdateSchema, SubAgentArtifactComponentApiInsertSchema, SubAgentArtifactComponentApiSelectSchema, SubAgentArtifactComponentApiUpdateSchema, SubAgentArtifactComponentInsertSchema, SubAgentArtifactComponentListResponse, SubAgentArtifactComponentResponse, SubAgentArtifactComponentSelectSchema, SubAgentArtifactComponentUpdateSchema, SubAgentDataComponentApiInsertSchema, SubAgentDataComponentApiSelectSchema, SubAgentDataComponentApiUpdateSchema, SubAgentDataComponentInsertSchema, SubAgentDataComponentListResponse, SubAgentDataComponentResponse, SubAgentDataComponentSelectSchema, SubAgentDataComponentUpdateSchema, SubAgentExternalAgentRelationApiInsertSchema, SubAgentExternalAgentRelationApiSelectSchema, SubAgentExternalAgentRelationApiUpdateSchema, SubAgentExternalAgentRelationInsertSchema, SubAgentExternalAgentRelationListResponse, SubAgentExternalAgentRelationResponse, SubAgentExternalAgentRelationSelectSchema, SubAgentExternalAgentRelationUpdateSchema, SubAgentFunctionToolRelationApiInsertSchema, SubAgentFunctionToolRelationApiSelectSchema, SubAgentFunctionToolRelationInsertSchema, SubAgentFunctionToolRelationListResponse, SubAgentFunctionToolRelationResponse, SubAgentFunctionToolRelationSelectSchema, SubAgentInsertSchema, SubAgentListResponse, SubAgentRelationApiInsertSchema, SubAgentRelationApiSelectSchema, SubAgentRelationApiUpdateSchema, SubAgentRelationInsertSchema, SubAgentRelationListResponse, SubAgentRelationQuerySchema, SubAgentRelationResponse, SubAgentRelationSelectSchema, SubAgentRelationUpdateSchema, SubAgentResponse, SubAgentSelectSchema, SubAgentStopWhenSchema, SubAgentTeamAgentRelationApiInsertSchema, SubAgentTeamAgentRelationApiSelectSchema, SubAgentTeamAgentRelationApiUpdateSchema, SubAgentTeamAgentRelationInsertSchema, SubAgentTeamAgentRelationListResponse, SubAgentTeamAgentRelationResponse, SubAgentTeamAgentRelationSelectSchema, SubAgentTeamAgentRelationUpdateSchema, SubAgentToolRelationApiInsertSchema, SubAgentToolRelationApiSelectSchema, SubAgentToolRelationApiUpdateSchema, SubAgentToolRelationInsertSchema, SubAgentToolRelationListResponse, SubAgentToolRelationResponse, SubAgentToolRelationSelectSchema, SubAgentToolRelationUpdateSchema, SubAgentUpdateSchema, TaskApiInsertSchema, TaskApiSelectSchema, TaskApiUpdateSchema, TaskInsertSchema, TaskRelationApiInsertSchema, TaskRelationApiSelectSchema, TaskRelationApiUpdateSchema, TaskRelationInsertSchema, TaskRelationSelectSchema, TaskRelationUpdateSchema, TaskSelectSchema, TaskUpdateSchema, TeamAgentSchema, TenantIdParamsSchema, TenantParamsSchema, TenantProjectAgentIdParamsSchema, TenantProjectAgentParamsSchema, TenantProjectAgentSubAgentIdParamsSchema, TenantProjectAgentSubAgentParamsSchema, TenantProjectIdParamsSchema, TenantProjectParamsSchema, ThirdPartyMCPServerResponse, ToolApiInsertSchema, ToolApiSelectSchema, ToolApiUpdateSchema, ToolInsertSchema, ToolListResponse, ToolResponse, ToolSelectSchema, ToolStatusSchema, ToolUpdateSchema, TriggerBatchConversationEvaluationSchema, TriggerConversationEvaluationSchema, TriggerDatasetRunSchema, TriggerEvaluationJobSchema, URL_SAFE_ID_PATTERN, canDelegateToExternalAgentInsertSchema, canDelegateToExternalAgentSchema, canDelegateToTeamAgentInsertSchema, canDelegateToTeamAgentSchema, canRelateToInternalSubAgentSchema, resourceIdSchema };
1136
+ export { AgentApiInsertSchema, AgentApiSelectSchema, AgentApiUpdateSchema, AgentInsertSchema, AgentListResponse, AgentResponse, AgentSelectSchema, AgentStopWhenSchema, AgentUpdateSchema, AgentWithinContextOfProjectResponse, AgentWithinContextOfProjectSchema, AgentWithinContextOfProjectSelectResponse, AgentWithinContextOfProjectSelectSchema, AgentWithinContextOfProjectSelectSchemaWithRelationIds, AllAgentSchema, ApiKeyApiCreationResponseSchema, ApiKeyApiInsertSchema, ApiKeyApiSelectSchema, ApiKeyApiUpdateSchema, ApiKeyInsertSchema, ApiKeyListResponse, ApiKeyResponse, ApiKeySelectSchema, ApiKeyUpdateSchema, ArtifactComponentApiInsertSchema, ArtifactComponentApiSelectSchema, ArtifactComponentApiUpdateSchema, ArtifactComponentArrayResponse, ArtifactComponentInsertSchema, ArtifactComponentListResponse, ArtifactComponentResponse, ArtifactComponentSelectSchema, ArtifactComponentUpdateSchema, CanUseItemSchema, ComponentAssociationListResponse, ComponentAssociationSchema, ContextCacheApiInsertSchema, ContextCacheApiSelectSchema, ContextCacheApiUpdateSchema, ContextCacheInsertSchema, ContextCacheSelectSchema, ContextCacheUpdateSchema, ContextConfigApiInsertSchema, ContextConfigApiSelectSchema, ContextConfigApiUpdateSchema, ContextConfigInsertSchema, ContextConfigListResponse, ContextConfigResponse, ContextConfigSelectSchema, ContextConfigUpdateSchema, ConversationApiInsertSchema, ConversationApiSelectSchema, ConversationApiUpdateSchema, ConversationInsertSchema, ConversationListResponse, ConversationResponse, ConversationSelectSchema, ConversationUpdateSchema, CreateCredentialInStoreRequestSchema, CreateCredentialInStoreResponseSchema, CredentialReferenceApiInsertSchema, CredentialReferenceApiSelectSchema, CredentialReferenceApiUpdateSchema, CredentialReferenceInsertSchema, CredentialReferenceListResponse, CredentialReferenceResponse, CredentialReferenceSelectSchema, CredentialReferenceUpdateSchema, CredentialStoreListResponseSchema, CredentialStoreSchema, DataComponentApiInsertSchema, DataComponentApiSelectSchema, DataComponentApiUpdateSchema, DataComponentArrayResponse, DataComponentBaseSchema, DataComponentInsertSchema, DataComponentListResponse, DataComponentResponse, DataComponentSelectSchema, DataComponentUpdateSchema, DatasetApiInsertSchema, DatasetApiSelectSchema, DatasetApiUpdateSchema, DatasetInsertSchema, DatasetItemApiInsertSchema, DatasetItemApiSelectSchema, DatasetItemApiUpdateSchema, DatasetItemInsertSchema, DatasetItemSelectSchema, DatasetItemUpdateSchema, DatasetRunApiInsertSchema, DatasetRunApiSelectSchema, DatasetRunApiUpdateSchema, DatasetRunConfigAgentRelationApiInsertSchema, DatasetRunConfigAgentRelationApiSelectSchema, DatasetRunConfigAgentRelationApiUpdateSchema, DatasetRunConfigAgentRelationInsertSchema, DatasetRunConfigAgentRelationSelectSchema, DatasetRunConfigAgentRelationUpdateSchema, DatasetRunConfigApiInsertSchema, DatasetRunConfigApiSelectSchema, DatasetRunConfigApiUpdateSchema, DatasetRunConfigInsertSchema, DatasetRunConfigSelectSchema, DatasetRunConfigUpdateSchema, DatasetRunConversationRelationApiInsertSchema, DatasetRunConversationRelationApiSelectSchema, DatasetRunConversationRelationApiUpdateSchema, DatasetRunConversationRelationInsertSchema, DatasetRunConversationRelationSelectSchema, DatasetRunConversationRelationUpdateSchema, DatasetRunInsertSchema, DatasetRunItemSchema, DatasetRunSelectSchema, DatasetRunUpdateSchema, DatasetSelectSchema, DatasetUpdateSchema, ErrorResponseSchema, EvaluationJobConfigApiInsertSchema, EvaluationJobConfigApiSelectSchema, EvaluationJobConfigApiUpdateSchema, EvaluationJobConfigEvaluatorRelationApiInsertSchema, EvaluationJobConfigEvaluatorRelationApiSelectSchema, EvaluationJobConfigEvaluatorRelationApiUpdateSchema, EvaluationJobConfigEvaluatorRelationInsertSchema, EvaluationJobConfigEvaluatorRelationSelectSchema, EvaluationJobConfigEvaluatorRelationUpdateSchema, EvaluationJobConfigInsertSchema, EvaluationJobConfigSelectSchema, EvaluationJobConfigUpdateSchema, EvaluationJobFilterCriteriaSchema, EvaluationResultApiInsertSchema, EvaluationResultApiSelectSchema, EvaluationResultApiUpdateSchema, EvaluationResultInsertSchema, EvaluationResultSelectSchema, EvaluationResultUpdateSchema, EvaluationRunApiInsertSchema, EvaluationRunApiSelectSchema, EvaluationRunApiUpdateSchema, EvaluationRunConfigApiInsertSchema, EvaluationRunConfigApiSelectSchema, EvaluationRunConfigApiUpdateSchema, EvaluationRunConfigEvaluationSuiteConfigRelationApiInsertSchema, EvaluationRunConfigEvaluationSuiteConfigRelationApiSelectSchema, EvaluationRunConfigEvaluationSuiteConfigRelationApiUpdateSchema, EvaluationRunConfigEvaluationSuiteConfigRelationInsertSchema, EvaluationRunConfigEvaluationSuiteConfigRelationSelectSchema, EvaluationRunConfigEvaluationSuiteConfigRelationUpdateSchema, EvaluationRunConfigInsertSchema, EvaluationRunConfigSelectSchema, EvaluationRunConfigUpdateSchema, EvaluationRunConfigWithSuiteConfigsApiSelectSchema, EvaluationRunInsertSchema, EvaluationRunSelectSchema, EvaluationRunUpdateSchema, EvaluationSuiteConfigApiInsertSchema, EvaluationSuiteConfigApiSelectSchema, EvaluationSuiteConfigApiUpdateSchema, EvaluationSuiteConfigEvaluatorRelationApiInsertSchema, EvaluationSuiteConfigEvaluatorRelationApiSelectSchema, EvaluationSuiteConfigEvaluatorRelationApiUpdateSchema, EvaluationSuiteConfigEvaluatorRelationInsertSchema, EvaluationSuiteConfigEvaluatorRelationSelectSchema, EvaluationSuiteConfigEvaluatorRelationUpdateSchema, EvaluationSuiteConfigInsertSchema, EvaluationSuiteConfigSelectSchema, EvaluationSuiteConfigUpdateSchema, EvaluatorApiInsertSchema, EvaluatorApiSelectSchema, EvaluatorApiUpdateSchema, EvaluatorInsertSchema, EvaluatorSelectSchema, EvaluatorUpdateSchema, ExistsResponseSchema, ExternalAgentApiInsertSchema, ExternalAgentApiSelectSchema, ExternalAgentApiUpdateSchema, ExternalAgentInsertSchema, ExternalAgentListResponse, ExternalAgentResponse, ExternalAgentSelectSchema, ExternalAgentUpdateSchema, ExternalSubAgentRelationApiInsertSchema, ExternalSubAgentRelationInsertSchema, FetchConfigSchema, FetchDefinitionSchema, FullAgentAgentInsertSchema, FullAgentSubAgentSelectSchema, FullAgentSubAgentSelectSchemaWithRelationIds, FullProjectDefinitionResponse, FullProjectDefinitionSchema, FullProjectSelectResponse, FullProjectSelectSchema, FullProjectSelectSchemaWithRelationIds, FullProjectSelectWithRelationIdsResponse, 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, MCPCatalogListResponse, MCPToolConfigSchema, MIN_ID_LENGTH, McpToolDefinitionSchema, McpToolListResponse, McpToolResponse, McpToolSchema, McpTransportConfigSchema, MessageApiInsertSchema, MessageApiSelectSchema, MessageApiUpdateSchema, MessageInsertSchema, MessageListResponse, MessageResponse, MessageSelectSchema, MessageUpdateSchema, ModelSchema, ModelSettingsSchema, OAuthCallbackQuerySchema, OAuthLoginQuerySchema, PaginationQueryParamsSchema, PaginationSchema, PaginationWithRefQueryParamsSchema, PrebuiltMCPServerSchema, ProjectApiInsertSchema, ProjectApiSelectSchema, ProjectApiUpdateSchema, ProjectInsertSchema, ProjectListResponse, ProjectMetadataInsertSchema, ProjectMetadataSelectSchema, ProjectModelSchema, ProjectResponse, ProjectSelectSchema, ProjectUpdateSchema, RefQueryParamSchema, RelatedAgentInfoListResponse, RelatedAgentInfoSchema, RemovedResponseSchema, SimulationAgentSchema, SingleResponseSchema, StatusComponentSchema, StatusUpdateSchema, StopWhenSchema, SubAgentApiInsertSchema, SubAgentApiSelectSchema, SubAgentApiUpdateSchema, SubAgentArtifactComponentApiInsertSchema, SubAgentArtifactComponentApiSelectSchema, SubAgentArtifactComponentApiUpdateSchema, SubAgentArtifactComponentInsertSchema, SubAgentArtifactComponentListResponse, SubAgentArtifactComponentResponse, SubAgentArtifactComponentSelectSchema, SubAgentArtifactComponentUpdateSchema, SubAgentDataComponentApiInsertSchema, SubAgentDataComponentApiSelectSchema, SubAgentDataComponentApiUpdateSchema, SubAgentDataComponentInsertSchema, SubAgentDataComponentListResponse, SubAgentDataComponentResponse, SubAgentDataComponentSelectSchema, SubAgentDataComponentUpdateSchema, SubAgentExternalAgentRelationApiInsertSchema, SubAgentExternalAgentRelationApiSelectSchema, SubAgentExternalAgentRelationApiUpdateSchema, SubAgentExternalAgentRelationInsertSchema, SubAgentExternalAgentRelationListResponse, SubAgentExternalAgentRelationResponse, SubAgentExternalAgentRelationSelectSchema, SubAgentExternalAgentRelationUpdateSchema, SubAgentFunctionToolRelationApiInsertSchema, SubAgentFunctionToolRelationApiSelectSchema, SubAgentFunctionToolRelationInsertSchema, SubAgentFunctionToolRelationListResponse, SubAgentFunctionToolRelationResponse, SubAgentFunctionToolRelationSelectSchema, SubAgentInsertSchema, SubAgentListResponse, SubAgentRelationApiInsertSchema, SubAgentRelationApiSelectSchema, SubAgentRelationApiUpdateSchema, SubAgentRelationInsertSchema, SubAgentRelationListResponse, SubAgentRelationQuerySchema, SubAgentRelationResponse, SubAgentRelationSelectSchema, SubAgentRelationUpdateSchema, SubAgentResponse, SubAgentSelectSchema, SubAgentStopWhenSchema, SubAgentTeamAgentRelationApiInsertSchema, SubAgentTeamAgentRelationApiSelectSchema, SubAgentTeamAgentRelationApiUpdateSchema, SubAgentTeamAgentRelationInsertSchema, SubAgentTeamAgentRelationListResponse, SubAgentTeamAgentRelationResponse, SubAgentTeamAgentRelationSelectSchema, SubAgentTeamAgentRelationUpdateSchema, SubAgentToolRelationApiInsertSchema, SubAgentToolRelationApiSelectSchema, SubAgentToolRelationApiUpdateSchema, SubAgentToolRelationInsertSchema, SubAgentToolRelationListResponse, SubAgentToolRelationResponse, SubAgentToolRelationSelectSchema, SubAgentToolRelationUpdateSchema, SubAgentUpdateSchema, TaskApiInsertSchema, TaskApiSelectSchema, TaskApiUpdateSchema, TaskInsertSchema, TaskRelationApiInsertSchema, TaskRelationApiSelectSchema, TaskRelationApiUpdateSchema, TaskRelationInsertSchema, TaskRelationSelectSchema, TaskRelationUpdateSchema, TaskSelectSchema, TaskUpdateSchema, TeamAgentSchema, TenantIdParamsSchema, TenantParamsSchema, TenantProjectAgentIdParamsSchema, TenantProjectAgentParamsSchema, TenantProjectAgentSubAgentIdParamsSchema, TenantProjectAgentSubAgentParamsSchema, TenantProjectIdParamsSchema, TenantProjectParamsSchema, ThirdPartyMCPServerResponse, ToolApiInsertSchema, ToolApiSelectSchema, ToolApiUpdateSchema, ToolInsertSchema, ToolListResponse, ToolResponse, ToolSelectSchema, ToolStatusSchema, ToolUpdateSchema, TriggerApiInsertSchema, TriggerApiSelectSchema, TriggerApiUpdateSchema, TriggerAuthenticationSchema, TriggerBatchConversationEvaluationSchema, TriggerConversationEvaluationSchema, TriggerDatasetRunSchema, TriggerEvaluationJobSchema, TriggerInsertSchema, TriggerInvocationApiInsertSchema, TriggerInvocationApiSelectSchema, TriggerInvocationApiUpdateSchema, TriggerInvocationInsertSchema, TriggerInvocationListResponse, TriggerInvocationResponse, TriggerInvocationSelectSchema, TriggerInvocationStatusEnum, TriggerInvocationUpdateSchema, TriggerListResponse, TriggerOutputTransformSchema, TriggerResponse, TriggerSelectSchema, TriggerUpdateSchema, URL_SAFE_ID_PATTERN, canDelegateToExternalAgentInsertSchema, canDelegateToExternalAgentSchema, canDelegateToTeamAgentInsertSchema, canDelegateToTeamAgentSchema, canRelateToInternalSubAgentSchema, resourceIdSchema };
@@ -0,0 +1,19 @@
1
+ CREATE TABLE "triggers" (
2
+ "tenant_id" varchar(256) NOT NULL,
3
+ "id" varchar(256) NOT NULL,
4
+ "project_id" varchar(256) NOT NULL,
5
+ "agent_id" varchar(256) NOT NULL,
6
+ "name" varchar(256) NOT NULL,
7
+ "description" text,
8
+ "enabled" boolean DEFAULT true NOT NULL,
9
+ "input_schema" jsonb,
10
+ "output_transform" jsonb,
11
+ "message_template" text NOT NULL,
12
+ "authentication" jsonb,
13
+ "signing_secret" text,
14
+ "created_at" timestamp DEFAULT now() NOT NULL,
15
+ "updated_at" timestamp DEFAULT now() NOT NULL,
16
+ CONSTRAINT "triggers_tenant_id_project_id_agent_id_id_pk" PRIMARY KEY("tenant_id","project_id","agent_id","id")
17
+ );
18
+ --> statement-breakpoint
19
+ ALTER TABLE "triggers" ADD CONSTRAINT "triggers_agent_fk" FOREIGN KEY ("tenant_id","project_id","agent_id") REFERENCES "public"."agent"("tenant_id","project_id","id") ON DELETE cascade ON UPDATE no action;