@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.
- package/dist/{chunk-BNXFEUNP.js → chunk-HZZTBK7Y.js} +61 -7
- package/dist/{chunk-PR7XWHED.js → chunk-MLKHAZVU.js} +1 -1
- package/dist/{chunk-5ZHSPLXI.js → chunk-TN5JDW2L.js} +41 -3
- package/dist/client-exports.cjs +101 -7
- package/dist/client-exports.d.cts +8 -7
- package/dist/client-exports.d.ts +8 -7
- package/dist/client-exports.js +2 -2
- package/dist/db/schema.cjs +40 -2
- package/dist/db/schema.d.cts +2 -2
- package/dist/db/schema.d.ts +2 -2
- package/dist/db/schema.js +1 -1
- package/dist/index.cjs +2818 -2506
- package/dist/index.d.cts +326 -244
- package/dist/index.d.ts +326 -244
- package/dist/index.js +2458 -2254
- package/dist/{schema-Cn2ZkYOh.d.cts → schema-DKTW_XSC.d.cts} +249 -3
- package/dist/{schema-BYR5XAeI.d.ts → schema-DfH0zjbm.d.ts} +249 -3
- package/dist/types/index.d.cts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/dist/{utility-6UlHR5nQ.d.cts → utility-BHDxGp6I.d.cts} +827 -237
- package/dist/{utility-6UlHR5nQ.d.ts → utility-BHDxGp6I.d.ts} +827 -237
- package/dist/validation/index.cjs +105 -7
- package/dist/validation/index.d.cts +2 -2
- package/dist/validation/index.d.ts +2 -2
- package/dist/validation/index.js +2 -2
- package/drizzle/0002_brown_marvel_apes.sql +16 -0
- package/drizzle/0003_gifted_doctor_spectrum.sql +343 -0
- package/drizzle/meta/{0001_snapshot.json → 0003_snapshot.json} +135 -11
- package/drizzle/meta/_journal.json +9 -2
- package/package.json +1 -1
- package/drizzle/meta/0000_snapshot.json +0 -2425
|
@@ -44,6 +44,8 @@ var projects = sqliteCore.sqliteTable(
|
|
|
44
44
|
models: sqliteCore.text("models", { mode: "json" }).$type(),
|
|
45
45
|
// Project-level stopWhen configuration that can be inherited by graphs and agents
|
|
46
46
|
stopWhen: sqliteCore.text("stop_when", { mode: "json" }).$type(),
|
|
47
|
+
// Project-level sandbox configuration for function execution
|
|
48
|
+
sandboxConfig: sqliteCore.text("sandbox_config", { mode: "json" }).$type(),
|
|
47
49
|
...timestamps
|
|
48
50
|
},
|
|
49
51
|
(table) => [sqliteCore.primaryKey({ columns: [table.tenantId, table.id] })]
|
|
@@ -336,13 +338,16 @@ var tools = sqliteCore.sqliteTable(
|
|
|
336
338
|
{
|
|
337
339
|
...projectScoped,
|
|
338
340
|
name: sqliteCore.text("name").notNull(),
|
|
339
|
-
|
|
341
|
+
description: sqliteCore.text("description"),
|
|
342
|
+
// Tool configuration - supports both MCP and function tools
|
|
340
343
|
config: sqliteCore.blob("config", { mode: "json" }).$type().notNull(),
|
|
344
|
+
// For function tools, reference the global functions table
|
|
345
|
+
functionId: sqliteCore.text("function_id"),
|
|
341
346
|
credentialReferenceId: sqliteCore.text("credential_reference_id"),
|
|
342
347
|
headers: sqliteCore.blob("headers", { mode: "json" }).$type(),
|
|
343
348
|
// Image URL for custom tool icon (supports regular URLs and base64 encoded images)
|
|
344
349
|
imageUrl: sqliteCore.text("image_url"),
|
|
345
|
-
// Server capabilities and status
|
|
350
|
+
// Server capabilities and status (only for MCP tools)
|
|
346
351
|
capabilities: sqliteCore.blob("capabilities", { mode: "json" }).$type(),
|
|
347
352
|
lastError: sqliteCore.text("last_error"),
|
|
348
353
|
...timestamps
|
|
@@ -353,6 +358,30 @@ var tools = sqliteCore.sqliteTable(
|
|
|
353
358
|
columns: [table.tenantId, table.projectId],
|
|
354
359
|
foreignColumns: [projects.tenantId, projects.id],
|
|
355
360
|
name: "tools_project_fk"
|
|
361
|
+
}).onDelete("cascade"),
|
|
362
|
+
// Foreign key constraint to functions table (for function tools)
|
|
363
|
+
sqliteCore.foreignKey({
|
|
364
|
+
columns: [table.tenantId, table.projectId, table.functionId],
|
|
365
|
+
foreignColumns: [functions.tenantId, functions.projectId, functions.id],
|
|
366
|
+
name: "tools_function_fk"
|
|
367
|
+
}).onDelete("cascade")
|
|
368
|
+
]
|
|
369
|
+
);
|
|
370
|
+
var functions = sqliteCore.sqliteTable(
|
|
371
|
+
"functions",
|
|
372
|
+
{
|
|
373
|
+
...projectScoped,
|
|
374
|
+
inputSchema: sqliteCore.blob("input_schema", { mode: "json" }).$type(),
|
|
375
|
+
executeCode: sqliteCore.text("execute_code").notNull(),
|
|
376
|
+
dependencies: sqliteCore.blob("dependencies", { mode: "json" }).$type(),
|
|
377
|
+
...timestamps
|
|
378
|
+
},
|
|
379
|
+
(table) => [
|
|
380
|
+
sqliteCore.primaryKey({ columns: [table.tenantId, table.projectId, table.id] }),
|
|
381
|
+
sqliteCore.foreignKey({
|
|
382
|
+
columns: [table.tenantId, table.projectId],
|
|
383
|
+
foreignColumns: [projects.tenantId, projects.id],
|
|
384
|
+
name: "functions_project_fk"
|
|
356
385
|
}).onDelete("cascade")
|
|
357
386
|
]
|
|
358
387
|
);
|
|
@@ -687,6 +716,10 @@ drizzleOrm.relations(tools, ({ one, many }) => ({
|
|
|
687
716
|
credentialReference: one(credentialReferences, {
|
|
688
717
|
fields: [tools.credentialReferenceId],
|
|
689
718
|
references: [credentialReferences.id]
|
|
719
|
+
}),
|
|
720
|
+
function: one(functions, {
|
|
721
|
+
fields: [tools.functionId],
|
|
722
|
+
references: [functions.id]
|
|
690
723
|
})
|
|
691
724
|
}));
|
|
692
725
|
drizzleOrm.relations(conversations, ({ one, many }) => ({
|
|
@@ -784,6 +817,9 @@ drizzleOrm.relations(ledgerArtifacts, ({ one }) => ({
|
|
|
784
817
|
references: [tasks.id]
|
|
785
818
|
})
|
|
786
819
|
}));
|
|
820
|
+
drizzleOrm.relations(functions, ({ many }) => ({
|
|
821
|
+
tools: many(tools)
|
|
822
|
+
}));
|
|
787
823
|
drizzleOrm.relations(agentRelations, ({ one }) => ({
|
|
788
824
|
graph: one(agentGraph, {
|
|
789
825
|
fields: [agentRelations.graphId],
|
|
@@ -852,6 +888,19 @@ var ProjectModelSchema = zodOpenapi.z.object({
|
|
|
852
888
|
structuredOutput: ModelSettingsSchema.optional(),
|
|
853
889
|
summarizer: ModelSettingsSchema.optional()
|
|
854
890
|
});
|
|
891
|
+
var SandboxConfigSchema = zodOpenapi.z.object({
|
|
892
|
+
provider: zodOpenapi.z.enum(["vercel", "local"]),
|
|
893
|
+
runtime: zodOpenapi.z.enum(["node22", "typescript"]),
|
|
894
|
+
timeout: zodOpenapi.z.number().min(1e3).max(3e5).optional(),
|
|
895
|
+
vcpus: zodOpenapi.z.number().min(1).max(8).optional()
|
|
896
|
+
});
|
|
897
|
+
var FunctionToolConfigSchema = zodOpenapi.z.object({
|
|
898
|
+
name: zodOpenapi.z.string(),
|
|
899
|
+
description: zodOpenapi.z.string(),
|
|
900
|
+
inputSchema: zodOpenapi.z.record(zodOpenapi.z.string(), zodOpenapi.z.unknown()),
|
|
901
|
+
dependencies: zodOpenapi.z.record(zodOpenapi.z.string(), zodOpenapi.z.string()).optional(),
|
|
902
|
+
execute: zodOpenapi.z.union([zodOpenapi.z.function(), zodOpenapi.z.string()])
|
|
903
|
+
});
|
|
855
904
|
var createApiSchema = (schema) => schema.omit({ tenantId: true, projectId: true });
|
|
856
905
|
var createApiInsertSchema = (schema) => schema.omit({ tenantId: true, projectId: true });
|
|
857
906
|
var createApiUpdateSchema = (schema) => schema.omit({ tenantId: true, projectId: true }).partial();
|
|
@@ -988,7 +1037,33 @@ var McpToolDefinitionSchema = zodOpenapi.z.object({
|
|
|
988
1037
|
var ToolSelectSchema = drizzleZod.createSelectSchema(tools);
|
|
989
1038
|
var ToolInsertSchema = drizzleZod.createInsertSchema(tools).extend({
|
|
990
1039
|
id: resourceIdSchema,
|
|
991
|
-
imageUrl: imageUrlSchema
|
|
1040
|
+
imageUrl: imageUrlSchema,
|
|
1041
|
+
functionId: resourceIdSchema.optional(),
|
|
1042
|
+
// For function tools, reference to global functions table
|
|
1043
|
+
config: zodOpenapi.z.discriminatedUnion("type", [
|
|
1044
|
+
// MCP tools
|
|
1045
|
+
zodOpenapi.z.object({
|
|
1046
|
+
type: zodOpenapi.z.literal("mcp"),
|
|
1047
|
+
mcp: zodOpenapi.z.object({
|
|
1048
|
+
server: zodOpenapi.z.object({
|
|
1049
|
+
url: zodOpenapi.z.string().url()
|
|
1050
|
+
}),
|
|
1051
|
+
transport: zodOpenapi.z.object({
|
|
1052
|
+
type: zodOpenapi.z.enum(MCPTransportType),
|
|
1053
|
+
requestInit: zodOpenapi.z.record(zodOpenapi.z.string(), zodOpenapi.z.unknown()).optional(),
|
|
1054
|
+
eventSourceInit: zodOpenapi.z.record(zodOpenapi.z.string(), zodOpenapi.z.unknown()).optional(),
|
|
1055
|
+
reconnectionOptions: zodOpenapi.z.custom().optional(),
|
|
1056
|
+
sessionId: zodOpenapi.z.string().optional()
|
|
1057
|
+
}).optional(),
|
|
1058
|
+
activeTools: zodOpenapi.z.array(zodOpenapi.z.string()).optional()
|
|
1059
|
+
})
|
|
1060
|
+
}),
|
|
1061
|
+
// Function tools (reference-only, no inline duplication)
|
|
1062
|
+
zodOpenapi.z.object({
|
|
1063
|
+
type: zodOpenapi.z.literal("function")
|
|
1064
|
+
// No inline function details - they're in the functions table via functionId
|
|
1065
|
+
})
|
|
1066
|
+
])
|
|
992
1067
|
});
|
|
993
1068
|
var ConversationSelectSchema = drizzleZod.createSelectSchema(conversations);
|
|
994
1069
|
var ConversationInsertSchema = drizzleZod.createInsertSchema(conversations).extend({
|
|
@@ -1198,6 +1273,14 @@ var ToolUpdateSchema = ToolInsertSchema.partial();
|
|
|
1198
1273
|
var ToolApiSelectSchema = createApiSchema(ToolSelectSchema);
|
|
1199
1274
|
var ToolApiInsertSchema = createApiInsertSchema(ToolInsertSchema);
|
|
1200
1275
|
var ToolApiUpdateSchema = 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
|
var FullGraphDefinitionSchema = AgentGraphApiInsertSchema.extend({
|
|
1295
1379
|
agents: zodOpenapi.z.record(zodOpenapi.z.string(), zodOpenapi.z.union([FullGraphAgentInsertSchema, ExternalAgentApiInsertSchema])),
|
|
1296
|
-
//
|
|
1297
|
-
|
|
1298
|
-
//
|
|
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(),
|
|
@@ -1344,7 +1430,8 @@ var RemovedResponseSchema = zodOpenapi.z.object({
|
|
|
1344
1430
|
var ProjectSelectSchema = drizzleZod.createSelectSchema(projects);
|
|
1345
1431
|
var ProjectInsertSchema = drizzleZod.createInsertSchema(projects).extend({
|
|
1346
1432
|
models: ProjectModelSchema,
|
|
1347
|
-
stopWhen: StopWhenSchema.optional()
|
|
1433
|
+
stopWhen: StopWhenSchema.optional(),
|
|
1434
|
+
sandboxConfig: SandboxConfigSchema.optional()
|
|
1348
1435
|
}).omit({
|
|
1349
1436
|
createdAt: true,
|
|
1350
1437
|
updatedAt: true
|
|
@@ -1356,6 +1443,9 @@ var ProjectApiUpdateSchema = ProjectUpdateSchema.omit({ tenantId: true });
|
|
|
1356
1443
|
var FullProjectDefinitionSchema = ProjectApiInsertSchema.extend({
|
|
1357
1444
|
graphs: zodOpenapi.z.record(zodOpenapi.z.string(), GraphWithinContextOfProjectSchema),
|
|
1358
1445
|
tools: zodOpenapi.z.record(zodOpenapi.z.string(), ToolApiInsertSchema),
|
|
1446
|
+
// Now includes both MCP and function tools
|
|
1447
|
+
functions: zodOpenapi.z.record(zodOpenapi.z.string(), FunctionApiInsertSchema).optional(),
|
|
1448
|
+
// Global functions
|
|
1359
1449
|
dataComponents: zodOpenapi.z.record(zodOpenapi.z.string(), DataComponentApiInsertSchema).optional(),
|
|
1360
1450
|
artifactComponents: zodOpenapi.z.record(zodOpenapi.z.string(), ArtifactComponentApiInsertSchema).optional(),
|
|
1361
1451
|
statusUpdates: zodOpenapi.z.optional(StatusUpdateSchema),
|
|
@@ -1780,6 +1870,13 @@ exports.FetchDefinitionSchema = FetchDefinitionSchema;
|
|
|
1780
1870
|
exports.FullGraphAgentInsertSchema = FullGraphAgentInsertSchema;
|
|
1781
1871
|
exports.FullGraphDefinitionSchema = FullGraphDefinitionSchema;
|
|
1782
1872
|
exports.FullProjectDefinitionSchema = FullProjectDefinitionSchema;
|
|
1873
|
+
exports.FunctionApiInsertSchema = FunctionApiInsertSchema;
|
|
1874
|
+
exports.FunctionApiSelectSchema = FunctionApiSelectSchema;
|
|
1875
|
+
exports.FunctionApiUpdateSchema = FunctionApiUpdateSchema;
|
|
1876
|
+
exports.FunctionInsertSchema = FunctionInsertSchema;
|
|
1877
|
+
exports.FunctionSelectSchema = FunctionSelectSchema;
|
|
1878
|
+
exports.FunctionToolConfigSchema = FunctionToolConfigSchema;
|
|
1879
|
+
exports.FunctionUpdateSchema = FunctionUpdateSchema;
|
|
1783
1880
|
exports.GraphStopWhenSchema = GraphStopWhenSchema;
|
|
1784
1881
|
exports.GraphWithinContextOfProjectSchema = GraphWithinContextOfProjectSchema;
|
|
1785
1882
|
exports.HeadersScopeSchema = HeadersScopeSchema;
|
|
@@ -1815,6 +1912,7 @@ exports.ProjectModelSchema = ProjectModelSchema;
|
|
|
1815
1912
|
exports.ProjectSelectSchema = ProjectSelectSchema;
|
|
1816
1913
|
exports.ProjectUpdateSchema = ProjectUpdateSchema;
|
|
1817
1914
|
exports.RemovedResponseSchema = RemovedResponseSchema;
|
|
1915
|
+
exports.SandboxConfigSchema = SandboxConfigSchema;
|
|
1818
1916
|
exports.SingleResponseSchema = SingleResponseSchema;
|
|
1819
1917
|
exports.StatusComponentSchema = StatusComponentSchema;
|
|
1820
1918
|
exports.StatusUpdateSchema = StatusUpdateSchema;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
3
|
-
export {
|
|
2
|
+
import { d3 as AgentDefinition, d2 as InternalAgentDefinition, cJ as ExternalAgentApiInsert, fG as FullGraphDefinitionSchema, z as FullGraphDefinition } from '../utility-BHDxGp6I.cjs';
|
|
3
|
+
export { dG as AgentApiInsertSchema, dF as AgentApiSelectSchema, dH as AgentApiUpdateSchema, eR as AgentArtifactComponentApiInsertSchema, eQ as AgentArtifactComponentApiSelectSchema, eS as AgentArtifactComponentApiUpdateSchema, eO as AgentArtifactComponentInsertSchema, eN as AgentArtifactComponentSelectSchema, eP as AgentArtifactComponentUpdateSchema, eF as AgentDataComponentApiInsertSchema, eE as AgentDataComponentApiSelectSchema, eG as AgentDataComponentApiUpdateSchema, eC as AgentDataComponentInsertSchema, eB as AgentDataComponentSelectSchema, eD as AgentDataComponentUpdateSchema, dV as AgentGraphApiInsertSchema, dU as AgentGraphApiSelectSchema, dW as AgentGraphApiUpdateSchema, dS as AgentGraphInsertSchema, dR as AgentGraphSelectSchema, dT as AgentGraphUpdateSchema, dD as AgentInsertSchema, dM as AgentRelationApiInsertSchema, dL as AgentRelationApiSelectSchema, dN as AgentRelationApiUpdateSchema, dJ as AgentRelationInsertSchema, dO as AgentRelationQuerySchema, dI as AgentRelationSelectSchema, dK as AgentRelationUpdateSchema, dC as AgentSelectSchema, e as AgentStopWhen, b as AgentStopWhenSchema, fv as AgentToolRelationApiInsertSchema, fu as AgentToolRelationApiSelectSchema, fw as AgentToolRelationApiUpdateSchema, fs as AgentToolRelationInsertSchema, fr as AgentToolRelationSelectSchema, ft as AgentToolRelationUpdateSchema, dE as AgentUpdateSchema, eZ as AllAgentSchema, f2 as ApiKeyApiCreationResponseSchema, f3 as ApiKeyApiInsertSchema, f1 as ApiKeyApiSelectSchema, A as ApiKeyApiUpdateSchema, e$ as ApiKeyInsertSchema, e_ as ApiKeySelectSchema, f0 as ApiKeyUpdateSchema, eL as ArtifactComponentApiInsertSchema, eK as ArtifactComponentApiSelectSchema, eM as ArtifactComponentApiUpdateSchema, eI as ArtifactComponentInsertSchema, eH as ArtifactComponentSelectSchema, eJ as ArtifactComponentUpdateSchema, fF as CanUseItemSchema, es as ContextCacheApiInsertSchema, er as ContextCacheApiSelectSchema, et as ContextCacheApiUpdateSchema, ep as ContextCacheInsertSchema, eo as ContextCacheSelectSchema, eq as ContextCacheUpdateSchema, fp as ContextConfigApiInsertSchema, fo as ContextConfigApiSelectSchema, fq as ContextConfigApiUpdateSchema, fm as ContextConfigInsertSchema, fl as ContextConfigSelectSchema, fn as ContextConfigUpdateSchema, eg as ConversationApiInsertSchema, ef as ConversationApiSelectSchema, eh as ConversationApiUpdateSchema, ed as ConversationInsertSchema, ec as ConversationSelectSchema, ee as ConversationUpdateSchema, f8 as CredentialReferenceApiInsertSchema, f7 as CredentialReferenceApiSelectSchema, f9 as CredentialReferenceApiUpdateSchema, f5 as CredentialReferenceInsertSchema, f4 as CredentialReferenceSelectSchema, f6 as CredentialReferenceUpdateSchema, ez as DataComponentApiInsertSchema, ey as DataComponentApiSelectSchema, eA as DataComponentApiUpdateSchema, ew as DataComponentBaseSchema, ev as DataComponentInsertSchema, eu as DataComponentSelectSchema, ex as DataComponentUpdateSchema, fL as ErrorResponseSchema, fM as ExistsResponseSchema, eX as ExternalAgentApiInsertSchema, eW as ExternalAgentApiSelectSchema, eY as ExternalAgentApiUpdateSchema, eU as ExternalAgentInsertSchema, dQ as ExternalAgentRelationApiInsertSchema, dP as ExternalAgentRelationInsertSchema, eT as ExternalAgentSelectSchema, eV as ExternalAgentUpdateSchema, fj as FetchConfigSchema, fk as FetchDefinitionSchema, a as FullGraphAgentInsertSchema, fU as FullProjectDefinitionSchema, F as FunctionApiInsertSchema, i as FunctionApiSelectSchema, j as FunctionApiUpdateSchema, fh as FunctionInsertSchema, fg as FunctionSelectSchema, dB as FunctionToolConfig, dA as FunctionToolConfigSchema, fi as FunctionUpdateSchema, d as GraphStopWhen, G as GraphStopWhenSchema, fH as GraphWithinContextOfProjectSchema, fV as HeadersScopeSchema, g0 as IdParamsSchema, fB as LedgerArtifactApiInsertSchema, fA as LedgerArtifactApiSelectSchema, fC as LedgerArtifactApiUpdateSchema, fy as LedgerArtifactInsertSchema, fx as LedgerArtifactSelectSchema, fz as LedgerArtifactUpdateSchema, fJ as ListResponseSchema, du as MAX_ID_LENGTH, fb as MCPToolConfigSchema, dt as MIN_ID_LENGTH, e9 as McpToolDefinitionSchema, fa as McpToolSchema, e7 as McpTransportConfigSchema, em as MessageApiInsertSchema, el as MessageApiSelectSchema, en as MessageApiUpdateSchema, ej as MessageInsertSchema, ei as MessageSelectSchema, ek as MessageUpdateSchema, dx as ModelSchema, f as ModelSettings, M as ModelSettingsSchema, g1 as PaginationQueryParamsSchema, fI as PaginationSchema, fS as ProjectApiInsertSchema, fR as ProjectApiSelectSchema, fT as ProjectApiUpdateSchema, fP as ProjectInsertSchema, dy as ProjectModelSchema, fO as ProjectSelectSchema, fQ as ProjectUpdateSchema, fN as RemovedResponseSchema, dz as SandboxConfig, k as SandboxConfigSchema, fK as SingleResponseSchema, fD as StatusComponentSchema, fE as StatusUpdateSchema, c as StopWhen, S as StopWhenSchema, d$ as TaskApiInsertSchema, d_ as TaskApiSelectSchema, e0 as TaskApiUpdateSchema, dY as TaskInsertSchema, e5 as TaskRelationApiInsertSchema, e4 as TaskRelationApiSelectSchema, e6 as TaskRelationApiUpdateSchema, e2 as TaskRelationInsertSchema, e1 as TaskRelationSelectSchema, e3 as TaskRelationUpdateSchema, dX as TaskSelectSchema, dZ as TaskUpdateSchema, f$ as TenantIdParamsSchema, fW as TenantParamsSchema, fZ as TenantProjectGraphIdParamsSchema, fY as TenantProjectGraphParamsSchema, f_ as TenantProjectIdParamsSchema, fX as TenantProjectParamsSchema, fe as ToolApiInsertSchema, fd as ToolApiSelectSchema, ff as ToolApiUpdateSchema, eb as ToolInsertSchema, ea as ToolSelectSchema, e8 as ToolStatusSchema, fc as ToolUpdateSchema, dv as URL_SAFE_ID_PATTERN, dw as resourceIdSchema } from '../utility-BHDxGp6I.cjs';
|
|
4
4
|
export { P as PropsValidationResult, v as validatePropsAsJsonSchema } from '../props-validation-BMR1qNiy.cjs';
|
|
5
5
|
import 'drizzle-zod';
|
|
6
6
|
import 'drizzle-orm/sqlite-core';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
3
|
-
export {
|
|
2
|
+
import { d3 as AgentDefinition, d2 as InternalAgentDefinition, cJ as ExternalAgentApiInsert, fG as FullGraphDefinitionSchema, z as FullGraphDefinition } from '../utility-BHDxGp6I.js';
|
|
3
|
+
export { dG as AgentApiInsertSchema, dF as AgentApiSelectSchema, dH as AgentApiUpdateSchema, eR as AgentArtifactComponentApiInsertSchema, eQ as AgentArtifactComponentApiSelectSchema, eS as AgentArtifactComponentApiUpdateSchema, eO as AgentArtifactComponentInsertSchema, eN as AgentArtifactComponentSelectSchema, eP as AgentArtifactComponentUpdateSchema, eF as AgentDataComponentApiInsertSchema, eE as AgentDataComponentApiSelectSchema, eG as AgentDataComponentApiUpdateSchema, eC as AgentDataComponentInsertSchema, eB as AgentDataComponentSelectSchema, eD as AgentDataComponentUpdateSchema, dV as AgentGraphApiInsertSchema, dU as AgentGraphApiSelectSchema, dW as AgentGraphApiUpdateSchema, dS as AgentGraphInsertSchema, dR as AgentGraphSelectSchema, dT as AgentGraphUpdateSchema, dD as AgentInsertSchema, dM as AgentRelationApiInsertSchema, dL as AgentRelationApiSelectSchema, dN as AgentRelationApiUpdateSchema, dJ as AgentRelationInsertSchema, dO as AgentRelationQuerySchema, dI as AgentRelationSelectSchema, dK as AgentRelationUpdateSchema, dC as AgentSelectSchema, e as AgentStopWhen, b as AgentStopWhenSchema, fv as AgentToolRelationApiInsertSchema, fu as AgentToolRelationApiSelectSchema, fw as AgentToolRelationApiUpdateSchema, fs as AgentToolRelationInsertSchema, fr as AgentToolRelationSelectSchema, ft as AgentToolRelationUpdateSchema, dE as AgentUpdateSchema, eZ as AllAgentSchema, f2 as ApiKeyApiCreationResponseSchema, f3 as ApiKeyApiInsertSchema, f1 as ApiKeyApiSelectSchema, A as ApiKeyApiUpdateSchema, e$ as ApiKeyInsertSchema, e_ as ApiKeySelectSchema, f0 as ApiKeyUpdateSchema, eL as ArtifactComponentApiInsertSchema, eK as ArtifactComponentApiSelectSchema, eM as ArtifactComponentApiUpdateSchema, eI as ArtifactComponentInsertSchema, eH as ArtifactComponentSelectSchema, eJ as ArtifactComponentUpdateSchema, fF as CanUseItemSchema, es as ContextCacheApiInsertSchema, er as ContextCacheApiSelectSchema, et as ContextCacheApiUpdateSchema, ep as ContextCacheInsertSchema, eo as ContextCacheSelectSchema, eq as ContextCacheUpdateSchema, fp as ContextConfigApiInsertSchema, fo as ContextConfigApiSelectSchema, fq as ContextConfigApiUpdateSchema, fm as ContextConfigInsertSchema, fl as ContextConfigSelectSchema, fn as ContextConfigUpdateSchema, eg as ConversationApiInsertSchema, ef as ConversationApiSelectSchema, eh as ConversationApiUpdateSchema, ed as ConversationInsertSchema, ec as ConversationSelectSchema, ee as ConversationUpdateSchema, f8 as CredentialReferenceApiInsertSchema, f7 as CredentialReferenceApiSelectSchema, f9 as CredentialReferenceApiUpdateSchema, f5 as CredentialReferenceInsertSchema, f4 as CredentialReferenceSelectSchema, f6 as CredentialReferenceUpdateSchema, ez as DataComponentApiInsertSchema, ey as DataComponentApiSelectSchema, eA as DataComponentApiUpdateSchema, ew as DataComponentBaseSchema, ev as DataComponentInsertSchema, eu as DataComponentSelectSchema, ex as DataComponentUpdateSchema, fL as ErrorResponseSchema, fM as ExistsResponseSchema, eX as ExternalAgentApiInsertSchema, eW as ExternalAgentApiSelectSchema, eY as ExternalAgentApiUpdateSchema, eU as ExternalAgentInsertSchema, dQ as ExternalAgentRelationApiInsertSchema, dP as ExternalAgentRelationInsertSchema, eT as ExternalAgentSelectSchema, eV as ExternalAgentUpdateSchema, fj as FetchConfigSchema, fk as FetchDefinitionSchema, a as FullGraphAgentInsertSchema, fU as FullProjectDefinitionSchema, F as FunctionApiInsertSchema, i as FunctionApiSelectSchema, j as FunctionApiUpdateSchema, fh as FunctionInsertSchema, fg as FunctionSelectSchema, dB as FunctionToolConfig, dA as FunctionToolConfigSchema, fi as FunctionUpdateSchema, d as GraphStopWhen, G as GraphStopWhenSchema, fH as GraphWithinContextOfProjectSchema, fV as HeadersScopeSchema, g0 as IdParamsSchema, fB as LedgerArtifactApiInsertSchema, fA as LedgerArtifactApiSelectSchema, fC as LedgerArtifactApiUpdateSchema, fy as LedgerArtifactInsertSchema, fx as LedgerArtifactSelectSchema, fz as LedgerArtifactUpdateSchema, fJ as ListResponseSchema, du as MAX_ID_LENGTH, fb as MCPToolConfigSchema, dt as MIN_ID_LENGTH, e9 as McpToolDefinitionSchema, fa as McpToolSchema, e7 as McpTransportConfigSchema, em as MessageApiInsertSchema, el as MessageApiSelectSchema, en as MessageApiUpdateSchema, ej as MessageInsertSchema, ei as MessageSelectSchema, ek as MessageUpdateSchema, dx as ModelSchema, f as ModelSettings, M as ModelSettingsSchema, g1 as PaginationQueryParamsSchema, fI as PaginationSchema, fS as ProjectApiInsertSchema, fR as ProjectApiSelectSchema, fT as ProjectApiUpdateSchema, fP as ProjectInsertSchema, dy as ProjectModelSchema, fO as ProjectSelectSchema, fQ as ProjectUpdateSchema, fN as RemovedResponseSchema, dz as SandboxConfig, k as SandboxConfigSchema, fK as SingleResponseSchema, fD as StatusComponentSchema, fE as StatusUpdateSchema, c as StopWhen, S as StopWhenSchema, d$ as TaskApiInsertSchema, d_ as TaskApiSelectSchema, e0 as TaskApiUpdateSchema, dY as TaskInsertSchema, e5 as TaskRelationApiInsertSchema, e4 as TaskRelationApiSelectSchema, e6 as TaskRelationApiUpdateSchema, e2 as TaskRelationInsertSchema, e1 as TaskRelationSelectSchema, e3 as TaskRelationUpdateSchema, dX as TaskSelectSchema, dZ as TaskUpdateSchema, f$ as TenantIdParamsSchema, fW as TenantParamsSchema, fZ as TenantProjectGraphIdParamsSchema, fY as TenantProjectGraphParamsSchema, f_ as TenantProjectIdParamsSchema, fX as TenantProjectParamsSchema, fe as ToolApiInsertSchema, fd as ToolApiSelectSchema, ff as ToolApiUpdateSchema, eb as ToolInsertSchema, ea as ToolSelectSchema, e8 as ToolStatusSchema, fc as ToolUpdateSchema, dv as URL_SAFE_ID_PATTERN, dw as resourceIdSchema } from '../utility-BHDxGp6I.js';
|
|
4
4
|
export { P as PropsValidationResult, v as validatePropsAsJsonSchema } from '../props-validation-BMR1qNiy.js';
|
|
5
5
|
import 'drizzle-zod';
|
|
6
6
|
import 'drizzle-orm/sqlite-core';
|
package/dist/validation/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { generateIdFromName, isExternalAgent, isInternalAgent, isValidResourceId, validateAgentRelationships, validateAndTypeGraphData, validateArtifactComponentReferences, validateDataComponentReferences, validateGraphStructure, validateToolReferences } from '../chunk-
|
|
2
|
-
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 } from '../chunk-
|
|
1
|
+
export { generateIdFromName, isExternalAgent, isInternalAgent, isValidResourceId, validateAgentRelationships, validateAndTypeGraphData, validateArtifactComponentReferences, validateDataComponentReferences, validateGraphStructure, validateToolReferences } from '../chunk-MLKHAZVU.js';
|
|
2
|
+
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 } from '../chunk-HZZTBK7Y.js';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
CREATE TABLE `functions` (
|
|
2
|
+
`tenant_id` text NOT NULL,
|
|
3
|
+
`id` text NOT NULL,
|
|
4
|
+
`project_id` text NOT NULL,
|
|
5
|
+
`input_schema` blob,
|
|
6
|
+
`execute_code` text NOT NULL,
|
|
7
|
+
`dependencies` blob,
|
|
8
|
+
`created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
|
9
|
+
`updated_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
|
10
|
+
PRIMARY KEY(`tenant_id`, `project_id`, `id`),
|
|
11
|
+
FOREIGN KEY (`tenant_id`,`project_id`) REFERENCES `projects`(`tenant_id`,`id`) ON UPDATE no action ON DELETE cascade
|
|
12
|
+
);--> statement-breakpoint
|
|
13
|
+
ALTER TABLE `tools` ADD `description` text;--> statement-breakpoint
|
|
14
|
+
ALTER TABLE `tools` ADD `function_id` text REFERENCES functions(tenant_id,project_id,id);--> statement-breakpoint
|
|
15
|
+
ALTER TABLE `projects` ADD `sandbox_config` text;
|
|
16
|
+
|