@inkeep/agents-core 0.0.0-dev-20251008200151 → 0.0.0-dev-20251009005405

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 { agents, agentRelations, agentGraph, tasks, taskRelations, tools, conversations, messages, contextCache, dataComponents, agentDataComponents, artifactComponents, agentArtifactComponents, externalAgents, apiKeys, credentialReferences, contextConfigs, agentToolRelations, ledgerArtifacts, projects } from './chunk-5ZHSPLXI.js';
1
+ import { agents, agentRelations, agentGraph, tasks, taskRelations, tools, conversations, messages, contextCache, dataComponents, agentDataComponents, artifactComponents, agentArtifactComponents, externalAgents, apiKeys, credentialReferences, functions, contextConfigs, agentToolRelations, ledgerArtifacts, projects } from './chunk-TN5JDW2L.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';
@@ -33,6 +33,19 @@ var ProjectModelSchema = z.object({
33
33
  structuredOutput: ModelSettingsSchema.optional(),
34
34
  summarizer: ModelSettingsSchema.optional()
35
35
  });
36
+ var SandboxConfigSchema = z.object({
37
+ provider: z.enum(["vercel", "local"]),
38
+ runtime: z.enum(["node22", "typescript"]),
39
+ timeout: z.number().min(1e3).max(3e5).optional(),
40
+ vcpus: z.number().min(1).max(8).optional()
41
+ });
42
+ var FunctionToolConfigSchema = z.object({
43
+ name: z.string(),
44
+ description: z.string(),
45
+ inputSchema: z.record(z.string(), z.unknown()),
46
+ dependencies: z.record(z.string(), z.string()).optional(),
47
+ execute: z.union([z.function(), z.string()])
48
+ });
36
49
  var createApiSchema = (schema) => schema.omit({ tenantId: true, projectId: true });
37
50
  var createApiInsertSchema = (schema) => schema.omit({ tenantId: true, projectId: true });
38
51
  var createApiUpdateSchema = (schema) => schema.omit({ tenantId: true, projectId: true }).partial();
@@ -169,7 +182,33 @@ var McpToolDefinitionSchema = z.object({
169
182
  var ToolSelectSchema = createSelectSchema(tools);
170
183
  var ToolInsertSchema = createInsertSchema(tools).extend({
171
184
  id: resourceIdSchema,
172
- imageUrl: imageUrlSchema
185
+ imageUrl: imageUrlSchema,
186
+ functionId: resourceIdSchema.optional(),
187
+ // For function tools, reference to global functions table
188
+ config: z.discriminatedUnion("type", [
189
+ // MCP tools
190
+ z.object({
191
+ type: z.literal("mcp"),
192
+ mcp: z.object({
193
+ server: z.object({
194
+ url: z.string().url()
195
+ }),
196
+ transport: z.object({
197
+ type: z.enum(MCPTransportType),
198
+ requestInit: z.record(z.string(), z.unknown()).optional(),
199
+ eventSourceInit: z.record(z.string(), z.unknown()).optional(),
200
+ reconnectionOptions: z.custom().optional(),
201
+ sessionId: z.string().optional()
202
+ }).optional(),
203
+ activeTools: z.array(z.string()).optional()
204
+ })
205
+ }),
206
+ // Function tools (reference-only, no inline duplication)
207
+ z.object({
208
+ type: z.literal("function")
209
+ // No inline function details - they're in the functions table via functionId
210
+ })
211
+ ])
173
212
  });
174
213
  var ConversationSelectSchema = createSelectSchema(conversations);
175
214
  var ConversationInsertSchema = createInsertSchema(conversations).extend({
@@ -379,6 +418,14 @@ var ToolUpdateSchema = ToolInsertSchema.partial();
379
418
  var ToolApiSelectSchema = createApiSchema(ToolSelectSchema);
380
419
  var ToolApiInsertSchema = createApiInsertSchema(ToolInsertSchema);
381
420
  var ToolApiUpdateSchema = createApiUpdateSchema(ToolUpdateSchema);
421
+ var FunctionSelectSchema = createSelectSchema(functions);
422
+ var FunctionInsertSchema = createInsertSchema(functions).extend({
423
+ id: resourceIdSchema
424
+ });
425
+ var FunctionUpdateSchema = FunctionInsertSchema.partial();
426
+ var FunctionApiSelectSchema = createApiSchema(FunctionSelectSchema);
427
+ var FunctionApiInsertSchema = createApiInsertSchema(FunctionInsertSchema);
428
+ var FunctionApiUpdateSchema = createApiUpdateSchema(FunctionUpdateSchema);
382
429
  var FetchConfigSchema = z.object({
383
430
  url: z.string().min(1, "URL is required"),
384
431
  method: z.enum(["GET", "POST", "PUT", "DELETE", "PATCH"]).optional().default("GET"),
@@ -467,6 +514,7 @@ var CanUseItemSchema = z.object({
467
514
  var FullGraphAgentInsertSchema = AgentApiInsertSchema.extend({
468
515
  type: z.literal("internal"),
469
516
  canUse: z.array(CanUseItemSchema),
517
+ // All tools (both MCP and function tools)
470
518
  dataComponents: z.array(z.string()).optional(),
471
519
  artifactComponents: z.array(z.string()).optional(),
472
520
  canTransferTo: z.array(z.string()).optional(),
@@ -474,9 +522,11 @@ var FullGraphAgentInsertSchema = AgentApiInsertSchema.extend({
474
522
  });
475
523
  var FullGraphDefinitionSchema = AgentGraphApiInsertSchema.extend({
476
524
  agents: z.record(z.string(), z.union([FullGraphAgentInsertSchema, ExternalAgentApiInsertSchema])),
477
- // Removed project-scoped resources - these are now managed at project level:
478
- // tools, credentialReferences, dataComponents, artifactComponents
479
- // Agent relationships to these resources are maintained via agent.tools, agent.dataComponents, etc.
525
+ // Lookup maps for UI to resolve canUse items
526
+ tools: z.record(z.string(), ToolApiInsertSchema).optional(),
527
+ // Get tool name/description from toolId
528
+ functions: z.record(z.string(), FunctionApiInsertSchema).optional(),
529
+ // Get function code for function tools
480
530
  contextConfig: z.optional(ContextConfigApiInsertSchema),
481
531
  statusUpdates: z.optional(StatusUpdateSchema),
482
532
  models: ModelSchema.optional(),
@@ -525,7 +575,8 @@ var RemovedResponseSchema = z.object({
525
575
  var ProjectSelectSchema = createSelectSchema(projects);
526
576
  var ProjectInsertSchema = createInsertSchema(projects).extend({
527
577
  models: ProjectModelSchema,
528
- stopWhen: StopWhenSchema.optional()
578
+ stopWhen: StopWhenSchema.optional(),
579
+ sandboxConfig: SandboxConfigSchema.optional()
529
580
  }).omit({
530
581
  createdAt: true,
531
582
  updatedAt: true
@@ -537,6 +588,9 @@ var ProjectApiUpdateSchema = ProjectUpdateSchema.omit({ tenantId: true });
537
588
  var FullProjectDefinitionSchema = ProjectApiInsertSchema.extend({
538
589
  graphs: z.record(z.string(), GraphWithinContextOfProjectSchema),
539
590
  tools: z.record(z.string(), ToolApiInsertSchema),
591
+ // Now includes both MCP and function tools
592
+ functions: z.record(z.string(), FunctionApiInsertSchema).optional(),
593
+ // Global functions
540
594
  dataComponents: z.record(z.string(), DataComponentApiInsertSchema).optional(),
541
595
  artifactComponents: z.record(z.string(), ArtifactComponentApiInsertSchema).optional(),
542
596
  statusUpdates: z.optional(StatusUpdateSchema),
@@ -731,4 +785,4 @@ function validatePropsAsJsonSchema(props) {
731
785
  }
732
786
  }
733
787
 
734
- export { AgentApiInsertSchema, AgentApiSelectSchema, AgentApiUpdateSchema, AgentArtifactComponentApiInsertSchema, AgentArtifactComponentApiSelectSchema, AgentArtifactComponentApiUpdateSchema, AgentArtifactComponentInsertSchema, AgentArtifactComponentSelectSchema, AgentArtifactComponentUpdateSchema, AgentDataComponentApiInsertSchema, AgentDataComponentApiSelectSchema, AgentDataComponentApiUpdateSchema, AgentDataComponentInsertSchema, AgentDataComponentSelectSchema, AgentDataComponentUpdateSchema, AgentGraphApiInsertSchema, AgentGraphApiSelectSchema, AgentGraphApiUpdateSchema, AgentGraphInsertSchema, AgentGraphSelectSchema, AgentGraphUpdateSchema, AgentInsertSchema, AgentRelationApiInsertSchema, AgentRelationApiSelectSchema, AgentRelationApiUpdateSchema, AgentRelationInsertSchema, AgentRelationQuerySchema, AgentRelationSelectSchema, AgentRelationUpdateSchema, AgentSelectSchema, AgentStopWhenSchema, AgentToolRelationApiInsertSchema, AgentToolRelationApiSelectSchema, AgentToolRelationApiUpdateSchema, AgentToolRelationInsertSchema, AgentToolRelationSelectSchema, AgentToolRelationUpdateSchema, AgentUpdateSchema, 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, ExternalAgentRelationApiInsertSchema, ExternalAgentRelationInsertSchema, ExternalAgentSelectSchema, ExternalAgentUpdateSchema, FetchConfigSchema, FetchDefinitionSchema, FullGraphAgentInsertSchema, FullGraphDefinitionSchema, FullProjectDefinitionSchema, GraphStopWhenSchema, GraphWithinContextOfProjectSchema, HeadersScopeSchema, IdParamsSchema, 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, SingleResponseSchema, StatusComponentSchema, StatusUpdateSchema, StopWhenSchema, TaskApiInsertSchema, TaskApiSelectSchema, TaskApiUpdateSchema, TaskInsertSchema, TaskRelationApiInsertSchema, TaskRelationApiSelectSchema, TaskRelationApiUpdateSchema, TaskRelationInsertSchema, TaskRelationSelectSchema, TaskRelationUpdateSchema, TaskSelectSchema, TaskUpdateSchema, TenantIdParamsSchema, TenantParamsSchema, TenantProjectGraphIdParamsSchema, TenantProjectGraphParamsSchema, TenantProjectIdParamsSchema, TenantProjectParamsSchema, ToolApiInsertSchema, ToolApiSelectSchema, ToolApiUpdateSchema, ToolInsertSchema, ToolSelectSchema, ToolStatusSchema, ToolUpdateSchema, URL_SAFE_ID_PATTERN, resourceIdSchema, validatePropsAsJsonSchema };
788
+ export { AgentApiInsertSchema, AgentApiSelectSchema, AgentApiUpdateSchema, AgentArtifactComponentApiInsertSchema, AgentArtifactComponentApiSelectSchema, AgentArtifactComponentApiUpdateSchema, AgentArtifactComponentInsertSchema, AgentArtifactComponentSelectSchema, AgentArtifactComponentUpdateSchema, AgentDataComponentApiInsertSchema, AgentDataComponentApiSelectSchema, AgentDataComponentApiUpdateSchema, AgentDataComponentInsertSchema, AgentDataComponentSelectSchema, AgentDataComponentUpdateSchema, AgentGraphApiInsertSchema, AgentGraphApiSelectSchema, AgentGraphApiUpdateSchema, AgentGraphInsertSchema, AgentGraphSelectSchema, AgentGraphUpdateSchema, AgentInsertSchema, AgentRelationApiInsertSchema, AgentRelationApiSelectSchema, AgentRelationApiUpdateSchema, AgentRelationInsertSchema, AgentRelationQuerySchema, AgentRelationSelectSchema, AgentRelationUpdateSchema, AgentSelectSchema, AgentStopWhenSchema, AgentToolRelationApiInsertSchema, AgentToolRelationApiSelectSchema, AgentToolRelationApiUpdateSchema, AgentToolRelationInsertSchema, AgentToolRelationSelectSchema, AgentToolRelationUpdateSchema, AgentUpdateSchema, 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, ExternalAgentRelationApiInsertSchema, ExternalAgentRelationInsertSchema, ExternalAgentSelectSchema, ExternalAgentUpdateSchema, FetchConfigSchema, FetchDefinitionSchema, FullGraphAgentInsertSchema, FullGraphDefinitionSchema, FullProjectDefinitionSchema, FunctionApiInsertSchema, FunctionApiSelectSchema, FunctionApiUpdateSchema, FunctionInsertSchema, FunctionSelectSchema, FunctionToolConfigSchema, FunctionUpdateSchema, GraphStopWhenSchema, GraphWithinContextOfProjectSchema, HeadersScopeSchema, IdParamsSchema, 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, TaskApiInsertSchema, TaskApiSelectSchema, TaskApiUpdateSchema, TaskInsertSchema, TaskRelationApiInsertSchema, TaskRelationApiSelectSchema, TaskRelationApiUpdateSchema, TaskRelationInsertSchema, TaskRelationSelectSchema, TaskRelationUpdateSchema, TaskSelectSchema, TaskUpdateSchema, TenantIdParamsSchema, TenantParamsSchema, TenantProjectGraphIdParamsSchema, TenantProjectGraphParamsSchema, TenantProjectIdParamsSchema, TenantProjectParamsSchema, ToolApiInsertSchema, ToolApiSelectSchema, ToolApiUpdateSchema, ToolInsertSchema, ToolSelectSchema, ToolStatusSchema, ToolUpdateSchema, URL_SAFE_ID_PATTERN, resourceIdSchema, validatePropsAsJsonSchema };
@@ -1,4 +1,4 @@
1
- import { FullGraphDefinitionSchema, resourceIdSchema, MAX_ID_LENGTH } from './chunk-BNXFEUNP.js';
1
+ import { FullGraphDefinitionSchema, resourceIdSchema, MAX_ID_LENGTH } from './chunk-HZZTBK7Y.js';
2
2
 
3
3
  // src/validation/graphFull.ts
4
4
  function isInternalAgent(agent) {
@@ -33,6 +33,8 @@ __export(schema_exports, {
33
33
  dataComponentsRelations: () => dataComponentsRelations,
34
34
  externalAgents: () => externalAgents,
35
35
  externalAgentsRelations: () => externalAgentsRelations,
36
+ functions: () => functions,
37
+ functionsRelations: () => functionsRelations,
36
38
  ledgerArtifacts: () => ledgerArtifacts,
37
39
  ledgerArtifactsRelations: () => ledgerArtifactsRelations,
38
40
  messages: () => messages,
@@ -79,6 +81,8 @@ var projects = sqliteTable(
79
81
  models: text("models", { mode: "json" }).$type(),
80
82
  // Project-level stopWhen configuration that can be inherited by graphs and agents
81
83
  stopWhen: text("stop_when", { mode: "json" }).$type(),
84
+ // Project-level sandbox configuration for function execution
85
+ sandboxConfig: text("sandbox_config", { mode: "json" }).$type(),
82
86
  ...timestamps
83
87
  },
84
88
  (table) => [primaryKey({ columns: [table.tenantId, table.id] })]
@@ -371,13 +375,16 @@ var tools = sqliteTable(
371
375
  {
372
376
  ...projectScoped,
373
377
  name: text("name").notNull(),
374
- // Enhanced MCP configuration
378
+ description: text("description"),
379
+ // Tool configuration - supports both MCP and function tools
375
380
  config: blob("config", { mode: "json" }).$type().notNull(),
381
+ // For function tools, reference the global functions table
382
+ functionId: text("function_id"),
376
383
  credentialReferenceId: text("credential_reference_id"),
377
384
  headers: blob("headers", { mode: "json" }).$type(),
378
385
  // Image URL for custom tool icon (supports regular URLs and base64 encoded images)
379
386
  imageUrl: text("image_url"),
380
- // Server capabilities and status
387
+ // Server capabilities and status (only for MCP tools)
381
388
  capabilities: blob("capabilities", { mode: "json" }).$type(),
382
389
  lastError: text("last_error"),
383
390
  ...timestamps
@@ -388,6 +395,30 @@ var tools = sqliteTable(
388
395
  columns: [table.tenantId, table.projectId],
389
396
  foreignColumns: [projects.tenantId, projects.id],
390
397
  name: "tools_project_fk"
398
+ }).onDelete("cascade"),
399
+ // Foreign key constraint to functions table (for function tools)
400
+ foreignKey({
401
+ columns: [table.tenantId, table.projectId, table.functionId],
402
+ foreignColumns: [functions.tenantId, functions.projectId, functions.id],
403
+ name: "tools_function_fk"
404
+ }).onDelete("cascade")
405
+ ]
406
+ );
407
+ var functions = sqliteTable(
408
+ "functions",
409
+ {
410
+ ...projectScoped,
411
+ inputSchema: blob("input_schema", { mode: "json" }).$type(),
412
+ executeCode: text("execute_code").notNull(),
413
+ dependencies: blob("dependencies", { mode: "json" }).$type(),
414
+ ...timestamps
415
+ },
416
+ (table) => [
417
+ primaryKey({ columns: [table.tenantId, table.projectId, table.id] }),
418
+ foreignKey({
419
+ columns: [table.tenantId, table.projectId],
420
+ foreignColumns: [projects.tenantId, projects.id],
421
+ name: "functions_project_fk"
391
422
  }).onDelete("cascade")
392
423
  ]
393
424
  );
@@ -722,6 +753,10 @@ var toolsRelations = relations(tools, ({ one, many }) => ({
722
753
  credentialReference: one(credentialReferences, {
723
754
  fields: [tools.credentialReferenceId],
724
755
  references: [credentialReferences.id]
756
+ }),
757
+ function: one(functions, {
758
+ fields: [tools.functionId],
759
+ references: [functions.id]
725
760
  })
726
761
  }));
727
762
  var conversationsRelations = relations(conversations, ({ one, many }) => ({
@@ -819,6 +854,9 @@ var ledgerArtifactsRelations = relations(ledgerArtifacts, ({ one }) => ({
819
854
  references: [tasks.id]
820
855
  })
821
856
  }));
857
+ var functionsRelations = relations(functions, ({ many }) => ({
858
+ tools: many(tools)
859
+ }));
822
860
  var agentRelationsRelations = relations(agentRelations, ({ one }) => ({
823
861
  graph: one(agentGraph, {
824
862
  fields: [agentRelations.graphId],
@@ -840,4 +878,4 @@ var agentRelationsRelations = relations(agentRelations, ({ one }) => ({
840
878
  })
841
879
  }));
842
880
 
843
- export { agentArtifactComponents, agentArtifactComponentsRelations, agentDataComponents, agentDataComponentsRelations, agentGraph, agentGraphRelations, agentRelations, agentRelationsRelations, agentToolRelations, agentToolRelationsRelations, agents, agentsRelations, apiKeys, apiKeysRelations, artifactComponents, artifactComponentsRelations, contextCache, contextCacheRelations, contextConfigs, contextConfigsRelations, conversations, conversationsRelations, credentialReferences, credentialReferencesRelations, dataComponents, dataComponentsRelations, externalAgents, externalAgentsRelations, ledgerArtifacts, ledgerArtifactsRelations, messages, messagesRelations, projects, projectsRelations, schema_exports, taskRelations, taskRelationsRelations, tasks, tasksRelations, tools, toolsRelations };
881
+ export { agentArtifactComponents, agentArtifactComponentsRelations, agentDataComponents, agentDataComponentsRelations, agentGraph, agentGraphRelations, agentRelations, agentRelationsRelations, agentToolRelations, agentToolRelationsRelations, agents, agentsRelations, 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, taskRelations, taskRelationsRelations, tasks, tasksRelations, tools, toolsRelations };
@@ -62,6 +62,8 @@ var projects = sqliteCore.sqliteTable(
62
62
  models: sqliteCore.text("models", { mode: "json" }).$type(),
63
63
  // Project-level stopWhen configuration that can be inherited by graphs and agents
64
64
  stopWhen: sqliteCore.text("stop_when", { mode: "json" }).$type(),
65
+ // Project-level sandbox configuration for function execution
66
+ sandboxConfig: sqliteCore.text("sandbox_config", { mode: "json" }).$type(),
65
67
  ...timestamps
66
68
  },
67
69
  (table) => [sqliteCore.primaryKey({ columns: [table.tenantId, table.id] })]
@@ -354,13 +356,16 @@ var tools = sqliteCore.sqliteTable(
354
356
  {
355
357
  ...projectScoped,
356
358
  name: sqliteCore.text("name").notNull(),
357
- // Enhanced MCP configuration
359
+ description: sqliteCore.text("description"),
360
+ // Tool configuration - supports both MCP and function tools
358
361
  config: sqliteCore.blob("config", { mode: "json" }).$type().notNull(),
362
+ // For function tools, reference the global functions table
363
+ functionId: sqliteCore.text("function_id"),
359
364
  credentialReferenceId: sqliteCore.text("credential_reference_id"),
360
365
  headers: sqliteCore.blob("headers", { mode: "json" }).$type(),
361
366
  // Image URL for custom tool icon (supports regular URLs and base64 encoded images)
362
367
  imageUrl: sqliteCore.text("image_url"),
363
- // Server capabilities and status
368
+ // Server capabilities and status (only for MCP tools)
364
369
  capabilities: sqliteCore.blob("capabilities", { mode: "json" }).$type(),
365
370
  lastError: sqliteCore.text("last_error"),
366
371
  ...timestamps
@@ -371,6 +376,30 @@ var tools = sqliteCore.sqliteTable(
371
376
  columns: [table.tenantId, table.projectId],
372
377
  foreignColumns: [projects.tenantId, projects.id],
373
378
  name: "tools_project_fk"
379
+ }).onDelete("cascade"),
380
+ // Foreign key constraint to functions table (for function tools)
381
+ sqliteCore.foreignKey({
382
+ columns: [table.tenantId, table.projectId, table.functionId],
383
+ foreignColumns: [functions.tenantId, functions.projectId, functions.id],
384
+ name: "tools_function_fk"
385
+ }).onDelete("cascade")
386
+ ]
387
+ );
388
+ var functions = sqliteCore.sqliteTable(
389
+ "functions",
390
+ {
391
+ ...projectScoped,
392
+ inputSchema: sqliteCore.blob("input_schema", { mode: "json" }).$type(),
393
+ executeCode: sqliteCore.text("execute_code").notNull(),
394
+ dependencies: sqliteCore.blob("dependencies", { mode: "json" }).$type(),
395
+ ...timestamps
396
+ },
397
+ (table) => [
398
+ sqliteCore.primaryKey({ columns: [table.tenantId, table.projectId, table.id] }),
399
+ sqliteCore.foreignKey({
400
+ columns: [table.tenantId, table.projectId],
401
+ foreignColumns: [projects.tenantId, projects.id],
402
+ name: "functions_project_fk"
374
403
  }).onDelete("cascade")
375
404
  ]
376
405
  );
@@ -705,6 +734,10 @@ drizzleOrm.relations(tools, ({ one, many }) => ({
705
734
  credentialReference: one(credentialReferences, {
706
735
  fields: [tools.credentialReferenceId],
707
736
  references: [credentialReferences.id]
737
+ }),
738
+ function: one(functions, {
739
+ fields: [tools.functionId],
740
+ references: [functions.id]
708
741
  })
709
742
  }));
710
743
  drizzleOrm.relations(conversations, ({ one, many }) => ({
@@ -802,6 +835,9 @@ drizzleOrm.relations(ledgerArtifacts, ({ one }) => ({
802
835
  references: [tasks.id]
803
836
  })
804
837
  }));
838
+ drizzleOrm.relations(functions, ({ many }) => ({
839
+ tools: many(tools)
840
+ }));
805
841
  drizzleOrm.relations(agentRelations, ({ one }) => ({
806
842
  graph: one(agentGraph, {
807
843
  fields: [agentRelations.graphId],
@@ -853,6 +889,19 @@ var ProjectModelSchema = zodOpenapi.z.object({
853
889
  structuredOutput: ModelSettingsSchema.optional(),
854
890
  summarizer: ModelSettingsSchema.optional()
855
891
  });
892
+ var SandboxConfigSchema = zodOpenapi.z.object({
893
+ provider: zodOpenapi.z.enum(["vercel", "local"]),
894
+ runtime: zodOpenapi.z.enum(["node22", "typescript"]),
895
+ timeout: zodOpenapi.z.number().min(1e3).max(3e5).optional(),
896
+ vcpus: zodOpenapi.z.number().min(1).max(8).optional()
897
+ });
898
+ zodOpenapi.z.object({
899
+ name: zodOpenapi.z.string(),
900
+ description: zodOpenapi.z.string(),
901
+ inputSchema: zodOpenapi.z.record(zodOpenapi.z.string(), zodOpenapi.z.unknown()),
902
+ dependencies: zodOpenapi.z.record(zodOpenapi.z.string(), zodOpenapi.z.string()).optional(),
903
+ execute: zodOpenapi.z.union([zodOpenapi.z.function(), zodOpenapi.z.string()])
904
+ });
856
905
  var createApiSchema = (schema) => schema.omit({ tenantId: true, projectId: true });
857
906
  var createApiInsertSchema = (schema) => schema.omit({ tenantId: true, projectId: true });
858
907
  var createApiUpdateSchema = (schema) => schema.omit({ tenantId: true, projectId: true }).partial();
@@ -989,7 +1038,33 @@ var McpToolDefinitionSchema = zodOpenapi.z.object({
989
1038
  var ToolSelectSchema = drizzleZod.createSelectSchema(tools);
990
1039
  var ToolInsertSchema = drizzleZod.createInsertSchema(tools).extend({
991
1040
  id: resourceIdSchema,
992
- imageUrl: imageUrlSchema
1041
+ imageUrl: imageUrlSchema,
1042
+ functionId: resourceIdSchema.optional(),
1043
+ // For function tools, reference to global functions table
1044
+ config: zodOpenapi.z.discriminatedUnion("type", [
1045
+ // MCP tools
1046
+ zodOpenapi.z.object({
1047
+ type: zodOpenapi.z.literal("mcp"),
1048
+ mcp: zodOpenapi.z.object({
1049
+ server: zodOpenapi.z.object({
1050
+ url: zodOpenapi.z.string().url()
1051
+ }),
1052
+ transport: zodOpenapi.z.object({
1053
+ type: zodOpenapi.z.enum(MCPTransportType),
1054
+ requestInit: zodOpenapi.z.record(zodOpenapi.z.string(), zodOpenapi.z.unknown()).optional(),
1055
+ eventSourceInit: zodOpenapi.z.record(zodOpenapi.z.string(), zodOpenapi.z.unknown()).optional(),
1056
+ reconnectionOptions: zodOpenapi.z.custom().optional(),
1057
+ sessionId: zodOpenapi.z.string().optional()
1058
+ }).optional(),
1059
+ activeTools: zodOpenapi.z.array(zodOpenapi.z.string()).optional()
1060
+ })
1061
+ }),
1062
+ // Function tools (reference-only, no inline duplication)
1063
+ zodOpenapi.z.object({
1064
+ type: zodOpenapi.z.literal("function")
1065
+ // No inline function details - they're in the functions table via functionId
1066
+ })
1067
+ ])
993
1068
  });
994
1069
  var ConversationSelectSchema = drizzleZod.createSelectSchema(conversations);
995
1070
  var ConversationInsertSchema = drizzleZod.createInsertSchema(conversations).extend({
@@ -1198,6 +1273,14 @@ var ToolUpdateSchema = ToolInsertSchema.partial();
1198
1273
  createApiSchema(ToolSelectSchema);
1199
1274
  var ToolApiInsertSchema = createApiInsertSchema(ToolInsertSchema);
1200
1275
  createApiUpdateSchema(ToolUpdateSchema);
1276
+ var FunctionSelectSchema = drizzleZod.createSelectSchema(functions);
1277
+ var FunctionInsertSchema = drizzleZod.createInsertSchema(functions).extend({
1278
+ id: resourceIdSchema
1279
+ });
1280
+ var FunctionUpdateSchema = FunctionInsertSchema.partial();
1281
+ var FunctionApiSelectSchema = createApiSchema(FunctionSelectSchema);
1282
+ var FunctionApiInsertSchema = createApiInsertSchema(FunctionInsertSchema);
1283
+ var FunctionApiUpdateSchema = createApiUpdateSchema(FunctionUpdateSchema);
1201
1284
  var FetchConfigSchema = zodOpenapi.z.object({
1202
1285
  url: zodOpenapi.z.string().min(1, "URL is required"),
1203
1286
  method: zodOpenapi.z.enum(["GET", "POST", "PUT", "DELETE", "PATCH"]).optional().default("GET"),
@@ -1286,6 +1369,7 @@ var CanUseItemSchema = zodOpenapi.z.object({
1286
1369
  var FullGraphAgentInsertSchema = AgentApiInsertSchema.extend({
1287
1370
  type: zodOpenapi.z.literal("internal"),
1288
1371
  canUse: zodOpenapi.z.array(CanUseItemSchema),
1372
+ // All tools (both MCP and function tools)
1289
1373
  dataComponents: zodOpenapi.z.array(zodOpenapi.z.string()).optional(),
1290
1374
  artifactComponents: zodOpenapi.z.array(zodOpenapi.z.string()).optional(),
1291
1375
  canTransferTo: zodOpenapi.z.array(zodOpenapi.z.string()).optional(),
@@ -1293,9 +1377,11 @@ var FullGraphAgentInsertSchema = AgentApiInsertSchema.extend({
1293
1377
  });
1294
1378
  AgentGraphApiInsertSchema.extend({
1295
1379
  agents: zodOpenapi.z.record(zodOpenapi.z.string(), zodOpenapi.z.union([FullGraphAgentInsertSchema, ExternalAgentApiInsertSchema])),
1296
- // Removed project-scoped resources - these are now managed at project level:
1297
- // tools, credentialReferences, dataComponents, artifactComponents
1298
- // Agent relationships to these resources are maintained via agent.tools, agent.dataComponents, etc.
1380
+ // Lookup maps for UI to resolve canUse items
1381
+ tools: zodOpenapi.z.record(zodOpenapi.z.string(), ToolApiInsertSchema).optional(),
1382
+ // Get tool name/description from toolId
1383
+ functions: zodOpenapi.z.record(zodOpenapi.z.string(), FunctionApiInsertSchema).optional(),
1384
+ // Get function code for function tools
1299
1385
  contextConfig: zodOpenapi.z.optional(ContextConfigApiInsertSchema),
1300
1386
  statusUpdates: zodOpenapi.z.optional(StatusUpdateSchema),
1301
1387
  models: ModelSchema.optional(),
@@ -1337,7 +1423,8 @@ zodOpenapi.z.object({
1337
1423
  var ProjectSelectSchema = drizzleZod.createSelectSchema(projects);
1338
1424
  var ProjectInsertSchema = drizzleZod.createInsertSchema(projects).extend({
1339
1425
  models: ProjectModelSchema,
1340
- stopWhen: StopWhenSchema.optional()
1426
+ stopWhen: StopWhenSchema.optional(),
1427
+ sandboxConfig: SandboxConfigSchema.optional()
1341
1428
  }).omit({
1342
1429
  createdAt: true,
1343
1430
  updatedAt: true
@@ -1349,6 +1436,9 @@ ProjectUpdateSchema.omit({ tenantId: true });
1349
1436
  ProjectApiInsertSchema.extend({
1350
1437
  graphs: zodOpenapi.z.record(zodOpenapi.z.string(), GraphWithinContextOfProjectSchema),
1351
1438
  tools: zodOpenapi.z.record(zodOpenapi.z.string(), ToolApiInsertSchema),
1439
+ // Now includes both MCP and function tools
1440
+ functions: zodOpenapi.z.record(zodOpenapi.z.string(), FunctionApiInsertSchema).optional(),
1441
+ // Global functions
1352
1442
  dataComponents: zodOpenapi.z.record(zodOpenapi.z.string(), DataComponentApiInsertSchema).optional(),
1353
1443
  artifactComponents: zodOpenapi.z.record(zodOpenapi.z.string(), ArtifactComponentApiInsertSchema).optional(),
1354
1444
  statusUpdates: zodOpenapi.z.optional(StatusUpdateSchema),
@@ -1725,6 +1815,9 @@ exports.DataComponentApiInsertSchema = DataComponentApiInsertSchema2;
1725
1815
  exports.ErrorResponseSchema = ErrorResponseSchema2;
1726
1816
  exports.ExternalAgentApiInsertSchema = ExternalAgentApiInsertSchema2;
1727
1817
  exports.FullGraphDefinitionSchema = FullGraphDefinitionSchema2;
1818
+ exports.FunctionApiInsertSchema = FunctionApiInsertSchema;
1819
+ exports.FunctionApiSelectSchema = FunctionApiSelectSchema;
1820
+ exports.FunctionApiUpdateSchema = FunctionApiUpdateSchema;
1728
1821
  exports.GraphStopWhenSchema = GraphStopWhenSchema;
1729
1822
  exports.IdParamsSchema = IdParamsSchema2;
1730
1823
  exports.ListResponseSchema = ListResponseSchema;
@@ -1733,6 +1826,7 @@ exports.MCPTransportType = MCPTransportType;
1733
1826
  exports.MIN_ID_LENGTH = MIN_ID_LENGTH2;
1734
1827
  exports.ModelSettingsSchema = ModelSettingsSchema;
1735
1828
  exports.PaginationSchema = PaginationSchema2;
1829
+ exports.SandboxConfigSchema = SandboxConfigSchema;
1736
1830
  exports.SingleResponseSchema = SingleResponseSchema;
1737
1831
  exports.StopWhenSchema = StopWhenSchema;
1738
1832
  exports.TenantParamsSchema = TenantParamsSchema2;
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
- import { C as ConversationHistoryConfig, A as ApiKeyApiUpdateSchema, F as FullGraphAgentInsertSchema } from './utility-6UlHR5nQ.cjs';
3
- export { d as AgentStopWhen, a as AgentStopWhenSchema, f as CredentialStoreType, c as GraphStopWhen, G as GraphStopWhenSchema, g as MCPTransportType, e as ModelSettings, M as ModelSettingsSchema, b as StopWhen, S as StopWhenSchema } from './utility-6UlHR5nQ.cjs';
2
+ import { C as ConversationHistoryConfig, F as FunctionApiInsertSchema, A as ApiKeyApiUpdateSchema, a as FullGraphAgentInsertSchema } from './utility-BHDxGp6I.cjs';
3
+ 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-BHDxGp6I.cjs';
4
4
  export { v as validatePropsAsJsonSchema } from './props-validation-BMR1qNiy.cjs';
5
5
  import 'drizzle-zod';
6
6
  import 'drizzle-orm/sqlite-core';
@@ -128,8 +128,8 @@ declare const DataComponentApiInsertSchema: z.ZodObject<{
128
128
  props: z.ZodRecord<z.ZodString, z.ZodUnknown>;
129
129
  }, z.core.$strip>;
130
130
  declare const ArtifactComponentApiInsertSchema: z.ZodObject<{
131
- name: z.ZodString;
132
131
  id: z.ZodString;
132
+ name: z.ZodString;
133
133
  description: z.ZodString;
134
134
  props: z.ZodOptional<z.ZodNullable<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>>;
135
135
  }, {
@@ -164,11 +164,12 @@ declare const FullGraphDefinitionSchema: z.ZodObject<{
164
164
  description: z.ZodOptional<z.ZodString>;
165
165
  defaultAgentId: z.ZodOptional<z.ZodString>;
166
166
  agents: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
167
- name: z.ZodString;
168
167
  id: z.ZodString;
168
+ name: z.ZodString;
169
+ description: z.ZodString;
170
+ prompt: z.ZodString;
169
171
  createdAt: z.ZodOptional<z.ZodString>;
170
172
  updatedAt: z.ZodOptional<z.ZodString>;
171
- description: z.ZodString;
172
173
  models: z.ZodOptional<z.ZodObject<{
173
174
  base: z.ZodOptional<z.ZodObject<{
174
175
  model: z.ZodOptional<z.ZodString>;
@@ -192,7 +193,6 @@ declare const FullGraphDefinitionSchema: z.ZodObject<{
192
193
  }, {
193
194
  stepCountIs?: number | undefined;
194
195
  }>>>>;
195
- prompt: z.ZodString;
196
196
  conversationHistoryConfig: z.ZodOptional<z.ZodNullable<z.ZodType<ConversationHistoryConfig, ConversationHistoryConfig, z.core.$ZodTypeInternals<ConversationHistoryConfig, ConversationHistoryConfig>>>>;
197
197
  type: z.ZodLiteral<"internal">;
198
198
  canUse: z.ZodArray<z.ZodObject<{
@@ -257,6 +257,7 @@ declare const FullGraphDefinitionSchema: z.ZodObject<{
257
257
  }, z.core.$strip>;
258
258
  type AgentApiInsert = z.infer<typeof AgentApiInsertSchema>;
259
259
  type ToolApiInsert = z.infer<typeof ToolApiInsertSchema>;
260
+ type FunctionApiInsert = z.infer<typeof FunctionApiInsertSchema>;
260
261
  type ApiKeyApiSelect = z.infer<typeof ApiKeyApiSelectSchema>;
261
262
  type ApiKeyApiCreationResponse = z.infer<typeof ApiKeyApiCreationResponseSchema>;
262
263
  type ApiKeyApiUpdateResponse = z.infer<typeof ApiKeyApiUpdateSchema>;
@@ -279,4 +280,4 @@ declare function generateIdFromName(name: string): string;
279
280
  type ToolInsert = ToolApiInsert;
280
281
  type AgentGraphInsert = AgentGraphApiInsert;
281
282
 
282
- export { type AgentApiInsert, AgentApiInsertSchema, type AgentGraphApiInsert, AgentGraphApiInsertSchema, type AgentGraphInsert, type ApiKeyApiCreationResponse, ApiKeyApiCreationResponseSchema, type ApiKeyApiSelect, ApiKeyApiSelectSchema, type ApiKeyApiUpdateResponse, type ArtifactComponentApiInsert, ArtifactComponentApiInsertSchema, type ContextConfigApiInsert, ContextConfigApiInsertSchema, type CredentialReferenceApiInsert, CredentialReferenceApiInsertSchema, type DataComponentApiInsert, DataComponentApiInsertSchema, type ErrorResponse, ErrorResponseSchema, type ExternalAgentApiInsert, ExternalAgentApiInsertSchema, type ExternalAgentDefinition, type FullGraphDefinition, FullGraphDefinitionSchema, IdParamsSchema, type InternalAgentDefinition, ListResponseSchema, MAX_ID_LENGTH, MIN_ID_LENGTH, PaginationSchema, SingleResponseSchema, type TenantParams, TenantParamsSchema, TenantProjectIdParamsSchema, TenantProjectParamsSchema, type ToolApiInsert, ToolApiInsertSchema, type ToolInsert, URL_SAFE_ID_PATTERN, generateIdFromName, resourceIdSchema };
283
+ export { type AgentApiInsert, AgentApiInsertSchema, type AgentGraphApiInsert, AgentGraphApiInsertSchema, type AgentGraphInsert, type ApiKeyApiCreationResponse, ApiKeyApiCreationResponseSchema, type ApiKeyApiSelect, ApiKeyApiSelectSchema, type ApiKeyApiUpdateResponse, type ArtifactComponentApiInsert, ArtifactComponentApiInsertSchema, type ContextConfigApiInsert, ContextConfigApiInsertSchema, type CredentialReferenceApiInsert, CredentialReferenceApiInsertSchema, type DataComponentApiInsert, DataComponentApiInsertSchema, type ErrorResponse, ErrorResponseSchema, type ExternalAgentApiInsert, ExternalAgentApiInsertSchema, type ExternalAgentDefinition, type FullGraphDefinition, FullGraphDefinitionSchema, type FunctionApiInsert, FunctionApiInsertSchema, IdParamsSchema, type InternalAgentDefinition, ListResponseSchema, MAX_ID_LENGTH, MIN_ID_LENGTH, PaginationSchema, SingleResponseSchema, type TenantParams, TenantParamsSchema, TenantProjectIdParamsSchema, TenantProjectParamsSchema, type ToolApiInsert, ToolApiInsertSchema, type ToolInsert, URL_SAFE_ID_PATTERN, generateIdFromName, resourceIdSchema };
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
- import { C as ConversationHistoryConfig, A as ApiKeyApiUpdateSchema, F as FullGraphAgentInsertSchema } from './utility-6UlHR5nQ.js';
3
- export { d as AgentStopWhen, a as AgentStopWhenSchema, f as CredentialStoreType, c as GraphStopWhen, G as GraphStopWhenSchema, g as MCPTransportType, e as ModelSettings, M as ModelSettingsSchema, b as StopWhen, S as StopWhenSchema } from './utility-6UlHR5nQ.js';
2
+ import { C as ConversationHistoryConfig, F as FunctionApiInsertSchema, A as ApiKeyApiUpdateSchema, a as FullGraphAgentInsertSchema } from './utility-BHDxGp6I.js';
3
+ 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-BHDxGp6I.js';
4
4
  export { v as validatePropsAsJsonSchema } from './props-validation-BMR1qNiy.js';
5
5
  import 'drizzle-zod';
6
6
  import 'drizzle-orm/sqlite-core';
@@ -128,8 +128,8 @@ declare const DataComponentApiInsertSchema: z.ZodObject<{
128
128
  props: z.ZodRecord<z.ZodString, z.ZodUnknown>;
129
129
  }, z.core.$strip>;
130
130
  declare const ArtifactComponentApiInsertSchema: z.ZodObject<{
131
- name: z.ZodString;
132
131
  id: z.ZodString;
132
+ name: z.ZodString;
133
133
  description: z.ZodString;
134
134
  props: z.ZodOptional<z.ZodNullable<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>>;
135
135
  }, {
@@ -164,11 +164,12 @@ declare const FullGraphDefinitionSchema: z.ZodObject<{
164
164
  description: z.ZodOptional<z.ZodString>;
165
165
  defaultAgentId: z.ZodOptional<z.ZodString>;
166
166
  agents: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
167
- name: z.ZodString;
168
167
  id: z.ZodString;
168
+ name: z.ZodString;
169
+ description: z.ZodString;
170
+ prompt: z.ZodString;
169
171
  createdAt: z.ZodOptional<z.ZodString>;
170
172
  updatedAt: z.ZodOptional<z.ZodString>;
171
- description: z.ZodString;
172
173
  models: z.ZodOptional<z.ZodObject<{
173
174
  base: z.ZodOptional<z.ZodObject<{
174
175
  model: z.ZodOptional<z.ZodString>;
@@ -192,7 +193,6 @@ declare const FullGraphDefinitionSchema: z.ZodObject<{
192
193
  }, {
193
194
  stepCountIs?: number | undefined;
194
195
  }>>>>;
195
- prompt: z.ZodString;
196
196
  conversationHistoryConfig: z.ZodOptional<z.ZodNullable<z.ZodType<ConversationHistoryConfig, ConversationHistoryConfig, z.core.$ZodTypeInternals<ConversationHistoryConfig, ConversationHistoryConfig>>>>;
197
197
  type: z.ZodLiteral<"internal">;
198
198
  canUse: z.ZodArray<z.ZodObject<{
@@ -257,6 +257,7 @@ declare const FullGraphDefinitionSchema: z.ZodObject<{
257
257
  }, z.core.$strip>;
258
258
  type AgentApiInsert = z.infer<typeof AgentApiInsertSchema>;
259
259
  type ToolApiInsert = z.infer<typeof ToolApiInsertSchema>;
260
+ type FunctionApiInsert = z.infer<typeof FunctionApiInsertSchema>;
260
261
  type ApiKeyApiSelect = z.infer<typeof ApiKeyApiSelectSchema>;
261
262
  type ApiKeyApiCreationResponse = z.infer<typeof ApiKeyApiCreationResponseSchema>;
262
263
  type ApiKeyApiUpdateResponse = z.infer<typeof ApiKeyApiUpdateSchema>;
@@ -279,4 +280,4 @@ declare function generateIdFromName(name: string): string;
279
280
  type ToolInsert = ToolApiInsert;
280
281
  type AgentGraphInsert = AgentGraphApiInsert;
281
282
 
282
- export { type AgentApiInsert, AgentApiInsertSchema, type AgentGraphApiInsert, AgentGraphApiInsertSchema, type AgentGraphInsert, type ApiKeyApiCreationResponse, ApiKeyApiCreationResponseSchema, type ApiKeyApiSelect, ApiKeyApiSelectSchema, type ApiKeyApiUpdateResponse, type ArtifactComponentApiInsert, ArtifactComponentApiInsertSchema, type ContextConfigApiInsert, ContextConfigApiInsertSchema, type CredentialReferenceApiInsert, CredentialReferenceApiInsertSchema, type DataComponentApiInsert, DataComponentApiInsertSchema, type ErrorResponse, ErrorResponseSchema, type ExternalAgentApiInsert, ExternalAgentApiInsertSchema, type ExternalAgentDefinition, type FullGraphDefinition, FullGraphDefinitionSchema, IdParamsSchema, type InternalAgentDefinition, ListResponseSchema, MAX_ID_LENGTH, MIN_ID_LENGTH, PaginationSchema, SingleResponseSchema, type TenantParams, TenantParamsSchema, TenantProjectIdParamsSchema, TenantProjectParamsSchema, type ToolApiInsert, ToolApiInsertSchema, type ToolInsert, URL_SAFE_ID_PATTERN, generateIdFromName, resourceIdSchema };
283
+ export { type AgentApiInsert, AgentApiInsertSchema, type AgentGraphApiInsert, AgentGraphApiInsertSchema, type AgentGraphInsert, type ApiKeyApiCreationResponse, ApiKeyApiCreationResponseSchema, type ApiKeyApiSelect, ApiKeyApiSelectSchema, type ApiKeyApiUpdateResponse, type ArtifactComponentApiInsert, ArtifactComponentApiInsertSchema, type ContextConfigApiInsert, ContextConfigApiInsertSchema, type CredentialReferenceApiInsert, CredentialReferenceApiInsertSchema, type DataComponentApiInsert, DataComponentApiInsertSchema, type ErrorResponse, ErrorResponseSchema, type ExternalAgentApiInsert, ExternalAgentApiInsertSchema, type ExternalAgentDefinition, type FullGraphDefinition, FullGraphDefinitionSchema, type FunctionApiInsert, FunctionApiInsertSchema, IdParamsSchema, type InternalAgentDefinition, ListResponseSchema, MAX_ID_LENGTH, MIN_ID_LENGTH, PaginationSchema, SingleResponseSchema, type TenantParams, TenantParamsSchema, TenantProjectIdParamsSchema, TenantProjectParamsSchema, type ToolApiInsert, ToolApiInsertSchema, type ToolInsert, URL_SAFE_ID_PATTERN, generateIdFromName, resourceIdSchema };
@@ -1,5 +1,5 @@
1
- import { ModelSettingsSchema, FullGraphAgentInsertSchema, ArtifactComponentApiInsertSchema } from './chunk-BNXFEUNP.js';
2
- export { AgentStopWhenSchema, GraphStopWhenSchema, ModelSettingsSchema, StopWhenSchema, validatePropsAsJsonSchema } from './chunk-BNXFEUNP.js';
1
+ import { ModelSettingsSchema, FullGraphAgentInsertSchema, ArtifactComponentApiInsertSchema } from './chunk-HZZTBK7Y.js';
2
+ export { AgentStopWhenSchema, FunctionApiInsertSchema, FunctionApiSelectSchema, FunctionApiUpdateSchema, GraphStopWhenSchema, ModelSettingsSchema, SandboxConfigSchema, StopWhenSchema, validatePropsAsJsonSchema } from './chunk-HZZTBK7Y.js';
3
3
  import { CredentialStoreType } from './chunk-YFHT5M2R.js';
4
4
  export { CredentialStoreType, MCPTransportType } from './chunk-YFHT5M2R.js';
5
5
  import { z } from 'zod';