@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.
@@ -1,3 +1,4 @@
1
+ export { AgentStopWhenSchema, GraphStopWhenSchema, StopWhenSchema } from './chunk-R3VVJXX7.js';
1
2
  import { CredentialStoreType } from './chunk-SVGQSPW4.js';
2
3
  export { CredentialStoreType, MCPTransportType } from './chunk-SVGQSPW4.js';
3
4
  import { z } from 'zod';
@@ -12,7 +12,7 @@ var projects = sqliteCore.sqliteTable(
12
12
  // This IS the project ID
13
13
  name: sqliteCore.text("name").notNull(),
14
14
  description: sqliteCore.text("description").notNull(),
15
- // Project-level default model settingsuration that can be inherited by graphs and agents
15
+ // Project-level default model settings that can be inherited by graphs and agents
16
16
  models: sqliteCore.text("models", { mode: "json" }).$type(),
17
17
  // Project-level stopWhen configuration that can be inherited by graphs and agents
18
18
  stopWhen: sqliteCore.text("stop_when", { mode: "json" }).$type(),
@@ -37,7 +37,14 @@ var contextConfigs = sqliteCore.sqliteTable(
37
37
  createdAt: sqliteCore.text("created_at").notNull().default(drizzleOrm.sql`CURRENT_TIMESTAMP`),
38
38
  updatedAt: sqliteCore.text("updated_at").notNull().default(drizzleOrm.sql`CURRENT_TIMESTAMP`)
39
39
  },
40
- (table) => [sqliteCore.primaryKey({ columns: [table.tenantId, table.projectId, table.id] })]
40
+ (table) => [
41
+ sqliteCore.primaryKey({ columns: [table.tenantId, table.projectId, table.id] }),
42
+ sqliteCore.foreignKey({
43
+ columns: [table.tenantId, table.projectId],
44
+ foreignColumns: [projects.tenantId, projects.id],
45
+ name: "context_configs_project_fk"
46
+ }).onDelete("cascade")
47
+ ]
41
48
  );
42
49
  var contextCache = sqliteCore.sqliteTable(
43
50
  "context_cache",
@@ -66,6 +73,11 @@ var contextCache = sqliteCore.sqliteTable(
66
73
  },
67
74
  (table) => [
68
75
  sqliteCore.primaryKey({ columns: [table.tenantId, table.projectId, table.id] }),
76
+ sqliteCore.foreignKey({
77
+ columns: [table.tenantId, table.projectId],
78
+ foreignColumns: [projects.tenantId, projects.id],
79
+ name: "context_cache_project_fk"
80
+ }).onDelete("cascade"),
69
81
  sqliteCore.index("context_cache_lookup_idx").on(
70
82
  table.conversationId,
71
83
  table.contextConfigId,
@@ -97,7 +109,7 @@ var agents = sqliteCore.sqliteTable(
97
109
  columns: [table.tenantId, table.projectId],
98
110
  foreignColumns: [projects.tenantId, projects.id],
99
111
  name: "agents_project_fk"
100
- })
112
+ }).onDelete("cascade")
101
113
  ]
102
114
  );
103
115
  var agentRelations = sqliteCore.sqliteTable(
@@ -123,7 +135,7 @@ var agentRelations = sqliteCore.sqliteTable(
123
135
  columns: [table.tenantId, table.projectId],
124
136
  foreignColumns: [projects.tenantId, projects.id],
125
137
  name: "agent_relations_project_fk"
126
- })
138
+ }).onDelete("cascade")
127
139
  ]
128
140
  );
129
141
  var externalAgents = sqliteCore.sqliteTable(
@@ -143,6 +155,11 @@ var externalAgents = sqliteCore.sqliteTable(
143
155
  },
144
156
  (table) => [
145
157
  sqliteCore.primaryKey({ columns: [table.tenantId, table.projectId, table.id] }),
158
+ sqliteCore.foreignKey({
159
+ columns: [table.tenantId, table.projectId],
160
+ foreignColumns: [projects.tenantId, projects.id],
161
+ name: "external_agents_project_fk"
162
+ }).onDelete("cascade"),
146
163
  sqliteCore.foreignKey({
147
164
  columns: [table.tenantId, table.projectId, table.credentialReferenceId],
148
165
  foreignColumns: [
@@ -182,7 +199,7 @@ var agentGraph = sqliteCore.sqliteTable(
182
199
  columns: [table.tenantId, table.projectId],
183
200
  foreignColumns: [projects.tenantId, projects.id],
184
201
  name: "agent_graph_project_fk"
185
- })
202
+ }).onDelete("cascade")
186
203
  ]
187
204
  );
188
205
  var tasks = sqliteCore.sqliteTable(
@@ -198,7 +215,14 @@ var tasks = sqliteCore.sqliteTable(
198
215
  createdAt: sqliteCore.text("created_at").notNull().default(drizzleOrm.sql`CURRENT_TIMESTAMP`),
199
216
  updatedAt: sqliteCore.text("updated_at").notNull().default(drizzleOrm.sql`CURRENT_TIMESTAMP`)
200
217
  },
201
- (table) => [sqliteCore.primaryKey({ columns: [table.tenantId, table.projectId, table.id] })]
218
+ (table) => [
219
+ sqliteCore.primaryKey({ columns: [table.tenantId, table.projectId, table.id] }),
220
+ sqliteCore.foreignKey({
221
+ columns: [table.tenantId, table.projectId],
222
+ foreignColumns: [projects.tenantId, projects.id],
223
+ name: "tasks_project_fk"
224
+ }).onDelete("cascade")
225
+ ]
202
226
  );
203
227
  var taskRelations = sqliteCore.sqliteTable(
204
228
  "task_relations",
@@ -213,7 +237,14 @@ var taskRelations = sqliteCore.sqliteTable(
213
237
  createdAt: sqliteCore.text("created_at").notNull().default(drizzleOrm.sql`CURRENT_TIMESTAMP`),
214
238
  updatedAt: sqliteCore.text("updated_at").notNull().default(drizzleOrm.sql`CURRENT_TIMESTAMP`)
215
239
  },
216
- (table) => [sqliteCore.primaryKey({ columns: [table.tenantId, table.projectId, table.id] })]
240
+ (table) => [
241
+ sqliteCore.primaryKey({ columns: [table.tenantId, table.projectId, table.id] }),
242
+ sqliteCore.foreignKey({
243
+ columns: [table.tenantId, table.projectId],
244
+ foreignColumns: [projects.tenantId, projects.id],
245
+ name: "task_relations_project_fk"
246
+ }).onDelete("cascade")
247
+ ]
217
248
  );
218
249
  var dataComponents = sqliteCore.sqliteTable(
219
250
  "data_components",
@@ -227,7 +258,14 @@ var dataComponents = sqliteCore.sqliteTable(
227
258
  createdAt: sqliteCore.text("created_at").notNull().default(drizzleOrm.sql`CURRENT_TIMESTAMP`),
228
259
  updatedAt: sqliteCore.text("updated_at").notNull().default(drizzleOrm.sql`CURRENT_TIMESTAMP`)
229
260
  },
230
- (table) => [sqliteCore.primaryKey({ columns: [table.tenantId, table.projectId, table.id] })]
261
+ (table) => [
262
+ sqliteCore.primaryKey({ columns: [table.tenantId, table.projectId, table.id] }),
263
+ sqliteCore.foreignKey({
264
+ columns: [table.tenantId, table.projectId],
265
+ foreignColumns: [projects.tenantId, projects.id],
266
+ name: "data_components_project_fk"
267
+ }).onDelete("cascade")
268
+ ]
231
269
  );
232
270
  var agentDataComponents = sqliteCore.sqliteTable(
233
271
  "agent_data_components",
@@ -241,6 +279,12 @@ var agentDataComponents = sqliteCore.sqliteTable(
241
279
  },
242
280
  (table) => [
243
281
  sqliteCore.primaryKey({ columns: [table.tenantId, table.projectId, table.id] }),
282
+ // Foreign key constraint to projects table
283
+ sqliteCore.foreignKey({
284
+ columns: [table.tenantId, table.projectId],
285
+ foreignColumns: [projects.tenantId, projects.id],
286
+ name: "agent_data_components_project_fk"
287
+ }).onDelete("cascade"),
244
288
  // Foreign key constraint to agents table
245
289
  sqliteCore.foreignKey({
246
290
  columns: [table.tenantId, table.projectId, table.agentId],
@@ -268,7 +312,14 @@ var artifactComponents = sqliteCore.sqliteTable(
268
312
  createdAt: sqliteCore.text("created_at").notNull().default(drizzleOrm.sql`CURRENT_TIMESTAMP`),
269
313
  updatedAt: sqliteCore.text("updated_at").notNull().default(drizzleOrm.sql`CURRENT_TIMESTAMP`)
270
314
  },
271
- (table) => [sqliteCore.primaryKey({ columns: [table.tenantId, table.projectId, table.id] })]
315
+ (table) => [
316
+ sqliteCore.primaryKey({ columns: [table.tenantId, table.projectId, table.id] }),
317
+ sqliteCore.foreignKey({
318
+ columns: [table.tenantId, table.projectId],
319
+ foreignColumns: [projects.tenantId, projects.id],
320
+ name: "artifact_components_project_fk"
321
+ }).onDelete("cascade")
322
+ ]
272
323
  );
273
324
  var agentArtifactComponents = sqliteCore.sqliteTable(
274
325
  "agent_artifact_components",
@@ -282,6 +333,12 @@ var agentArtifactComponents = sqliteCore.sqliteTable(
282
333
  },
283
334
  (table) => [
284
335
  sqliteCore.primaryKey({ columns: [table.tenantId, table.projectId, table.id] }),
336
+ // Foreign key constraint to projects table
337
+ sqliteCore.foreignKey({
338
+ columns: [table.tenantId, table.projectId],
339
+ foreignColumns: [projects.tenantId, projects.id],
340
+ name: "agent_artifact_components_project_fk"
341
+ }).onDelete("cascade"),
285
342
  // Foreign key constraint to agents table
286
343
  sqliteCore.foreignKey({
287
344
  columns: [table.tenantId, table.projectId, table.agentId],
@@ -325,7 +382,14 @@ var tools = sqliteCore.sqliteTable(
325
382
  createdAt: sqliteCore.text("created_at").notNull().default(drizzleOrm.sql`CURRENT_TIMESTAMP`),
326
383
  updatedAt: sqliteCore.text("updated_at").notNull().default(drizzleOrm.sql`CURRENT_TIMESTAMP`)
327
384
  },
328
- (table) => [sqliteCore.primaryKey({ columns: [table.tenantId, table.projectId, table.id] })]
385
+ (table) => [
386
+ sqliteCore.primaryKey({ columns: [table.tenantId, table.projectId, table.id] }),
387
+ sqliteCore.foreignKey({
388
+ columns: [table.tenantId, table.projectId],
389
+ foreignColumns: [projects.tenantId, projects.id],
390
+ name: "tools_project_fk"
391
+ }).onDelete("cascade")
392
+ ]
329
393
  );
330
394
  var agentToolRelations = sqliteCore.sqliteTable(
331
395
  "agent_tool_relations",
@@ -341,6 +405,12 @@ var agentToolRelations = sqliteCore.sqliteTable(
341
405
  },
342
406
  (table) => [
343
407
  sqliteCore.primaryKey({ columns: [table.tenantId, table.projectId, table.id] }),
408
+ // Foreign key constraint to projects table
409
+ sqliteCore.foreignKey({
410
+ columns: [table.tenantId, table.projectId],
411
+ foreignColumns: [projects.tenantId, projects.id],
412
+ name: "agent_tool_relations_project_fk"
413
+ }).onDelete("cascade"),
344
414
  // Foreign key constraint to agents table
345
415
  sqliteCore.foreignKey({
346
416
  columns: [table.tenantId, table.projectId, table.agentId],
@@ -369,7 +439,14 @@ var conversations = sqliteCore.sqliteTable(
369
439
  createdAt: sqliteCore.text("created_at").notNull().default(drizzleOrm.sql`CURRENT_TIMESTAMP`),
370
440
  updatedAt: sqliteCore.text("updated_at").notNull().default(drizzleOrm.sql`CURRENT_TIMESTAMP`)
371
441
  },
372
- (table) => [sqliteCore.primaryKey({ columns: [table.tenantId, table.projectId, table.id] })]
442
+ (table) => [
443
+ sqliteCore.primaryKey({ columns: [table.tenantId, table.projectId, table.id] }),
444
+ sqliteCore.foreignKey({
445
+ columns: [table.tenantId, table.projectId],
446
+ foreignColumns: [projects.tenantId, projects.id],
447
+ name: "conversations_project_fk"
448
+ }).onDelete("cascade")
449
+ ]
373
450
  );
374
451
  var messages = sqliteCore.sqliteTable(
375
452
  "messages",
@@ -414,7 +491,14 @@ var messages = sqliteCore.sqliteTable(
414
491
  createdAt: sqliteCore.text("created_at").notNull().default(drizzleOrm.sql`CURRENT_TIMESTAMP`),
415
492
  updatedAt: sqliteCore.text("updated_at").notNull().default(drizzleOrm.sql`CURRENT_TIMESTAMP`)
416
493
  },
417
- (table) => [sqliteCore.primaryKey({ columns: [table.tenantId, table.projectId, table.id] })]
494
+ (table) => [
495
+ sqliteCore.primaryKey({ columns: [table.tenantId, table.projectId, table.id] }),
496
+ sqliteCore.foreignKey({
497
+ columns: [table.tenantId, table.projectId],
498
+ foreignColumns: [projects.tenantId, projects.id],
499
+ name: "messages_project_fk"
500
+ }).onDelete("cascade")
501
+ ]
418
502
  );
419
503
  var ledgerArtifacts = sqliteCore.sqliteTable(
420
504
  "ledger_artifacts",
@@ -442,7 +526,14 @@ var ledgerArtifacts = sqliteCore.sqliteTable(
442
526
  createdAt: sqliteCore.text("created_at").notNull().default(drizzleOrm.sql`CURRENT_TIMESTAMP`),
443
527
  updatedAt: sqliteCore.text("updated_at").notNull().default(drizzleOrm.sql`CURRENT_TIMESTAMP`)
444
528
  },
445
- (table) => [sqliteCore.primaryKey({ columns: [table.tenantId, table.projectId, table.id] })]
529
+ (table) => [
530
+ sqliteCore.primaryKey({ columns: [table.tenantId, table.projectId, table.id] }),
531
+ sqliteCore.foreignKey({
532
+ columns: [table.tenantId, table.projectId],
533
+ foreignColumns: [projects.tenantId, projects.id],
534
+ name: "ledger_artifacts_project_fk"
535
+ }).onDelete("cascade")
536
+ ]
446
537
  );
447
538
  var apiKeys = sqliteCore.sqliteTable(
448
539
  "api_keys",
@@ -463,6 +554,11 @@ var apiKeys = sqliteCore.sqliteTable(
463
554
  updatedAt: sqliteCore.text("updated_at").notNull().default(drizzleOrm.sql`CURRENT_TIMESTAMP`)
464
555
  },
465
556
  (t) => [
557
+ sqliteCore.foreignKey({
558
+ columns: [t.tenantId, t.projectId],
559
+ foreignColumns: [projects.tenantId, projects.id],
560
+ name: "api_keys_project_fk"
561
+ }).onDelete("cascade"),
466
562
  sqliteCore.foreignKey({
467
563
  columns: [t.tenantId, t.projectId, t.graphId],
468
564
  foreignColumns: [agentGraph.tenantId, agentGraph.projectId, agentGraph.id],
@@ -487,7 +583,14 @@ var credentialReferences = sqliteCore.sqliteTable(
487
583
  createdAt: sqliteCore.text("created_at").notNull().default(drizzleOrm.sql`CURRENT_TIMESTAMP`),
488
584
  updatedAt: sqliteCore.text("updated_at").notNull().default(drizzleOrm.sql`CURRENT_TIMESTAMP`)
489
585
  },
490
- (t) => [sqliteCore.primaryKey({ columns: [t.tenantId, t.projectId, t.id] })]
586
+ (t) => [
587
+ sqliteCore.primaryKey({ columns: [t.tenantId, t.projectId, t.id] }),
588
+ sqliteCore.foreignKey({
589
+ columns: [t.tenantId, t.projectId],
590
+ foreignColumns: [projects.tenantId, projects.id],
591
+ name: "credential_references_project_fk"
592
+ }).onDelete("cascade")
593
+ ]
491
594
  );
492
595
  var ledgerArtifactsTaskIdIdx = sqliteCore.index("ledger_artifacts_task_id_idx").on(
493
596
  ledgerArtifacts.taskId
package/dist/db/schema.js CHANGED
@@ -1 +1 @@
1
- export { agentArtifactComponents, agentArtifactComponentsRelations, agentDataComponents, agentGraph, agentGraphRelations, agentRelations, agentRelationsRelations, agentToolRelations, agentToolRelationsRelations, agents, agentsRelations, apiKeys, apiKeysRelations, artifactComponents, artifactComponentsRelations, contextCache, contextCacheRelations, contextConfigs, contextConfigsRelations, conversations, conversationsRelations, credentialReferences, credentialReferencesRelations, dataComponents, externalAgents, externalAgentsRelations, ledgerArtifacts, ledgerArtifactsContextIdIdx, ledgerArtifactsTaskContextNameUnique, ledgerArtifactsTaskIdIdx, messages, messagesRelations, projects, projectsRelations, taskRelations, taskRelationsRelations, tasks, tasksRelations, tools, toolsRelations } from '../chunk-M4JXMAG7.js';
1
+ export { agentArtifactComponents, agentArtifactComponentsRelations, agentDataComponents, agentGraph, agentGraphRelations, agentRelations, agentRelationsRelations, agentToolRelations, agentToolRelationsRelations, agents, agentsRelations, apiKeys, apiKeysRelations, artifactComponents, artifactComponentsRelations, contextCache, contextCacheRelations, contextConfigs, contextConfigsRelations, conversations, conversationsRelations, credentialReferences, credentialReferencesRelations, dataComponents, externalAgents, externalAgentsRelations, ledgerArtifacts, ledgerArtifactsContextIdIdx, ledgerArtifactsTaskContextNameUnique, ledgerArtifactsTaskIdIdx, messages, messagesRelations, projects, projectsRelations, taskRelations, taskRelationsRelations, tasks, tasksRelations, tools, toolsRelations } from '../chunk-MXQKLGQK.js';