@inkeep/agents-core 0.0.0-dev-20251010175818 → 0.0.0-dev-20251010183741

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.
@@ -1,4 +1,4 @@
1
- import { subAgents, subAgentRelations, agentGraph, tasks, taskRelations, tools, conversations, messages, contextCache, dataComponents, subAgentDataComponents, artifactComponents, subAgentArtifactComponents, externalAgents, apiKeys, credentialReferences, functions, contextConfigs, subAgentToolRelations, ledgerArtifacts, projects } from './chunk-5LRSB445.js';
1
+ import { subAgents, subAgentRelations, agentGraph, tasks, taskRelations, tools, conversations, messages, contextCache, dataComponents, subAgentDataComponents, artifactComponents, subAgentArtifactComponents, externalAgents, apiKeys, credentialReferences, functionTools, functions, contextConfigs, subAgentToolRelations, ledgerArtifacts, projects } from './chunk-ID4CFGVF.js';
2
2
  import { VALID_RELATION_TYPES, MCPTransportType, TOOL_STATUS_VALUES, CredentialStoreType, MCPServerType } from './chunk-YFHT5M2R.js';
3
3
  import { z } from '@hono/zod-openapi';
4
4
  import { createSelectSchema, createInsertSchema } from 'drizzle-zod';
@@ -185,32 +185,22 @@ var ToolSelectSchema = createSelectSchema(tools);
185
185
  var ToolInsertSchema = createInsertSchema(tools).extend({
186
186
  id: resourceIdSchema,
187
187
  imageUrl: imageUrlSchema,
188
- functionId: resourceIdSchema.optional(),
189
- // For function tools, reference to global functions table
190
- config: z.discriminatedUnion("type", [
191
- // MCP tools
192
- z.object({
193
- type: z.literal("mcp"),
194
- mcp: z.object({
195
- server: z.object({
196
- url: z.string().url()
197
- }),
198
- transport: z.object({
199
- type: z.enum(MCPTransportType),
200
- requestInit: z.record(z.string(), z.unknown()).optional(),
201
- eventSourceInit: z.record(z.string(), z.unknown()).optional(),
202
- reconnectionOptions: z.custom().optional(),
203
- sessionId: z.string().optional()
204
- }).optional(),
205
- activeTools: z.array(z.string()).optional()
206
- })
207
- }),
208
- // Function tools (reference-only, no inline duplication)
209
- z.object({
210
- type: z.literal("function")
211
- // No inline function details - they're in the functions table via functionId
188
+ config: z.object({
189
+ type: z.literal("mcp"),
190
+ mcp: z.object({
191
+ server: z.object({
192
+ url: z.string().url()
193
+ }),
194
+ transport: z.object({
195
+ type: z.enum(MCPTransportType),
196
+ requestInit: z.record(z.string(), z.unknown()).optional(),
197
+ eventSourceInit: z.record(z.string(), z.unknown()).optional(),
198
+ reconnectionOptions: z.custom().optional(),
199
+ sessionId: z.string().optional()
200
+ }).optional(),
201
+ activeTools: z.array(z.string()).optional()
212
202
  })
213
- ])
203
+ })
214
204
  });
215
205
  var ConversationSelectSchema = createSelectSchema(conversations);
216
206
  var ConversationInsertSchema = createInsertSchema(conversations).extend({
@@ -420,6 +410,14 @@ var ToolUpdateSchema = ToolInsertSchema.partial();
420
410
  var ToolApiSelectSchema = createApiSchema(ToolSelectSchema);
421
411
  var ToolApiInsertSchema = createApiInsertSchema(ToolInsertSchema);
422
412
  var ToolApiUpdateSchema = createApiUpdateSchema(ToolUpdateSchema);
413
+ var FunctionToolSelectSchema = createSelectSchema(functionTools);
414
+ var FunctionToolInsertSchema = createInsertSchema(functionTools).extend({
415
+ id: resourceIdSchema
416
+ });
417
+ var FunctionToolUpdateSchema = FunctionToolInsertSchema.partial();
418
+ var FunctionToolApiSelectSchema = createApiSchema(FunctionToolSelectSchema);
419
+ var FunctionToolApiInsertSchema = createGraphScopedApiInsertSchema(FunctionToolInsertSchema);
420
+ var FunctionToolApiUpdateSchema = createApiUpdateSchema(FunctionToolUpdateSchema);
423
421
  var FunctionSelectSchema = createSelectSchema(functions);
424
422
  var FunctionInsertSchema = createInsertSchema(functions).extend({
425
423
  id: resourceIdSchema
@@ -522,6 +520,24 @@ var FullGraphAgentInsertSchema = SubAgentApiInsertSchema.extend({
522
520
  canTransferTo: z.array(z.string()).optional(),
523
521
  canDelegateTo: z.array(z.string()).optional()
524
522
  });
523
+ var FullGraphDefinitionSchema = AgentGraphApiInsertSchema.extend({
524
+ subAgents: z.record(
525
+ z.string(),
526
+ z.union([FullGraphAgentInsertSchema, ExternalAgentApiInsertSchema])
527
+ ),
528
+ // Lookup maps for UI to resolve canUse items
529
+ tools: z.record(z.string(), ToolApiInsertSchema).optional(),
530
+ // MCP tools (project-scoped)
531
+ functionTools: z.record(z.string(), FunctionToolApiInsertSchema).optional(),
532
+ // Function tools (graph-scoped)
533
+ functions: z.record(z.string(), FunctionApiInsertSchema).optional(),
534
+ // Get function code for function tools
535
+ contextConfig: z.optional(ContextConfigApiInsertSchema),
536
+ statusUpdates: z.optional(StatusUpdateSchema),
537
+ models: ModelSchema.optional(),
538
+ stopWhen: GraphStopWhenSchema.optional(),
539
+ graphPrompt: z.string().max(5e3, "Graph prompt cannot exceed 5000 characters").optional()
540
+ });
525
541
  var GraphWithinContextOfProjectSchema = AgentGraphApiInsertSchema.extend({
526
542
  subAgents: z.record(
527
543
  z.string(),
@@ -530,9 +546,13 @@ var GraphWithinContextOfProjectSchema = AgentGraphApiInsertSchema.extend({
530
546
  ExternalAgentApiInsertSchema.extend({ type: z.literal("external") })
531
547
  ])
532
548
  ),
549
+ // Lookup maps for UI to resolve canUse items
533
550
  tools: z.record(z.string(), ToolApiInsertSchema).optional(),
534
- // Get tool name/description from toolId
551
+ // MCP tools (project-scoped)
552
+ functionTools: z.record(z.string(), FunctionToolApiInsertSchema).optional(),
553
+ // Function tools (graph-scoped)
535
554
  functions: z.record(z.string(), FunctionApiInsertSchema).optional(),
555
+ // Get function code for function tools
536
556
  contextConfig: z.optional(ContextConfigApiInsertSchema),
537
557
  statusUpdates: z.optional(StatusUpdateSchema),
538
558
  models: ModelSchema.optional(),
@@ -580,9 +600,9 @@ var ProjectApiUpdateSchema = ProjectUpdateSchema.omit({ tenantId: true });
580
600
  var FullProjectDefinitionSchema = ProjectApiInsertSchema.extend({
581
601
  graphs: z.record(z.string(), GraphWithinContextOfProjectSchema),
582
602
  tools: z.record(z.string(), ToolApiInsertSchema),
583
- // Now includes both MCP and function tools
603
+ // MCP tools (project-scoped)
584
604
  functions: z.record(z.string(), FunctionApiInsertSchema).optional(),
585
- // Global functions
605
+ // Functions (project-scoped)
586
606
  dataComponents: z.record(z.string(), DataComponentApiInsertSchema).optional(),
587
607
  artifactComponents: z.record(z.string(), ArtifactComponentApiInsertSchema).optional(),
588
608
  statusUpdates: z.optional(StatusUpdateSchema),
@@ -751,4 +771,4 @@ function validatePropsAsJsonSchema(props) {
751
771
  }
752
772
  }
753
773
 
754
- export { AgentGraphApiInsertSchema, AgentGraphApiSelectSchema, AgentGraphApiUpdateSchema, AgentGraphInsertSchema, AgentGraphSelectSchema, AgentGraphUpdateSchema, AllAgentSchema, ApiKeyApiCreationResponseSchema, ApiKeyApiInsertSchema, ApiKeyApiSelectSchema, ApiKeyApiUpdateSchema, ApiKeyInsertSchema, ApiKeySelectSchema, ApiKeyUpdateSchema, ArtifactComponentApiInsertSchema, ArtifactComponentApiSelectSchema, ArtifactComponentApiUpdateSchema, ArtifactComponentInsertSchema, ArtifactComponentSelectSchema, ArtifactComponentUpdateSchema, CanUseItemSchema, ContextCacheApiInsertSchema, ContextCacheApiSelectSchema, ContextCacheApiUpdateSchema, ContextCacheInsertSchema, ContextCacheSelectSchema, ContextCacheUpdateSchema, ContextConfigApiInsertSchema, ContextConfigApiSelectSchema, ContextConfigApiUpdateSchema, ContextConfigInsertSchema, ContextConfigSelectSchema, ContextConfigUpdateSchema, ConversationApiInsertSchema, ConversationApiSelectSchema, ConversationApiUpdateSchema, ConversationInsertSchema, ConversationSelectSchema, ConversationUpdateSchema, CredentialReferenceApiInsertSchema, CredentialReferenceApiSelectSchema, CredentialReferenceApiUpdateSchema, CredentialReferenceInsertSchema, CredentialReferenceSelectSchema, CredentialReferenceUpdateSchema, DataComponentApiInsertSchema, DataComponentApiSelectSchema, DataComponentApiUpdateSchema, DataComponentBaseSchema, DataComponentInsertSchema, DataComponentSelectSchema, DataComponentUpdateSchema, ErrorResponseSchema, ExistsResponseSchema, ExternalAgentApiInsertSchema, ExternalAgentApiSelectSchema, ExternalAgentApiUpdateSchema, ExternalAgentInsertSchema, ExternalAgentSelectSchema, ExternalAgentUpdateSchema, ExternalSubAgentRelationApiInsertSchema, ExternalSubAgentRelationInsertSchema, FetchConfigSchema, FetchDefinitionSchema, FullGraphAgentInsertSchema, FullProjectDefinitionSchema, FunctionApiInsertSchema, FunctionApiSelectSchema, FunctionApiUpdateSchema, FunctionInsertSchema, FunctionSelectSchema, FunctionToolConfigSchema, FunctionUpdateSchema, GraphStopWhenSchema, GraphWithinContextOfProjectSchema, HeadersScopeSchema, LedgerArtifactApiInsertSchema, LedgerArtifactApiSelectSchema, LedgerArtifactApiUpdateSchema, LedgerArtifactInsertSchema, LedgerArtifactSelectSchema, LedgerArtifactUpdateSchema, ListResponseSchema, MAX_ID_LENGTH, MCPToolConfigSchema, MIN_ID_LENGTH, McpToolDefinitionSchema, McpToolSchema, McpTransportConfigSchema, MessageApiInsertSchema, MessageApiSelectSchema, MessageApiUpdateSchema, MessageInsertSchema, MessageSelectSchema, MessageUpdateSchema, ModelSchema, ModelSettingsSchema, PaginationQueryParamsSchema, PaginationSchema, ProjectApiInsertSchema, ProjectApiSelectSchema, ProjectApiUpdateSchema, ProjectInsertSchema, ProjectModelSchema, ProjectSelectSchema, ProjectUpdateSchema, RemovedResponseSchema, SandboxConfigSchema, SingleResponseSchema, StatusComponentSchema, StatusUpdateSchema, StopWhenSchema, SubAgentApiInsertSchema, SubAgentApiSelectSchema, SubAgentApiUpdateSchema, SubAgentArtifactComponentApiInsertSchema, SubAgentArtifactComponentApiSelectSchema, SubAgentArtifactComponentApiUpdateSchema, SubAgentArtifactComponentInsertSchema, SubAgentArtifactComponentSelectSchema, SubAgentArtifactComponentUpdateSchema, SubAgentDataComponentApiInsertSchema, SubAgentDataComponentApiSelectSchema, SubAgentDataComponentApiUpdateSchema, SubAgentDataComponentInsertSchema, SubAgentDataComponentSelectSchema, SubAgentDataComponentUpdateSchema, SubAgentInsertSchema, SubAgentRelationApiInsertSchema, SubAgentRelationApiSelectSchema, SubAgentRelationApiUpdateSchema, SubAgentRelationInsertSchema, SubAgentRelationQuerySchema, SubAgentRelationSelectSchema, SubAgentRelationUpdateSchema, SubAgentSelectSchema, SubAgentStopWhenSchema, SubAgentToolRelationApiInsertSchema, SubAgentToolRelationApiSelectSchema, SubAgentToolRelationApiUpdateSchema, SubAgentToolRelationInsertSchema, SubAgentToolRelationSelectSchema, SubAgentToolRelationUpdateSchema, SubAgentUpdateSchema, TaskApiInsertSchema, TaskApiSelectSchema, TaskApiUpdateSchema, TaskInsertSchema, TaskRelationApiInsertSchema, TaskRelationApiSelectSchema, TaskRelationApiUpdateSchema, TaskRelationInsertSchema, TaskRelationSelectSchema, TaskRelationUpdateSchema, TaskSelectSchema, TaskUpdateSchema, TenantIdParamsSchema, TenantParamsSchema, TenantProjectGraphIdParamsSchema, TenantProjectGraphParamsSchema, TenantProjectGraphSubAgentIdParamsSchema, TenantProjectGraphSubAgentParamsSchema, TenantProjectIdParamsSchema, TenantProjectParamsSchema, ToolApiInsertSchema, ToolApiSelectSchema, ToolApiUpdateSchema, ToolInsertSchema, ToolSelectSchema, ToolStatusSchema, ToolUpdateSchema, URL_SAFE_ID_PATTERN, resourceIdSchema, validatePropsAsJsonSchema };
774
+ export { AgentGraphApiInsertSchema, AgentGraphApiSelectSchema, AgentGraphApiUpdateSchema, AgentGraphInsertSchema, AgentGraphSelectSchema, AgentGraphUpdateSchema, AllAgentSchema, ApiKeyApiCreationResponseSchema, ApiKeyApiInsertSchema, ApiKeyApiSelectSchema, ApiKeyApiUpdateSchema, ApiKeyInsertSchema, ApiKeySelectSchema, ApiKeyUpdateSchema, ArtifactComponentApiInsertSchema, ArtifactComponentApiSelectSchema, ArtifactComponentApiUpdateSchema, ArtifactComponentInsertSchema, ArtifactComponentSelectSchema, ArtifactComponentUpdateSchema, CanUseItemSchema, ContextCacheApiInsertSchema, ContextCacheApiSelectSchema, ContextCacheApiUpdateSchema, ContextCacheInsertSchema, ContextCacheSelectSchema, ContextCacheUpdateSchema, ContextConfigApiInsertSchema, ContextConfigApiSelectSchema, ContextConfigApiUpdateSchema, ContextConfigInsertSchema, ContextConfigSelectSchema, ContextConfigUpdateSchema, ConversationApiInsertSchema, ConversationApiSelectSchema, ConversationApiUpdateSchema, ConversationInsertSchema, ConversationSelectSchema, ConversationUpdateSchema, CredentialReferenceApiInsertSchema, CredentialReferenceApiSelectSchema, CredentialReferenceApiUpdateSchema, CredentialReferenceInsertSchema, CredentialReferenceSelectSchema, CredentialReferenceUpdateSchema, DataComponentApiInsertSchema, DataComponentApiSelectSchema, DataComponentApiUpdateSchema, DataComponentBaseSchema, DataComponentInsertSchema, DataComponentSelectSchema, DataComponentUpdateSchema, ErrorResponseSchema, ExistsResponseSchema, ExternalAgentApiInsertSchema, ExternalAgentApiSelectSchema, ExternalAgentApiUpdateSchema, ExternalAgentInsertSchema, ExternalAgentSelectSchema, ExternalAgentUpdateSchema, ExternalSubAgentRelationApiInsertSchema, ExternalSubAgentRelationInsertSchema, FetchConfigSchema, FetchDefinitionSchema, FullGraphAgentInsertSchema, FullGraphDefinitionSchema, FullProjectDefinitionSchema, FunctionApiInsertSchema, FunctionApiSelectSchema, FunctionApiUpdateSchema, FunctionInsertSchema, FunctionSelectSchema, FunctionToolApiInsertSchema, FunctionToolApiSelectSchema, FunctionToolApiUpdateSchema, FunctionToolConfigSchema, FunctionToolInsertSchema, FunctionToolSelectSchema, FunctionToolUpdateSchema, FunctionUpdateSchema, GraphStopWhenSchema, GraphWithinContextOfProjectSchema, HeadersScopeSchema, LedgerArtifactApiInsertSchema, LedgerArtifactApiSelectSchema, LedgerArtifactApiUpdateSchema, LedgerArtifactInsertSchema, LedgerArtifactSelectSchema, LedgerArtifactUpdateSchema, ListResponseSchema, MAX_ID_LENGTH, MCPToolConfigSchema, MIN_ID_LENGTH, McpToolDefinitionSchema, McpToolSchema, McpTransportConfigSchema, MessageApiInsertSchema, MessageApiSelectSchema, MessageApiUpdateSchema, MessageInsertSchema, MessageSelectSchema, MessageUpdateSchema, ModelSchema, ModelSettingsSchema, PaginationQueryParamsSchema, PaginationSchema, ProjectApiInsertSchema, ProjectApiSelectSchema, ProjectApiUpdateSchema, ProjectInsertSchema, ProjectModelSchema, ProjectSelectSchema, ProjectUpdateSchema, RemovedResponseSchema, SandboxConfigSchema, SingleResponseSchema, StatusComponentSchema, StatusUpdateSchema, StopWhenSchema, SubAgentApiInsertSchema, SubAgentApiSelectSchema, SubAgentApiUpdateSchema, SubAgentArtifactComponentApiInsertSchema, SubAgentArtifactComponentApiSelectSchema, SubAgentArtifactComponentApiUpdateSchema, SubAgentArtifactComponentInsertSchema, SubAgentArtifactComponentSelectSchema, SubAgentArtifactComponentUpdateSchema, SubAgentDataComponentApiInsertSchema, SubAgentDataComponentApiSelectSchema, SubAgentDataComponentApiUpdateSchema, SubAgentDataComponentInsertSchema, SubAgentDataComponentSelectSchema, SubAgentDataComponentUpdateSchema, SubAgentInsertSchema, SubAgentRelationApiInsertSchema, SubAgentRelationApiSelectSchema, SubAgentRelationApiUpdateSchema, SubAgentRelationInsertSchema, SubAgentRelationQuerySchema, SubAgentRelationSelectSchema, SubAgentRelationUpdateSchema, SubAgentSelectSchema, SubAgentStopWhenSchema, SubAgentToolRelationApiInsertSchema, SubAgentToolRelationApiSelectSchema, SubAgentToolRelationApiUpdateSchema, SubAgentToolRelationInsertSchema, SubAgentToolRelationSelectSchema, SubAgentToolRelationUpdateSchema, SubAgentUpdateSchema, TaskApiInsertSchema, TaskApiSelectSchema, TaskApiUpdateSchema, TaskInsertSchema, TaskRelationApiInsertSchema, TaskRelationApiSelectSchema, TaskRelationApiUpdateSchema, TaskRelationInsertSchema, TaskRelationSelectSchema, TaskRelationUpdateSchema, TaskSelectSchema, TaskUpdateSchema, TenantIdParamsSchema, TenantParamsSchema, TenantProjectGraphIdParamsSchema, TenantProjectGraphParamsSchema, TenantProjectGraphSubAgentIdParamsSchema, TenantProjectGraphSubAgentParamsSchema, TenantProjectIdParamsSchema, TenantProjectParamsSchema, ToolApiInsertSchema, ToolApiSelectSchema, ToolApiUpdateSchema, ToolInsertSchema, ToolSelectSchema, ToolStatusSchema, ToolUpdateSchema, URL_SAFE_ID_PATTERN, resourceIdSchema, validatePropsAsJsonSchema };
@@ -5,6 +5,8 @@ import { sqliteTable, text, primaryKey, foreignKey, blob, integer, index, unique
5
5
  // src/db/schema.ts
6
6
  var schema_exports = {};
7
7
  __export(schema_exports, {
8
+ agentFunctionToolRelations: () => agentFunctionToolRelations,
9
+ agentFunctionToolRelationsRelations: () => agentFunctionToolRelationsRelations,
8
10
  agentGraph: () => agentGraph,
9
11
  agentGraphRelations: () => agentGraphRelations,
10
12
  agentToolRelationsRelations: () => agentToolRelationsRelations,
@@ -24,6 +26,8 @@ __export(schema_exports, {
24
26
  dataComponentsRelations: () => dataComponentsRelations,
25
27
  externalAgents: () => externalAgents,
26
28
  externalAgentsRelations: () => externalAgentsRelations,
29
+ functionTools: () => functionTools,
30
+ functionToolsRelations: () => functionToolsRelations,
27
31
  functions: () => functions,
28
32
  functionsRelations: () => functionsRelations,
29
33
  ledgerArtifacts: () => ledgerArtifacts,
@@ -374,10 +378,7 @@ var tools = sqliteTable(
374
378
  ...projectScoped,
375
379
  name: text("name").notNull(),
376
380
  description: text("description"),
377
- // Tool configuration - supports both MCP and function tools
378
381
  config: blob("config", { mode: "json" }).$type().notNull(),
379
- // For function tools, reference the global functions table
380
- functionId: text("function_id"),
381
382
  credentialReferenceId: text("credential_reference_id"),
382
383
  headers: blob("headers", { mode: "json" }).$type(),
383
384
  // Image URL for custom tool icon (supports regular URLs and base64 encoded images)
@@ -393,12 +394,30 @@ var tools = sqliteTable(
393
394
  columns: [table.tenantId, table.projectId],
394
395
  foreignColumns: [projects.tenantId, projects.id],
395
396
  name: "tools_project_fk"
397
+ }).onDelete("cascade")
398
+ ]
399
+ );
400
+ var functionTools = sqliteTable(
401
+ "function_tools",
402
+ {
403
+ ...graphScoped,
404
+ name: text("name").notNull(),
405
+ description: text("description"),
406
+ functionId: text("function_id").notNull(),
407
+ ...timestamps
408
+ },
409
+ (table) => [
410
+ primaryKey({ columns: [table.tenantId, table.projectId, table.graphId, table.id] }),
411
+ foreignKey({
412
+ columns: [table.tenantId, table.projectId, table.graphId],
413
+ foreignColumns: [agentGraph.tenantId, agentGraph.projectId, agentGraph.id],
414
+ name: "function_tools_graph_fk"
396
415
  }).onDelete("cascade"),
397
- // Foreign key constraint to functions table (for function tools)
416
+ // Foreign key constraint to functions table
398
417
  foreignKey({
399
418
  columns: [table.tenantId, table.projectId, table.functionId],
400
419
  foreignColumns: [functions.tenantId, functions.projectId, functions.id],
401
- name: "tools_function_fk"
420
+ name: "function_tools_function_fk"
402
421
  }).onDelete("cascade")
403
422
  ]
404
423
  );
@@ -437,7 +456,7 @@ var subAgentToolRelations = sqliteTable(
437
456
  foreignColumns: [subAgents.tenantId, subAgents.projectId, subAgents.graphId, subAgents.id],
438
457
  name: "sub_agent_tool_relations_agent_fk"
439
458
  }).onDelete("cascade"),
440
- // Foreign key constraint to tools table
459
+ // Foreign key constraint to tools table (MCP tools)
441
460
  foreignKey({
442
461
  columns: [table.tenantId, table.projectId, table.toolId],
443
462
  foreignColumns: [tools.tenantId, tools.projectId, tools.id],
@@ -445,6 +464,34 @@ var subAgentToolRelations = sqliteTable(
445
464
  }).onDelete("cascade")
446
465
  ]
447
466
  );
467
+ var agentFunctionToolRelations = sqliteTable(
468
+ "agent_function_tool_relations",
469
+ {
470
+ ...subAgentScoped,
471
+ functionToolId: text("function_tool_id").notNull(),
472
+ ...timestamps
473
+ },
474
+ (table) => [
475
+ primaryKey({ columns: [table.tenantId, table.projectId, table.graphId, table.id] }),
476
+ // Foreign key constraint to agents table
477
+ foreignKey({
478
+ columns: [table.tenantId, table.projectId, table.graphId, table.subAgentId],
479
+ foreignColumns: [subAgents.tenantId, subAgents.projectId, subAgents.graphId, subAgents.id],
480
+ name: "agent_function_tool_relations_agent_fk"
481
+ }).onDelete("cascade"),
482
+ // Foreign key constraint to functionTools table
483
+ foreignKey({
484
+ columns: [table.tenantId, table.projectId, table.graphId, table.functionToolId],
485
+ foreignColumns: [
486
+ functionTools.tenantId,
487
+ functionTools.projectId,
488
+ functionTools.graphId,
489
+ functionTools.id
490
+ ],
491
+ name: "agent_function_tool_relations_function_tool_fk"
492
+ }).onDelete("cascade")
493
+ ]
494
+ );
448
495
  var conversations = sqliteTable(
449
496
  "conversations",
450
497
  {
@@ -630,6 +677,7 @@ var projectsRelations = relations(projects, ({ many }) => ({
630
677
  subAgents: many(subAgents),
631
678
  agentGraphs: many(agentGraph),
632
679
  tools: many(tools),
680
+ functions: many(functions),
633
681
  contextConfigs: many(contextConfigs),
634
682
  externalAgents: many(externalAgents),
635
683
  conversations: many(conversations),
@@ -688,10 +736,11 @@ var subAgentsRelations = relations(subAgents, ({ many, one }) => ({
688
736
  relationName: "associatedAgent"
689
737
  }),
690
738
  toolRelations: many(subAgentToolRelations),
739
+ functionToolRelations: many(agentFunctionToolRelations),
691
740
  dataComponentRelations: many(subAgentDataComponents),
692
741
  artifactComponentRelations: many(subAgentArtifactComponents)
693
742
  }));
694
- var agentGraphRelations = relations(agentGraph, ({ one }) => ({
743
+ var agentGraphRelations = relations(agentGraph, ({ one, many }) => ({
695
744
  project: one(projects, {
696
745
  fields: [agentGraph.tenantId, agentGraph.projectId],
697
746
  references: [projects.tenantId, projects.id]
@@ -703,7 +752,8 @@ var agentGraphRelations = relations(agentGraph, ({ one }) => ({
703
752
  contextConfig: one(contextConfigs, {
704
753
  fields: [agentGraph.contextConfigId],
705
754
  references: [contextConfigs.id]
706
- })
755
+ }),
756
+ functionTools: many(functionTools)
707
757
  }));
708
758
  var externalAgentsRelations = relations(externalAgents, ({ one, many }) => ({
709
759
  project: one(projects, {
@@ -748,10 +798,6 @@ var toolsRelations = relations(tools, ({ one, many }) => ({
748
798
  credentialReference: one(credentialReferences, {
749
799
  fields: [tools.credentialReferenceId],
750
800
  references: [credentialReferences.id]
751
- }),
752
- function: one(functions, {
753
- fields: [tools.functionId],
754
- references: [functions.id]
755
801
  })
756
802
  }));
757
803
  var conversationsRelations = relations(conversations, ({ one, many }) => ({
@@ -851,7 +897,7 @@ var ledgerArtifactsRelations = relations(ledgerArtifacts, ({ one }) => ({
851
897
  })
852
898
  }));
853
899
  var functionsRelations = relations(functions, ({ many }) => ({
854
- tools: many(tools)
900
+ functionTools: many(functionTools)
855
901
  }));
856
902
  var subAgentRelationsRelations = relations(subAgentRelations, ({ one }) => ({
857
903
  graph: one(agentGraph, {
@@ -873,5 +919,33 @@ var subAgentRelationsRelations = relations(subAgentRelations, ({ one }) => ({
873
919
  references: [externalAgents.id]
874
920
  })
875
921
  }));
922
+ var functionToolsRelations = relations(functionTools, ({ one, many }) => ({
923
+ project: one(projects, {
924
+ fields: [functionTools.tenantId, functionTools.projectId],
925
+ references: [projects.tenantId, projects.id]
926
+ }),
927
+ graph: one(agentGraph, {
928
+ fields: [functionTools.tenantId, functionTools.projectId, functionTools.graphId],
929
+ references: [agentGraph.tenantId, agentGraph.projectId, agentGraph.id]
930
+ }),
931
+ function: one(functions, {
932
+ fields: [functionTools.tenantId, functionTools.projectId, functionTools.functionId],
933
+ references: [functions.tenantId, functions.projectId, functions.id]
934
+ }),
935
+ agentRelations: many(agentFunctionToolRelations)
936
+ }));
937
+ var agentFunctionToolRelationsRelations = relations(
938
+ agentFunctionToolRelations,
939
+ ({ one }) => ({
940
+ agent: one(subAgents, {
941
+ fields: [agentFunctionToolRelations.subAgentId],
942
+ references: [subAgents.id]
943
+ }),
944
+ functionTool: one(functionTools, {
945
+ fields: [agentFunctionToolRelations.functionToolId],
946
+ references: [functionTools.id]
947
+ })
948
+ })
949
+ );
876
950
 
877
- export { agentGraph, agentGraphRelations, agentToolRelationsRelations, apiKeys, apiKeysRelations, artifactComponents, artifactComponentsRelations, contextCache, contextCacheRelations, contextConfigs, contextConfigsRelations, conversations, conversationsRelations, credentialReferences, credentialReferencesRelations, dataComponents, dataComponentsRelations, externalAgents, externalAgentsRelations, functions, functionsRelations, ledgerArtifacts, ledgerArtifactsRelations, messages, messagesRelations, projects, projectsRelations, schema_exports, subAgentArtifactComponents, subAgentArtifactComponentsRelations, subAgentDataComponents, subAgentDataComponentsRelations, subAgentRelations, subAgentRelationsRelations, subAgentToolRelations, subAgents, subAgentsRelations, taskRelations, taskRelationsRelations, tasks, tasksRelations, tools, toolsRelations };
951
+ export { agentFunctionToolRelations, agentFunctionToolRelationsRelations, agentGraph, agentGraphRelations, agentToolRelationsRelations, apiKeys, apiKeysRelations, artifactComponents, artifactComponentsRelations, contextCache, contextCacheRelations, contextConfigs, contextConfigsRelations, conversations, conversationsRelations, credentialReferences, credentialReferencesRelations, dataComponents, dataComponentsRelations, externalAgents, externalAgentsRelations, functionTools, functionToolsRelations, functions, functionsRelations, ledgerArtifacts, ledgerArtifactsRelations, messages, messagesRelations, projects, projectsRelations, schema_exports, subAgentArtifactComponents, subAgentArtifactComponentsRelations, subAgentDataComponents, subAgentDataComponentsRelations, subAgentRelations, subAgentRelationsRelations, subAgentToolRelations, subAgents, subAgentsRelations, taskRelations, taskRelationsRelations, tasks, tasksRelations, tools, toolsRelations };
@@ -1,4 +1,4 @@
1
- import { GraphWithinContextOfProjectSchema, resourceIdSchema, MAX_ID_LENGTH } from './chunk-NEJ3QDK6.js';
1
+ import { GraphWithinContextOfProjectSchema, resourceIdSchema, MAX_ID_LENGTH } from './chunk-E4SFK6AI.js';
2
2
  import { z } from 'zod';
3
3
 
4
4
  var TransferDataSchema = z.object({
@@ -355,10 +355,7 @@ var tools = sqliteCore.sqliteTable(
355
355
  ...projectScoped,
356
356
  name: sqliteCore.text("name").notNull(),
357
357
  description: sqliteCore.text("description"),
358
- // Tool configuration - supports both MCP and function tools
359
358
  config: sqliteCore.blob("config", { mode: "json" }).$type().notNull(),
360
- // For function tools, reference the global functions table
361
- functionId: sqliteCore.text("function_id"),
362
359
  credentialReferenceId: sqliteCore.text("credential_reference_id"),
363
360
  headers: sqliteCore.blob("headers", { mode: "json" }).$type(),
364
361
  // Image URL for custom tool icon (supports regular URLs and base64 encoded images)
@@ -374,12 +371,30 @@ var tools = sqliteCore.sqliteTable(
374
371
  columns: [table.tenantId, table.projectId],
375
372
  foreignColumns: [projects.tenantId, projects.id],
376
373
  name: "tools_project_fk"
374
+ }).onDelete("cascade")
375
+ ]
376
+ );
377
+ var functionTools = sqliteCore.sqliteTable(
378
+ "function_tools",
379
+ {
380
+ ...graphScoped,
381
+ name: sqliteCore.text("name").notNull(),
382
+ description: sqliteCore.text("description"),
383
+ functionId: sqliteCore.text("function_id").notNull(),
384
+ ...timestamps
385
+ },
386
+ (table) => [
387
+ sqliteCore.primaryKey({ columns: [table.tenantId, table.projectId, table.graphId, table.id] }),
388
+ sqliteCore.foreignKey({
389
+ columns: [table.tenantId, table.projectId, table.graphId],
390
+ foreignColumns: [agentGraph.tenantId, agentGraph.projectId, agentGraph.id],
391
+ name: "function_tools_graph_fk"
377
392
  }).onDelete("cascade"),
378
- // Foreign key constraint to functions table (for function tools)
393
+ // Foreign key constraint to functions table
379
394
  sqliteCore.foreignKey({
380
395
  columns: [table.tenantId, table.projectId, table.functionId],
381
396
  foreignColumns: [functions.tenantId, functions.projectId, functions.id],
382
- name: "tools_function_fk"
397
+ name: "function_tools_function_fk"
383
398
  }).onDelete("cascade")
384
399
  ]
385
400
  );
@@ -418,7 +433,7 @@ var subAgentToolRelations = sqliteCore.sqliteTable(
418
433
  foreignColumns: [subAgents.tenantId, subAgents.projectId, subAgents.graphId, subAgents.id],
419
434
  name: "sub_agent_tool_relations_agent_fk"
420
435
  }).onDelete("cascade"),
421
- // Foreign key constraint to tools table
436
+ // Foreign key constraint to tools table (MCP tools)
422
437
  sqliteCore.foreignKey({
423
438
  columns: [table.tenantId, table.projectId, table.toolId],
424
439
  foreignColumns: [tools.tenantId, tools.projectId, tools.id],
@@ -426,6 +441,34 @@ var subAgentToolRelations = sqliteCore.sqliteTable(
426
441
  }).onDelete("cascade")
427
442
  ]
428
443
  );
444
+ var agentFunctionToolRelations = sqliteCore.sqliteTable(
445
+ "agent_function_tool_relations",
446
+ {
447
+ ...subAgentScoped,
448
+ functionToolId: sqliteCore.text("function_tool_id").notNull(),
449
+ ...timestamps
450
+ },
451
+ (table) => [
452
+ sqliteCore.primaryKey({ columns: [table.tenantId, table.projectId, table.graphId, table.id] }),
453
+ // Foreign key constraint to agents table
454
+ sqliteCore.foreignKey({
455
+ columns: [table.tenantId, table.projectId, table.graphId, table.subAgentId],
456
+ foreignColumns: [subAgents.tenantId, subAgents.projectId, subAgents.graphId, subAgents.id],
457
+ name: "agent_function_tool_relations_agent_fk"
458
+ }).onDelete("cascade"),
459
+ // Foreign key constraint to functionTools table
460
+ sqliteCore.foreignKey({
461
+ columns: [table.tenantId, table.projectId, table.graphId, table.functionToolId],
462
+ foreignColumns: [
463
+ functionTools.tenantId,
464
+ functionTools.projectId,
465
+ functionTools.graphId,
466
+ functionTools.id
467
+ ],
468
+ name: "agent_function_tool_relations_function_tool_fk"
469
+ }).onDelete("cascade")
470
+ ]
471
+ );
429
472
  var conversations = sqliteCore.sqliteTable(
430
473
  "conversations",
431
474
  {
@@ -611,6 +654,7 @@ drizzleOrm.relations(projects, ({ many }) => ({
611
654
  subAgents: many(subAgents),
612
655
  agentGraphs: many(agentGraph),
613
656
  tools: many(tools),
657
+ functions: many(functions),
614
658
  contextConfigs: many(contextConfigs),
615
659
  externalAgents: many(externalAgents),
616
660
  conversations: many(conversations),
@@ -669,10 +713,11 @@ drizzleOrm.relations(subAgents, ({ many, one }) => ({
669
713
  relationName: "associatedAgent"
670
714
  }),
671
715
  toolRelations: many(subAgentToolRelations),
716
+ functionToolRelations: many(agentFunctionToolRelations),
672
717
  dataComponentRelations: many(subAgentDataComponents),
673
718
  artifactComponentRelations: many(subAgentArtifactComponents)
674
719
  }));
675
- drizzleOrm.relations(agentGraph, ({ one }) => ({
720
+ drizzleOrm.relations(agentGraph, ({ one, many }) => ({
676
721
  project: one(projects, {
677
722
  fields: [agentGraph.tenantId, agentGraph.projectId],
678
723
  references: [projects.tenantId, projects.id]
@@ -684,7 +729,8 @@ drizzleOrm.relations(agentGraph, ({ one }) => ({
684
729
  contextConfig: one(contextConfigs, {
685
730
  fields: [agentGraph.contextConfigId],
686
731
  references: [contextConfigs.id]
687
- })
732
+ }),
733
+ functionTools: many(functionTools)
688
734
  }));
689
735
  drizzleOrm.relations(externalAgents, ({ one, many }) => ({
690
736
  project: one(projects, {
@@ -729,10 +775,6 @@ drizzleOrm.relations(tools, ({ one, many }) => ({
729
775
  credentialReference: one(credentialReferences, {
730
776
  fields: [tools.credentialReferenceId],
731
777
  references: [credentialReferences.id]
732
- }),
733
- function: one(functions, {
734
- fields: [tools.functionId],
735
- references: [functions.id]
736
778
  })
737
779
  }));
738
780
  drizzleOrm.relations(conversations, ({ one, many }) => ({
@@ -832,7 +874,7 @@ drizzleOrm.relations(ledgerArtifacts, ({ one }) => ({
832
874
  })
833
875
  }));
834
876
  drizzleOrm.relations(functions, ({ many }) => ({
835
- tools: many(tools)
877
+ functionTools: many(functionTools)
836
878
  }));
837
879
  drizzleOrm.relations(subAgentRelations, ({ one }) => ({
838
880
  graph: one(agentGraph, {
@@ -854,6 +896,34 @@ drizzleOrm.relations(subAgentRelations, ({ one }) => ({
854
896
  references: [externalAgents.id]
855
897
  })
856
898
  }));
899
+ drizzleOrm.relations(functionTools, ({ one, many }) => ({
900
+ project: one(projects, {
901
+ fields: [functionTools.tenantId, functionTools.projectId],
902
+ references: [projects.tenantId, projects.id]
903
+ }),
904
+ graph: one(agentGraph, {
905
+ fields: [functionTools.tenantId, functionTools.projectId, functionTools.graphId],
906
+ references: [agentGraph.tenantId, agentGraph.projectId, agentGraph.id]
907
+ }),
908
+ function: one(functions, {
909
+ fields: [functionTools.tenantId, functionTools.projectId, functionTools.functionId],
910
+ references: [functions.tenantId, functions.projectId, functions.id]
911
+ }),
912
+ agentRelations: many(agentFunctionToolRelations)
913
+ }));
914
+ drizzleOrm.relations(
915
+ agentFunctionToolRelations,
916
+ ({ one }) => ({
917
+ agent: one(subAgents, {
918
+ fields: [agentFunctionToolRelations.subAgentId],
919
+ references: [subAgents.id]
920
+ }),
921
+ functionTool: one(functionTools, {
922
+ fields: [agentFunctionToolRelations.functionToolId],
923
+ references: [functionTools.id]
924
+ })
925
+ })
926
+ );
857
927
 
858
928
  // src/validation/schemas.ts
859
929
  var StopWhenSchema = zodOpenapi.z.object({
@@ -1037,32 +1107,22 @@ var ToolSelectSchema = drizzleZod.createSelectSchema(tools);
1037
1107
  var ToolInsertSchema = drizzleZod.createInsertSchema(tools).extend({
1038
1108
  id: resourceIdSchema,
1039
1109
  imageUrl: imageUrlSchema,
1040
- functionId: resourceIdSchema.optional(),
1041
- // For function tools, reference to global functions table
1042
- config: zodOpenapi.z.discriminatedUnion("type", [
1043
- // MCP tools
1044
- zodOpenapi.z.object({
1045
- type: zodOpenapi.z.literal("mcp"),
1046
- mcp: zodOpenapi.z.object({
1047
- server: zodOpenapi.z.object({
1048
- url: zodOpenapi.z.string().url()
1049
- }),
1050
- transport: zodOpenapi.z.object({
1051
- type: zodOpenapi.z.enum(MCPTransportType),
1052
- requestInit: zodOpenapi.z.record(zodOpenapi.z.string(), zodOpenapi.z.unknown()).optional(),
1053
- eventSourceInit: zodOpenapi.z.record(zodOpenapi.z.string(), zodOpenapi.z.unknown()).optional(),
1054
- reconnectionOptions: zodOpenapi.z.custom().optional(),
1055
- sessionId: zodOpenapi.z.string().optional()
1056
- }).optional(),
1057
- activeTools: zodOpenapi.z.array(zodOpenapi.z.string()).optional()
1058
- })
1059
- }),
1060
- // Function tools (reference-only, no inline duplication)
1061
- zodOpenapi.z.object({
1062
- type: zodOpenapi.z.literal("function")
1063
- // No inline function details - they're in the functions table via functionId
1110
+ config: zodOpenapi.z.object({
1111
+ type: zodOpenapi.z.literal("mcp"),
1112
+ mcp: zodOpenapi.z.object({
1113
+ server: zodOpenapi.z.object({
1114
+ url: zodOpenapi.z.string().url()
1115
+ }),
1116
+ transport: zodOpenapi.z.object({
1117
+ type: zodOpenapi.z.enum(MCPTransportType),
1118
+ requestInit: zodOpenapi.z.record(zodOpenapi.z.string(), zodOpenapi.z.unknown()).optional(),
1119
+ eventSourceInit: zodOpenapi.z.record(zodOpenapi.z.string(), zodOpenapi.z.unknown()).optional(),
1120
+ reconnectionOptions: zodOpenapi.z.custom().optional(),
1121
+ sessionId: zodOpenapi.z.string().optional()
1122
+ }).optional(),
1123
+ activeTools: zodOpenapi.z.array(zodOpenapi.z.string()).optional()
1064
1124
  })
1065
- ])
1125
+ })
1066
1126
  });
1067
1127
  var ConversationSelectSchema = drizzleZod.createSelectSchema(conversations);
1068
1128
  var ConversationInsertSchema = drizzleZod.createInsertSchema(conversations).extend({
@@ -1271,6 +1331,14 @@ var ToolUpdateSchema = ToolInsertSchema.partial();
1271
1331
  createApiSchema(ToolSelectSchema);
1272
1332
  var ToolApiInsertSchema = createApiInsertSchema(ToolInsertSchema);
1273
1333
  createApiUpdateSchema(ToolUpdateSchema);
1334
+ var FunctionToolSelectSchema = drizzleZod.createSelectSchema(functionTools);
1335
+ var FunctionToolInsertSchema = drizzleZod.createInsertSchema(functionTools).extend({
1336
+ id: resourceIdSchema
1337
+ });
1338
+ var FunctionToolUpdateSchema = FunctionToolInsertSchema.partial();
1339
+ createApiSchema(FunctionToolSelectSchema);
1340
+ var FunctionToolApiInsertSchema = createGraphScopedApiInsertSchema(FunctionToolInsertSchema);
1341
+ createApiUpdateSchema(FunctionToolUpdateSchema);
1274
1342
  var FunctionSelectSchema = drizzleZod.createSelectSchema(functions);
1275
1343
  var FunctionInsertSchema = drizzleZod.createInsertSchema(functions).extend({
1276
1344
  id: resourceIdSchema
@@ -1373,6 +1441,24 @@ var FullGraphAgentInsertSchema = SubAgentApiInsertSchema.extend({
1373
1441
  canTransferTo: zodOpenapi.z.array(zodOpenapi.z.string()).optional(),
1374
1442
  canDelegateTo: zodOpenapi.z.array(zodOpenapi.z.string()).optional()
1375
1443
  });
1444
+ AgentGraphApiInsertSchema.extend({
1445
+ subAgents: zodOpenapi.z.record(
1446
+ zodOpenapi.z.string(),
1447
+ zodOpenapi.z.union([FullGraphAgentInsertSchema, ExternalAgentApiInsertSchema])
1448
+ ),
1449
+ // Lookup maps for UI to resolve canUse items
1450
+ tools: zodOpenapi.z.record(zodOpenapi.z.string(), ToolApiInsertSchema).optional(),
1451
+ // MCP tools (project-scoped)
1452
+ functionTools: zodOpenapi.z.record(zodOpenapi.z.string(), FunctionToolApiInsertSchema).optional(),
1453
+ // Function tools (graph-scoped)
1454
+ functions: zodOpenapi.z.record(zodOpenapi.z.string(), FunctionApiInsertSchema).optional(),
1455
+ // Get function code for function tools
1456
+ contextConfig: zodOpenapi.z.optional(ContextConfigApiInsertSchema),
1457
+ statusUpdates: zodOpenapi.z.optional(StatusUpdateSchema),
1458
+ models: ModelSchema.optional(),
1459
+ stopWhen: GraphStopWhenSchema.optional(),
1460
+ graphPrompt: zodOpenapi.z.string().max(5e3, "Graph prompt cannot exceed 5000 characters").optional()
1461
+ });
1376
1462
  var GraphWithinContextOfProjectSchema = AgentGraphApiInsertSchema.extend({
1377
1463
  subAgents: zodOpenapi.z.record(
1378
1464
  zodOpenapi.z.string(),
@@ -1381,9 +1467,13 @@ var GraphWithinContextOfProjectSchema = AgentGraphApiInsertSchema.extend({
1381
1467
  ExternalAgentApiInsertSchema.extend({ type: zodOpenapi.z.literal("external") })
1382
1468
  ])
1383
1469
  ),
1470
+ // Lookup maps for UI to resolve canUse items
1384
1471
  tools: zodOpenapi.z.record(zodOpenapi.z.string(), ToolApiInsertSchema).optional(),
1385
- // Get tool name/description from toolId
1472
+ // MCP tools (project-scoped)
1473
+ functionTools: zodOpenapi.z.record(zodOpenapi.z.string(), FunctionToolApiInsertSchema).optional(),
1474
+ // Function tools (graph-scoped)
1386
1475
  functions: zodOpenapi.z.record(zodOpenapi.z.string(), FunctionApiInsertSchema).optional(),
1476
+ // Get function code for function tools
1387
1477
  contextConfig: zodOpenapi.z.optional(ContextConfigApiInsertSchema),
1388
1478
  statusUpdates: zodOpenapi.z.optional(StatusUpdateSchema),
1389
1479
  models: ModelSchema.optional(),
@@ -1424,9 +1514,9 @@ ProjectUpdateSchema.omit({ tenantId: true });
1424
1514
  ProjectApiInsertSchema.extend({
1425
1515
  graphs: zodOpenapi.z.record(zodOpenapi.z.string(), GraphWithinContextOfProjectSchema),
1426
1516
  tools: zodOpenapi.z.record(zodOpenapi.z.string(), ToolApiInsertSchema),
1427
- // Now includes both MCP and function tools
1517
+ // MCP tools (project-scoped)
1428
1518
  functions: zodOpenapi.z.record(zodOpenapi.z.string(), FunctionApiInsertSchema).optional(),
1429
- // Global functions
1519
+ // Functions (project-scoped)
1430
1520
  dataComponents: zodOpenapi.z.record(zodOpenapi.z.string(), DataComponentApiInsertSchema).optional(),
1431
1521
  artifactComponents: zodOpenapi.z.record(zodOpenapi.z.string(), ArtifactComponentApiInsertSchema).optional(),
1432
1522
  statusUpdates: zodOpenapi.z.optional(StatusUpdateSchema),
@@ -1974,7 +2064,7 @@ var AgentGraphApiInsertSchema2 = zod.z.object({
1974
2064
  description: zod.z.string().optional(),
1975
2065
  defaultSubAgentId: zod.z.string().optional()
1976
2066
  });
1977
- var FullGraphDefinitionSchema = AgentGraphApiInsertSchema2.extend({
2067
+ var FullGraphDefinitionSchema2 = AgentGraphApiInsertSchema2.extend({
1978
2068
  subAgents: zod.z.record(
1979
2069
  zod.z.string(),
1980
2070
  zod.z.union([
@@ -2059,7 +2149,7 @@ exports.DataComponentApiInsertSchema = DataComponentApiInsertSchema2;
2059
2149
  exports.ErrorResponseSchema = ErrorResponseSchema2;
2060
2150
  exports.ExternalAgentApiInsertSchema = ExternalAgentApiInsertSchema2;
2061
2151
  exports.FIELD_TYPES = FIELD_TYPES;
2062
- exports.FullGraphDefinitionSchema = FullGraphDefinitionSchema;
2152
+ exports.FullGraphDefinitionSchema = FullGraphDefinitionSchema2;
2063
2153
  exports.FunctionApiInsertSchema = FunctionApiInsertSchema;
2064
2154
  exports.FunctionApiSelectSchema = FunctionApiSelectSchema;
2065
2155
  exports.FunctionApiUpdateSchema = FunctionApiUpdateSchema;
@@ -1,7 +1,7 @@
1
1
  export { h as ACTIVITY_NAMES, f as ACTIVITY_STATUS, e as ACTIVITY_TYPES, g as AGENT_IDS, p as AGGREGATE_OPERATORS, A as AI_OPERATIONS, j as AI_TOOL_TYPES, o as DATA_SOURCES, k as DATA_TYPES, D as DELEGATION_FROM_SUB_AGENT_ID, b as DELEGATION_ID, a as DELEGATION_TO_SUB_AGENT_ID, F as FIELD_TYPES, O as OPERATORS, m as ORDER_DIRECTIONS, P as PANEL_TYPES, q as QUERY_DEFAULTS, l as QUERY_EXPRESSIONS, Q as QUERY_FIELD_CONFIGS, n as QUERY_TYPES, R as REDUCE_OPERATIONS, d as SPAN_KEYS, S as SPAN_NAMES, i as TOOL_NAMES, T as TRANSFER_FROM_SUB_AGENT_ID, c as TRANSFER_TO_SUB_AGENT_ID, U as UNKNOWN_VALUE } from './signoz-queries-CifqdbnO.cjs';
2
2
  import { z } from 'zod';
3
- import { C as ConversationHistoryConfig, F as FunctionApiInsertSchema, A as ApiKeyApiUpdateSchema, a as FullGraphAgentInsertSchema } from './utility-D_8q6Vlh.cjs';
4
- export { e as AgentStopWhen, b as AgentStopWhenSchema, g as CredentialStoreType, i as FunctionApiSelectSchema, j as FunctionApiUpdateSchema, d as GraphStopWhen, G as GraphStopWhenSchema, h as MCPTransportType, f as ModelSettings, M as ModelSettingsSchema, k as SandboxConfigSchema, c as StopWhen, S as StopWhenSchema } from './utility-D_8q6Vlh.cjs';
3
+ import { C as ConversationHistoryConfig, F as FunctionApiInsertSchema, A as ApiKeyApiUpdateSchema, a as FullGraphAgentInsertSchema } from './utility-Fxoh7s82.cjs';
4
+ export { e as AgentStopWhen, b as AgentStopWhenSchema, g as CredentialStoreType, i as FunctionApiSelectSchema, j as FunctionApiUpdateSchema, d as GraphStopWhen, G as GraphStopWhenSchema, h as MCPTransportType, f as ModelSettings, M as ModelSettingsSchema, k as SandboxConfigSchema, c as StopWhen, S as StopWhenSchema } from './utility-Fxoh7s82.cjs';
5
5
  export { v as validatePropsAsJsonSchema } from './props-validation-BMR1qNiy.cjs';
6
6
  import 'drizzle-zod';
7
7
  import 'drizzle-orm/sqlite-core';