@inkeep/agents-core 0.1.6 → 0.1.7

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.
@@ -14,7 +14,7 @@ var projects = sqliteCore.sqliteTable(
14
14
  // This IS the project ID
15
15
  name: sqliteCore.text("name").notNull(),
16
16
  description: sqliteCore.text("description").notNull(),
17
- // Project-level default model settingsuration that can be inherited by graphs and agents
17
+ // Project-level default model settings that can be inherited by graphs and agents
18
18
  models: sqliteCore.text("models", { mode: "json" }).$type(),
19
19
  // Project-level stopWhen configuration that can be inherited by graphs and agents
20
20
  stopWhen: sqliteCore.text("stop_when", { mode: "json" }).$type(),
@@ -39,7 +39,14 @@ var contextConfigs = sqliteCore.sqliteTable(
39
39
  createdAt: sqliteCore.text("created_at").notNull().default(drizzleOrm.sql`CURRENT_TIMESTAMP`),
40
40
  updatedAt: sqliteCore.text("updated_at").notNull().default(drizzleOrm.sql`CURRENT_TIMESTAMP`)
41
41
  },
42
- (table) => [sqliteCore.primaryKey({ columns: [table.tenantId, table.projectId, table.id] })]
42
+ (table) => [
43
+ sqliteCore.primaryKey({ columns: [table.tenantId, table.projectId, table.id] }),
44
+ sqliteCore.foreignKey({
45
+ columns: [table.tenantId, table.projectId],
46
+ foreignColumns: [projects.tenantId, projects.id],
47
+ name: "context_configs_project_fk"
48
+ }).onDelete("cascade")
49
+ ]
43
50
  );
44
51
  var contextCache = sqliteCore.sqliteTable(
45
52
  "context_cache",
@@ -68,6 +75,11 @@ var contextCache = sqliteCore.sqliteTable(
68
75
  },
69
76
  (table) => [
70
77
  sqliteCore.primaryKey({ columns: [table.tenantId, table.projectId, table.id] }),
78
+ sqliteCore.foreignKey({
79
+ columns: [table.tenantId, table.projectId],
80
+ foreignColumns: [projects.tenantId, projects.id],
81
+ name: "context_cache_project_fk"
82
+ }).onDelete("cascade"),
71
83
  sqliteCore.index("context_cache_lookup_idx").on(
72
84
  table.conversationId,
73
85
  table.contextConfigId,
@@ -99,7 +111,7 @@ var agents = sqliteCore.sqliteTable(
99
111
  columns: [table.tenantId, table.projectId],
100
112
  foreignColumns: [projects.tenantId, projects.id],
101
113
  name: "agents_project_fk"
102
- })
114
+ }).onDelete("cascade")
103
115
  ]
104
116
  );
105
117
  var agentRelations = sqliteCore.sqliteTable(
@@ -125,7 +137,7 @@ var agentRelations = sqliteCore.sqliteTable(
125
137
  columns: [table.tenantId, table.projectId],
126
138
  foreignColumns: [projects.tenantId, projects.id],
127
139
  name: "agent_relations_project_fk"
128
- })
140
+ }).onDelete("cascade")
129
141
  ]
130
142
  );
131
143
  var externalAgents = sqliteCore.sqliteTable(
@@ -145,6 +157,11 @@ var externalAgents = sqliteCore.sqliteTable(
145
157
  },
146
158
  (table) => [
147
159
  sqliteCore.primaryKey({ columns: [table.tenantId, table.projectId, table.id] }),
160
+ sqliteCore.foreignKey({
161
+ columns: [table.tenantId, table.projectId],
162
+ foreignColumns: [projects.tenantId, projects.id],
163
+ name: "external_agents_project_fk"
164
+ }).onDelete("cascade"),
148
165
  sqliteCore.foreignKey({
149
166
  columns: [table.tenantId, table.projectId, table.credentialReferenceId],
150
167
  foreignColumns: [
@@ -184,7 +201,7 @@ var agentGraph = sqliteCore.sqliteTable(
184
201
  columns: [table.tenantId, table.projectId],
185
202
  foreignColumns: [projects.tenantId, projects.id],
186
203
  name: "agent_graph_project_fk"
187
- })
204
+ }).onDelete("cascade")
188
205
  ]
189
206
  );
190
207
  var tasks = sqliteCore.sqliteTable(
@@ -200,7 +217,14 @@ var tasks = sqliteCore.sqliteTable(
200
217
  createdAt: sqliteCore.text("created_at").notNull().default(drizzleOrm.sql`CURRENT_TIMESTAMP`),
201
218
  updatedAt: sqliteCore.text("updated_at").notNull().default(drizzleOrm.sql`CURRENT_TIMESTAMP`)
202
219
  },
203
- (table) => [sqliteCore.primaryKey({ columns: [table.tenantId, table.projectId, table.id] })]
220
+ (table) => [
221
+ sqliteCore.primaryKey({ columns: [table.tenantId, table.projectId, table.id] }),
222
+ sqliteCore.foreignKey({
223
+ columns: [table.tenantId, table.projectId],
224
+ foreignColumns: [projects.tenantId, projects.id],
225
+ name: "tasks_project_fk"
226
+ }).onDelete("cascade")
227
+ ]
204
228
  );
205
229
  var taskRelations = sqliteCore.sqliteTable(
206
230
  "task_relations",
@@ -215,7 +239,14 @@ var taskRelations = sqliteCore.sqliteTable(
215
239
  createdAt: sqliteCore.text("created_at").notNull().default(drizzleOrm.sql`CURRENT_TIMESTAMP`),
216
240
  updatedAt: sqliteCore.text("updated_at").notNull().default(drizzleOrm.sql`CURRENT_TIMESTAMP`)
217
241
  },
218
- (table) => [sqliteCore.primaryKey({ columns: [table.tenantId, table.projectId, table.id] })]
242
+ (table) => [
243
+ sqliteCore.primaryKey({ columns: [table.tenantId, table.projectId, table.id] }),
244
+ sqliteCore.foreignKey({
245
+ columns: [table.tenantId, table.projectId],
246
+ foreignColumns: [projects.tenantId, projects.id],
247
+ name: "task_relations_project_fk"
248
+ }).onDelete("cascade")
249
+ ]
219
250
  );
220
251
  var dataComponents = sqliteCore.sqliteTable(
221
252
  "data_components",
@@ -229,7 +260,14 @@ var dataComponents = sqliteCore.sqliteTable(
229
260
  createdAt: sqliteCore.text("created_at").notNull().default(drizzleOrm.sql`CURRENT_TIMESTAMP`),
230
261
  updatedAt: sqliteCore.text("updated_at").notNull().default(drizzleOrm.sql`CURRENT_TIMESTAMP`)
231
262
  },
232
- (table) => [sqliteCore.primaryKey({ columns: [table.tenantId, table.projectId, table.id] })]
263
+ (table) => [
264
+ sqliteCore.primaryKey({ columns: [table.tenantId, table.projectId, table.id] }),
265
+ sqliteCore.foreignKey({
266
+ columns: [table.tenantId, table.projectId],
267
+ foreignColumns: [projects.tenantId, projects.id],
268
+ name: "data_components_project_fk"
269
+ }).onDelete("cascade")
270
+ ]
233
271
  );
234
272
  var agentDataComponents = sqliteCore.sqliteTable(
235
273
  "agent_data_components",
@@ -243,6 +281,12 @@ var agentDataComponents = sqliteCore.sqliteTable(
243
281
  },
244
282
  (table) => [
245
283
  sqliteCore.primaryKey({ columns: [table.tenantId, table.projectId, table.id] }),
284
+ // Foreign key constraint to projects table
285
+ sqliteCore.foreignKey({
286
+ columns: [table.tenantId, table.projectId],
287
+ foreignColumns: [projects.tenantId, projects.id],
288
+ name: "agent_data_components_project_fk"
289
+ }).onDelete("cascade"),
246
290
  // Foreign key constraint to agents table
247
291
  sqliteCore.foreignKey({
248
292
  columns: [table.tenantId, table.projectId, table.agentId],
@@ -270,7 +314,14 @@ var artifactComponents = sqliteCore.sqliteTable(
270
314
  createdAt: sqliteCore.text("created_at").notNull().default(drizzleOrm.sql`CURRENT_TIMESTAMP`),
271
315
  updatedAt: sqliteCore.text("updated_at").notNull().default(drizzleOrm.sql`CURRENT_TIMESTAMP`)
272
316
  },
273
- (table) => [sqliteCore.primaryKey({ columns: [table.tenantId, table.projectId, table.id] })]
317
+ (table) => [
318
+ sqliteCore.primaryKey({ columns: [table.tenantId, table.projectId, table.id] }),
319
+ sqliteCore.foreignKey({
320
+ columns: [table.tenantId, table.projectId],
321
+ foreignColumns: [projects.tenantId, projects.id],
322
+ name: "artifact_components_project_fk"
323
+ }).onDelete("cascade")
324
+ ]
274
325
  );
275
326
  var agentArtifactComponents = sqliteCore.sqliteTable(
276
327
  "agent_artifact_components",
@@ -284,6 +335,12 @@ var agentArtifactComponents = sqliteCore.sqliteTable(
284
335
  },
285
336
  (table) => [
286
337
  sqliteCore.primaryKey({ columns: [table.tenantId, table.projectId, table.id] }),
338
+ // Foreign key constraint to projects table
339
+ sqliteCore.foreignKey({
340
+ columns: [table.tenantId, table.projectId],
341
+ foreignColumns: [projects.tenantId, projects.id],
342
+ name: "agent_artifact_components_project_fk"
343
+ }).onDelete("cascade"),
287
344
  // Foreign key constraint to agents table
288
345
  sqliteCore.foreignKey({
289
346
  columns: [table.tenantId, table.projectId, table.agentId],
@@ -327,7 +384,14 @@ var tools = sqliteCore.sqliteTable(
327
384
  createdAt: sqliteCore.text("created_at").notNull().default(drizzleOrm.sql`CURRENT_TIMESTAMP`),
328
385
  updatedAt: sqliteCore.text("updated_at").notNull().default(drizzleOrm.sql`CURRENT_TIMESTAMP`)
329
386
  },
330
- (table) => [sqliteCore.primaryKey({ columns: [table.tenantId, table.projectId, table.id] })]
387
+ (table) => [
388
+ sqliteCore.primaryKey({ columns: [table.tenantId, table.projectId, table.id] }),
389
+ sqliteCore.foreignKey({
390
+ columns: [table.tenantId, table.projectId],
391
+ foreignColumns: [projects.tenantId, projects.id],
392
+ name: "tools_project_fk"
393
+ }).onDelete("cascade")
394
+ ]
331
395
  );
332
396
  var agentToolRelations = sqliteCore.sqliteTable(
333
397
  "agent_tool_relations",
@@ -343,6 +407,12 @@ var agentToolRelations = sqliteCore.sqliteTable(
343
407
  },
344
408
  (table) => [
345
409
  sqliteCore.primaryKey({ columns: [table.tenantId, table.projectId, table.id] }),
410
+ // Foreign key constraint to projects table
411
+ sqliteCore.foreignKey({
412
+ columns: [table.tenantId, table.projectId],
413
+ foreignColumns: [projects.tenantId, projects.id],
414
+ name: "agent_tool_relations_project_fk"
415
+ }).onDelete("cascade"),
346
416
  // Foreign key constraint to agents table
347
417
  sqliteCore.foreignKey({
348
418
  columns: [table.tenantId, table.projectId, table.agentId],
@@ -371,7 +441,14 @@ var conversations = sqliteCore.sqliteTable(
371
441
  createdAt: sqliteCore.text("created_at").notNull().default(drizzleOrm.sql`CURRENT_TIMESTAMP`),
372
442
  updatedAt: sqliteCore.text("updated_at").notNull().default(drizzleOrm.sql`CURRENT_TIMESTAMP`)
373
443
  },
374
- (table) => [sqliteCore.primaryKey({ columns: [table.tenantId, table.projectId, table.id] })]
444
+ (table) => [
445
+ sqliteCore.primaryKey({ columns: [table.tenantId, table.projectId, table.id] }),
446
+ sqliteCore.foreignKey({
447
+ columns: [table.tenantId, table.projectId],
448
+ foreignColumns: [projects.tenantId, projects.id],
449
+ name: "conversations_project_fk"
450
+ }).onDelete("cascade")
451
+ ]
375
452
  );
376
453
  var messages = sqliteCore.sqliteTable(
377
454
  "messages",
@@ -416,7 +493,14 @@ var messages = sqliteCore.sqliteTable(
416
493
  createdAt: sqliteCore.text("created_at").notNull().default(drizzleOrm.sql`CURRENT_TIMESTAMP`),
417
494
  updatedAt: sqliteCore.text("updated_at").notNull().default(drizzleOrm.sql`CURRENT_TIMESTAMP`)
418
495
  },
419
- (table) => [sqliteCore.primaryKey({ columns: [table.tenantId, table.projectId, table.id] })]
496
+ (table) => [
497
+ sqliteCore.primaryKey({ columns: [table.tenantId, table.projectId, table.id] }),
498
+ sqliteCore.foreignKey({
499
+ columns: [table.tenantId, table.projectId],
500
+ foreignColumns: [projects.tenantId, projects.id],
501
+ name: "messages_project_fk"
502
+ }).onDelete("cascade")
503
+ ]
420
504
  );
421
505
  var ledgerArtifacts = sqliteCore.sqliteTable(
422
506
  "ledger_artifacts",
@@ -444,7 +528,14 @@ var ledgerArtifacts = sqliteCore.sqliteTable(
444
528
  createdAt: sqliteCore.text("created_at").notNull().default(drizzleOrm.sql`CURRENT_TIMESTAMP`),
445
529
  updatedAt: sqliteCore.text("updated_at").notNull().default(drizzleOrm.sql`CURRENT_TIMESTAMP`)
446
530
  },
447
- (table) => [sqliteCore.primaryKey({ columns: [table.tenantId, table.projectId, table.id] })]
531
+ (table) => [
532
+ sqliteCore.primaryKey({ columns: [table.tenantId, table.projectId, table.id] }),
533
+ sqliteCore.foreignKey({
534
+ columns: [table.tenantId, table.projectId],
535
+ foreignColumns: [projects.tenantId, projects.id],
536
+ name: "ledger_artifacts_project_fk"
537
+ }).onDelete("cascade")
538
+ ]
448
539
  );
449
540
  var apiKeys = sqliteCore.sqliteTable(
450
541
  "api_keys",
@@ -465,6 +556,11 @@ var apiKeys = sqliteCore.sqliteTable(
465
556
  updatedAt: sqliteCore.text("updated_at").notNull().default(drizzleOrm.sql`CURRENT_TIMESTAMP`)
466
557
  },
467
558
  (t) => [
559
+ sqliteCore.foreignKey({
560
+ columns: [t.tenantId, t.projectId],
561
+ foreignColumns: [projects.tenantId, projects.id],
562
+ name: "api_keys_project_fk"
563
+ }).onDelete("cascade"),
468
564
  sqliteCore.foreignKey({
469
565
  columns: [t.tenantId, t.projectId, t.graphId],
470
566
  foreignColumns: [agentGraph.tenantId, agentGraph.projectId, agentGraph.id],
@@ -489,7 +585,14 @@ var credentialReferences = sqliteCore.sqliteTable(
489
585
  createdAt: sqliteCore.text("created_at").notNull().default(drizzleOrm.sql`CURRENT_TIMESTAMP`),
490
586
  updatedAt: sqliteCore.text("updated_at").notNull().default(drizzleOrm.sql`CURRENT_TIMESTAMP`)
491
587
  },
492
- (t) => [sqliteCore.primaryKey({ columns: [t.tenantId, t.projectId, t.id] })]
588
+ (t) => [
589
+ sqliteCore.primaryKey({ columns: [t.tenantId, t.projectId, t.id] }),
590
+ sqliteCore.foreignKey({
591
+ columns: [t.tenantId, t.projectId],
592
+ foreignColumns: [projects.tenantId, projects.id],
593
+ name: "credential_references_project_fk"
594
+ }).onDelete("cascade")
595
+ ]
493
596
  );
494
597
  sqliteCore.index("ledger_artifacts_task_id_idx").on(
495
598
  ledgerArtifacts.taskId
@@ -803,6 +906,12 @@ var CredentialStoreType = {
803
906
  };
804
907
 
805
908
  // src/validation/schemas.ts
909
+ var StopWhenSchema = zodOpenapi.z.object({
910
+ transferCountIs: zodOpenapi.z.number().min(1).max(100).optional(),
911
+ stepCountIs: zodOpenapi.z.number().min(1).max(1e3).optional()
912
+ });
913
+ var GraphStopWhenSchema = StopWhenSchema.pick({ transferCountIs: true });
914
+ var AgentStopWhenSchema = StopWhenSchema.pick({ stepCountIs: true });
806
915
  var MIN_ID_LENGTH = 1;
807
916
  var MAX_ID_LENGTH = 255;
808
917
  var URL_SAFE_ID_PATTERN = /^[a-zA-Z0-9\-_.]+$/;
@@ -1246,16 +1355,20 @@ var FullGraphAgentInsertSchema = AgentApiInsertSchema.extend({
1246
1355
  });
1247
1356
  var FullGraphDefinitionSchema = AgentGraphApiInsertSchema.extend({
1248
1357
  agents: zodOpenapi.z.record(zodOpenapi.z.string(), zodOpenapi.z.union([FullGraphAgentInsertSchema, ExternalAgentApiInsertSchema])),
1249
- tools: zodOpenapi.z.record(zodOpenapi.z.string(), ToolApiInsertSchema),
1358
+ tools: zodOpenapi.z.record(zodOpenapi.z.string(), ToolApiInsertSchema).optional(),
1250
1359
  credentialReferences: zodOpenapi.z.array(CredentialReferenceApiInsertSchema).optional(),
1251
1360
  dataComponents: zodOpenapi.z.record(zodOpenapi.z.string(), DataComponentApiInsertSchema).optional(),
1252
1361
  artifactComponents: zodOpenapi.z.record(zodOpenapi.z.string(), ArtifactComponentApiInsertSchema).optional(),
1253
1362
  contextConfig: zodOpenapi.z.optional(ContextConfigApiInsertSchema),
1254
1363
  statusUpdates: zodOpenapi.z.optional(StatusUpdateSchema),
1255
1364
  models: ModelSchema.optional(),
1256
- stopWhen: zodOpenapi.z.object({
1257
- transferCountIs: zodOpenapi.z.number().min(1).max(100).optional()
1258
- }).optional(),
1365
+ stopWhen: GraphStopWhenSchema.optional(),
1366
+ graphPrompt: zodOpenapi.z.string().max(5e3, "Graph prompt cannot exceed 5000 characters").optional()
1367
+ });
1368
+ var GraphWithinContextOfProjectSchema = AgentGraphApiInsertSchema.extend({
1369
+ agents: zodOpenapi.z.record(zodOpenapi.z.string(), zodOpenapi.z.union([FullGraphAgentInsertSchema, ExternalAgentApiInsertSchema])),
1370
+ models: ModelSchema.optional(),
1371
+ stopWhen: GraphStopWhenSchema.optional(),
1259
1372
  graphPrompt: zodOpenapi.z.string().max(5e3, "Graph prompt cannot exceed 5000 characters").optional()
1260
1373
  });
1261
1374
  var PaginationSchema = zodOpenapi.z.object({
@@ -1285,7 +1398,8 @@ var RemovedResponseSchema = zodOpenapi.z.object({
1285
1398
  });
1286
1399
  var ProjectSelectSchema = drizzleZod.createSelectSchema(projects);
1287
1400
  var ProjectInsertSchema = drizzleZod.createInsertSchema(projects).extend({
1288
- models: ProjectModelSchema.optional()
1401
+ models: ProjectModelSchema.optional(),
1402
+ stopWhen: StopWhenSchema.optional()
1289
1403
  }).omit({
1290
1404
  createdAt: true,
1291
1405
  updatedAt: true
@@ -1294,6 +1408,17 @@ var ProjectUpdateSchema = ProjectInsertSchema.partial();
1294
1408
  var ProjectApiSelectSchema = ProjectSelectSchema.omit({ tenantId: true });
1295
1409
  var ProjectApiInsertSchema = ProjectInsertSchema.omit({ tenantId: true });
1296
1410
  var ProjectApiUpdateSchema = ProjectUpdateSchema.omit({ tenantId: true });
1411
+ var FullProjectDefinitionSchema = ProjectApiInsertSchema.extend({
1412
+ graphs: zodOpenapi.z.record(zodOpenapi.z.string(), GraphWithinContextOfProjectSchema),
1413
+ tools: zodOpenapi.z.record(zodOpenapi.z.string(), ToolApiInsertSchema),
1414
+ dataComponents: zodOpenapi.z.record(zodOpenapi.z.string(), DataComponentApiInsertSchema).optional(),
1415
+ artifactComponents: zodOpenapi.z.record(zodOpenapi.z.string(), ArtifactComponentApiInsertSchema).optional(),
1416
+ contextConfig: zodOpenapi.z.record(zodOpenapi.z.string(), ContextConfigApiInsertSchema).optional(),
1417
+ statusUpdates: zodOpenapi.z.optional(StatusUpdateSchema),
1418
+ credentialReferences: zodOpenapi.z.array(CredentialReferenceApiInsertSchema).optional(),
1419
+ createdAt: zodOpenapi.z.string().optional(),
1420
+ updatedAt: zodOpenapi.z.string().optional()
1421
+ });
1297
1422
  var HeadersScopeSchema = zodOpenapi.z.object({
1298
1423
  "x-inkeep-tenant-id": zodOpenapi.z.string().optional().openapi({
1299
1424
  description: "Tenant identifier",
@@ -1362,7 +1487,7 @@ function validateAndTypeGraphData(data) {
1362
1487
  }
1363
1488
  function validateToolReferences(graphData) {
1364
1489
  const errors = [];
1365
- const availableToolIds = new Set(Object.keys(graphData.tools));
1490
+ const availableToolIds = new Set(Object.keys(graphData.tools || {}));
1366
1491
  for (const [agentId, agentData] of Object.entries(graphData.agents)) {
1367
1492
  if (isInternalAgent(agentData) && agentData.tools && Array.isArray(agentData.tools)) {
1368
1493
  for (const toolId of agentData.tools) {
@@ -1503,6 +1628,7 @@ exports.AgentRelationQuerySchema = AgentRelationQuerySchema;
1503
1628
  exports.AgentRelationSelectSchema = AgentRelationSelectSchema;
1504
1629
  exports.AgentRelationUpdateSchema = AgentRelationUpdateSchema;
1505
1630
  exports.AgentSelectSchema = AgentSelectSchema;
1631
+ exports.AgentStopWhenSchema = AgentStopWhenSchema;
1506
1632
  exports.AgentToolRelationApiInsertSchema = AgentToolRelationApiInsertSchema;
1507
1633
  exports.AgentToolRelationApiSelectSchema = AgentToolRelationApiSelectSchema;
1508
1634
  exports.AgentToolRelationApiUpdateSchema = AgentToolRelationApiUpdateSchema;
@@ -1569,6 +1695,9 @@ exports.FetchConfigSchema = FetchConfigSchema;
1569
1695
  exports.FetchDefinitionSchema = FetchDefinitionSchema;
1570
1696
  exports.FullGraphAgentInsertSchema = FullGraphAgentInsertSchema;
1571
1697
  exports.FullGraphDefinitionSchema = FullGraphDefinitionSchema;
1698
+ exports.FullProjectDefinitionSchema = FullProjectDefinitionSchema;
1699
+ exports.GraphStopWhenSchema = GraphStopWhenSchema;
1700
+ exports.GraphWithinContextOfProjectSchema = GraphWithinContextOfProjectSchema;
1572
1701
  exports.HeadersScopeSchema = HeadersScopeSchema;
1573
1702
  exports.IdParamsSchema = IdParamsSchema;
1574
1703
  exports.LedgerArtifactApiInsertSchema = LedgerArtifactApiInsertSchema;
@@ -1605,6 +1734,7 @@ exports.RemovedResponseSchema = RemovedResponseSchema;
1605
1734
  exports.SingleResponseSchema = SingleResponseSchema;
1606
1735
  exports.StatusComponentSchema = StatusComponentSchema;
1607
1736
  exports.StatusUpdateSchema = StatusUpdateSchema;
1737
+ exports.StopWhenSchema = StopWhenSchema;
1608
1738
  exports.TaskApiInsertSchema = TaskApiInsertSchema;
1609
1739
  exports.TaskApiSelectSchema = TaskApiSelectSchema;
1610
1740
  exports.TaskApiUpdateSchema = TaskApiUpdateSchema;
@@ -1 +1,2 @@
1
- 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, AgentToolRelationApiInsertSchema, AgentToolRelationApiSelectSchema, AgentToolRelationApiUpdateSchema, AgentToolRelationInsertSchema, AgentToolRelationSelectSchema, AgentToolRelationUpdateSchema, AgentUpdateSchema, AllAgentSchema, ApiKeyApiCreationResponseSchema, ApiKeyApiInsertSchema, ApiKeyApiSelectSchema, ApiKeyApiUpdateSchema, ApiKeyInsertSchema, ApiKeySelectSchema, ApiKeyUpdateSchema, ArtifactComponentApiInsertSchema, ArtifactComponentApiSelectSchema, ArtifactComponentApiUpdateSchema, ArtifactComponentInsertSchema, ArtifactComponentSelectSchema, ArtifactComponentUpdateSchema, 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, 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, TaskApiInsertSchema, TaskApiSelectSchema, TaskApiUpdateSchema, TaskInsertSchema, TaskRelationApiInsertSchema, TaskRelationApiSelectSchema, TaskRelationApiUpdateSchema, TaskRelationInsertSchema, TaskRelationSelectSchema, TaskRelationUpdateSchema, TaskSelectSchema, TaskUpdateSchema, TenantIdParamsSchema, TenantParamsSchema, TenantProjectIdParamsSchema, TenantProjectParamsSchema, ToolApiInsertSchema, ToolApiSelectSchema, ToolApiUpdateSchema, ToolInsertSchema, ToolSelectSchema, ToolStatusSchema, ToolUpdateSchema, URL_SAFE_ID_PATTERN, generateIdFromName, isExternalAgent, isInternalAgent, isValidResourceId, resourceIdSchema, validateAgentRelationships, validateAndTypeGraphData, validateArtifactComponentReferences, validateDataComponentReferences, validateGraphStructure, validateToolReferences } from '../chunk-RZPLS4MU.js';
1
+ export { generateIdFromName, isExternalAgent, isInternalAgent, isValidResourceId, validateAgentRelationships, validateAndTypeGraphData, validateArtifactComponentReferences, validateDataComponentReferences, validateGraphStructure, validateToolReferences } from '../chunk-BMKWVKI2.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, 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, TenantProjectIdParamsSchema, TenantProjectParamsSchema, ToolApiInsertSchema, ToolApiSelectSchema, ToolApiUpdateSchema, ToolInsertSchema, ToolSelectSchema, ToolStatusSchema, ToolUpdateSchema, URL_SAFE_ID_PATTERN, resourceIdSchema } from '../chunk-R3VVJXX7.js';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@inkeep/agents-core",
3
- "version": "0.1.6",
4
- "description": "Core database schema, types, and validation schemas for Inkeep Agent Framework",
3
+ "version": "0.1.7",
4
+ "description": "Agents Core contains the database schema, types, and validation schemas for Inkeep Agent Framework, along with core components.",
5
5
  "type": "module",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
7
7
  "main": "dist/index.js",
@@ -53,6 +53,7 @@
53
53
  "@vitest/coverage-v8": "^2.0.0",
54
54
  "clean-package": "^2.2.0",
55
55
  "drizzle-kit": "^0.31.4",
56
+ "tsx": "^4.19.2",
56
57
  "typescript": "^5.9.2",
57
58
  "vitest": "^3.1.4"
58
59
  },
@@ -60,7 +61,7 @@
60
61
  "node": ">=22.0.0"
61
62
  },
62
63
  "publishConfig": {
63
- "access": "restricted",
64
+ "access": "public",
64
65
  "registry": "https://registry.npmjs.org/"
65
66
  },
66
67
  "files": [
@@ -90,6 +91,8 @@
90
91
  "db:push": "drizzle-kit push",
91
92
  "db:migrate": "drizzle-kit migrate",
92
93
  "db:clean": "tsx src/db/clean.ts",
94
+ "db:delete": "tsx src/db/delete.ts",
95
+ "db:reset": "pnpm db:delete && pnpm db:push",
93
96
  "db:studio": "drizzle-kit studio",
94
97
  "db:check": "drizzle-kit check",
95
98
  "db:reset-schema": "rm -rf drizzle/* && echo 'All migration files removed, generating new schema' && drizzle-kit generate"