@babyclaw/gateway 0.0.0

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.
@@ -0,0 +1,700 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "8b4b06c8-89c0-453e-84b4-ea6715cf1582",
5
+ "prevId": "00000000-0000-0000-0000-000000000000",
6
+ "tables": {
7
+ "ChannelMessageLink": {
8
+ "name": "ChannelMessageLink",
9
+ "columns": {
10
+ "id": {
11
+ "name": "id",
12
+ "type": "text",
13
+ "primaryKey": true,
14
+ "notNull": true,
15
+ "autoincrement": false
16
+ },
17
+ "platform": {
18
+ "name": "platform",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true,
22
+ "autoincrement": false
23
+ },
24
+ "platformChatId": {
25
+ "name": "platformChatId",
26
+ "type": "text",
27
+ "primaryKey": false,
28
+ "notNull": true,
29
+ "autoincrement": false
30
+ },
31
+ "platformMessageId": {
32
+ "name": "platformMessageId",
33
+ "type": "text",
34
+ "primaryKey": false,
35
+ "notNull": true,
36
+ "autoincrement": false
37
+ },
38
+ "sessionKey": {
39
+ "name": "sessionKey",
40
+ "type": "text",
41
+ "primaryKey": false,
42
+ "notNull": true,
43
+ "autoincrement": false
44
+ },
45
+ "scheduleId": {
46
+ "name": "scheduleId",
47
+ "type": "text",
48
+ "primaryKey": false,
49
+ "notNull": false,
50
+ "autoincrement": false
51
+ },
52
+ "scheduleRunId": {
53
+ "name": "scheduleRunId",
54
+ "type": "text",
55
+ "primaryKey": false,
56
+ "notNull": false,
57
+ "autoincrement": false
58
+ },
59
+ "createdAt": {
60
+ "name": "createdAt",
61
+ "type": "integer",
62
+ "primaryKey": false,
63
+ "notNull": true,
64
+ "autoincrement": false
65
+ }
66
+ },
67
+ "indexes": {
68
+ "ChannelMessageLink_platform_chatId_messageId_key": {
69
+ "name": "ChannelMessageLink_platform_chatId_messageId_key",
70
+ "columns": ["platform", "platformChatId", "platformMessageId"],
71
+ "isUnique": true
72
+ },
73
+ "ChannelMessageLink_sessionKey_idx": {
74
+ "name": "ChannelMessageLink_sessionKey_idx",
75
+ "columns": ["sessionKey"],
76
+ "isUnique": false
77
+ },
78
+ "ChannelMessageLink_scheduleId_idx": {
79
+ "name": "ChannelMessageLink_scheduleId_idx",
80
+ "columns": ["scheduleId"],
81
+ "isUnique": false
82
+ },
83
+ "ChannelMessageLink_scheduleRunId_idx": {
84
+ "name": "ChannelMessageLink_scheduleRunId_idx",
85
+ "columns": ["scheduleRunId"],
86
+ "isUnique": false
87
+ }
88
+ },
89
+ "foreignKeys": {
90
+ "ChannelMessageLink_scheduleId_Schedule_id_fk": {
91
+ "name": "ChannelMessageLink_scheduleId_Schedule_id_fk",
92
+ "tableFrom": "ChannelMessageLink",
93
+ "tableTo": "Schedule",
94
+ "columnsFrom": ["scheduleId"],
95
+ "columnsTo": ["id"],
96
+ "onDelete": "set null",
97
+ "onUpdate": "no action"
98
+ },
99
+ "ChannelMessageLink_scheduleRunId_ScheduleRun_id_fk": {
100
+ "name": "ChannelMessageLink_scheduleRunId_ScheduleRun_id_fk",
101
+ "tableFrom": "ChannelMessageLink",
102
+ "tableTo": "ScheduleRun",
103
+ "columnsFrom": ["scheduleRunId"],
104
+ "columnsTo": ["id"],
105
+ "onDelete": "set null",
106
+ "onUpdate": "no action"
107
+ }
108
+ },
109
+ "compositePrimaryKeys": {},
110
+ "uniqueConstraints": {},
111
+ "checkConstraints": {}
112
+ },
113
+ "Chat": {
114
+ "name": "Chat",
115
+ "columns": {
116
+ "id": {
117
+ "name": "id",
118
+ "type": "text",
119
+ "primaryKey": true,
120
+ "notNull": true,
121
+ "autoincrement": false
122
+ },
123
+ "platform": {
124
+ "name": "platform",
125
+ "type": "text",
126
+ "primaryKey": false,
127
+ "notNull": true,
128
+ "autoincrement": false
129
+ },
130
+ "platformChatId": {
131
+ "name": "platformChatId",
132
+ "type": "text",
133
+ "primaryKey": false,
134
+ "notNull": true,
135
+ "autoincrement": false
136
+ },
137
+ "type": {
138
+ "name": "type",
139
+ "type": "text",
140
+ "primaryKey": false,
141
+ "notNull": true,
142
+ "autoincrement": false
143
+ },
144
+ "title": {
145
+ "name": "title",
146
+ "type": "text",
147
+ "primaryKey": false,
148
+ "notNull": false,
149
+ "autoincrement": false
150
+ },
151
+ "alias": {
152
+ "name": "alias",
153
+ "type": "text",
154
+ "primaryKey": false,
155
+ "notNull": false,
156
+ "autoincrement": false
157
+ },
158
+ "isMain": {
159
+ "name": "isMain",
160
+ "type": "integer",
161
+ "primaryKey": false,
162
+ "notNull": true,
163
+ "autoincrement": false,
164
+ "default": false
165
+ },
166
+ "linkedAt": {
167
+ "name": "linkedAt",
168
+ "type": "integer",
169
+ "primaryKey": false,
170
+ "notNull": false,
171
+ "autoincrement": false
172
+ },
173
+ "createdAt": {
174
+ "name": "createdAt",
175
+ "type": "integer",
176
+ "primaryKey": false,
177
+ "notNull": true,
178
+ "autoincrement": false
179
+ },
180
+ "updatedAt": {
181
+ "name": "updatedAt",
182
+ "type": "integer",
183
+ "primaryKey": false,
184
+ "notNull": true,
185
+ "autoincrement": false
186
+ }
187
+ },
188
+ "indexes": {
189
+ "Chat_platform_platformChatId_key": {
190
+ "name": "Chat_platform_platformChatId_key",
191
+ "columns": ["platform", "platformChatId"],
192
+ "isUnique": true
193
+ },
194
+ "Chat_platform_alias_key": {
195
+ "name": "Chat_platform_alias_key",
196
+ "columns": ["platform", "alias"],
197
+ "isUnique": true
198
+ }
199
+ },
200
+ "foreignKeys": {},
201
+ "compositePrimaryKeys": {},
202
+ "uniqueConstraints": {},
203
+ "checkConstraints": {}
204
+ },
205
+ "HeartbeatRun": {
206
+ "name": "HeartbeatRun",
207
+ "columns": {
208
+ "id": {
209
+ "name": "id",
210
+ "type": "text",
211
+ "primaryKey": true,
212
+ "notNull": true,
213
+ "autoincrement": false
214
+ },
215
+ "startedAt": {
216
+ "name": "startedAt",
217
+ "type": "integer",
218
+ "primaryKey": false,
219
+ "notNull": true,
220
+ "autoincrement": false
221
+ },
222
+ "finishedAt": {
223
+ "name": "finishedAt",
224
+ "type": "integer",
225
+ "primaryKey": false,
226
+ "notNull": false,
227
+ "autoincrement": false
228
+ },
229
+ "outcome": {
230
+ "name": "outcome",
231
+ "type": "text",
232
+ "primaryKey": false,
233
+ "notNull": true,
234
+ "autoincrement": false
235
+ },
236
+ "summary": {
237
+ "name": "summary",
238
+ "type": "text",
239
+ "primaryKey": false,
240
+ "notNull": false,
241
+ "autoincrement": false
242
+ },
243
+ "error": {
244
+ "name": "error",
245
+ "type": "text",
246
+ "primaryKey": false,
247
+ "notNull": false,
248
+ "autoincrement": false
249
+ },
250
+ "createdAt": {
251
+ "name": "createdAt",
252
+ "type": "integer",
253
+ "primaryKey": false,
254
+ "notNull": true,
255
+ "autoincrement": false
256
+ }
257
+ },
258
+ "indexes": {
259
+ "HeartbeatRun_createdAt_idx": {
260
+ "name": "HeartbeatRun_createdAt_idx",
261
+ "columns": ["createdAt"],
262
+ "isUnique": false
263
+ }
264
+ },
265
+ "foreignKeys": {},
266
+ "compositePrimaryKeys": {},
267
+ "uniqueConstraints": {},
268
+ "checkConstraints": {}
269
+ },
270
+ "Message": {
271
+ "name": "Message",
272
+ "columns": {
273
+ "id": {
274
+ "name": "id",
275
+ "type": "text",
276
+ "primaryKey": true,
277
+ "notNull": true,
278
+ "autoincrement": false
279
+ },
280
+ "sessionId": {
281
+ "name": "sessionId",
282
+ "type": "text",
283
+ "primaryKey": false,
284
+ "notNull": true,
285
+ "autoincrement": false
286
+ },
287
+ "role": {
288
+ "name": "role",
289
+ "type": "text",
290
+ "primaryKey": false,
291
+ "notNull": true,
292
+ "autoincrement": false
293
+ },
294
+ "content": {
295
+ "name": "content",
296
+ "type": "text",
297
+ "primaryKey": false,
298
+ "notNull": true,
299
+ "autoincrement": false
300
+ },
301
+ "metadata": {
302
+ "name": "metadata",
303
+ "type": "text",
304
+ "primaryKey": false,
305
+ "notNull": false,
306
+ "autoincrement": false
307
+ },
308
+ "createdAt": {
309
+ "name": "createdAt",
310
+ "type": "integer",
311
+ "primaryKey": false,
312
+ "notNull": true,
313
+ "autoincrement": false
314
+ }
315
+ },
316
+ "indexes": {
317
+ "Message_sessionId_createdAt_idx": {
318
+ "name": "Message_sessionId_createdAt_idx",
319
+ "columns": ["sessionId", "createdAt"],
320
+ "isUnique": false
321
+ }
322
+ },
323
+ "foreignKeys": {
324
+ "Message_sessionId_Session_id_fk": {
325
+ "name": "Message_sessionId_Session_id_fk",
326
+ "tableFrom": "Message",
327
+ "tableTo": "Session",
328
+ "columnsFrom": ["sessionId"],
329
+ "columnsTo": ["id"],
330
+ "onDelete": "cascade",
331
+ "onUpdate": "no action"
332
+ }
333
+ },
334
+ "compositePrimaryKeys": {},
335
+ "uniqueConstraints": {},
336
+ "checkConstraints": {}
337
+ },
338
+ "ScheduleRun": {
339
+ "name": "ScheduleRun",
340
+ "columns": {
341
+ "id": {
342
+ "name": "id",
343
+ "type": "text",
344
+ "primaryKey": true,
345
+ "notNull": true,
346
+ "autoincrement": false
347
+ },
348
+ "scheduleId": {
349
+ "name": "scheduleId",
350
+ "type": "text",
351
+ "primaryKey": false,
352
+ "notNull": true,
353
+ "autoincrement": false
354
+ },
355
+ "scheduledFor": {
356
+ "name": "scheduledFor",
357
+ "type": "integer",
358
+ "primaryKey": false,
359
+ "notNull": true,
360
+ "autoincrement": false
361
+ },
362
+ "status": {
363
+ "name": "status",
364
+ "type": "text",
365
+ "primaryKey": false,
366
+ "notNull": true,
367
+ "autoincrement": false,
368
+ "default": "'pending'"
369
+ },
370
+ "attempt": {
371
+ "name": "attempt",
372
+ "type": "integer",
373
+ "primaryKey": false,
374
+ "notNull": true,
375
+ "autoincrement": false,
376
+ "default": 1
377
+ },
378
+ "sessionKey": {
379
+ "name": "sessionKey",
380
+ "type": "text",
381
+ "primaryKey": false,
382
+ "notNull": false,
383
+ "autoincrement": false
384
+ },
385
+ "assistantMessageId": {
386
+ "name": "assistantMessageId",
387
+ "type": "integer",
388
+ "primaryKey": false,
389
+ "notNull": false,
390
+ "autoincrement": false
391
+ },
392
+ "error": {
393
+ "name": "error",
394
+ "type": "text",
395
+ "primaryKey": false,
396
+ "notNull": false,
397
+ "autoincrement": false
398
+ },
399
+ "startedAt": {
400
+ "name": "startedAt",
401
+ "type": "integer",
402
+ "primaryKey": false,
403
+ "notNull": false,
404
+ "autoincrement": false
405
+ },
406
+ "finishedAt": {
407
+ "name": "finishedAt",
408
+ "type": "integer",
409
+ "primaryKey": false,
410
+ "notNull": false,
411
+ "autoincrement": false
412
+ },
413
+ "createdAt": {
414
+ "name": "createdAt",
415
+ "type": "integer",
416
+ "primaryKey": false,
417
+ "notNull": true,
418
+ "autoincrement": false
419
+ }
420
+ },
421
+ "indexes": {
422
+ "ScheduleRun_scheduleId_createdAt_idx": {
423
+ "name": "ScheduleRun_scheduleId_createdAt_idx",
424
+ "columns": ["scheduleId", "createdAt"],
425
+ "isUnique": false
426
+ },
427
+ "ScheduleRun_status_createdAt_idx": {
428
+ "name": "ScheduleRun_status_createdAt_idx",
429
+ "columns": ["status", "createdAt"],
430
+ "isUnique": false
431
+ },
432
+ "ScheduleRun_sessionKey_idx": {
433
+ "name": "ScheduleRun_sessionKey_idx",
434
+ "columns": ["sessionKey"],
435
+ "isUnique": false
436
+ }
437
+ },
438
+ "foreignKeys": {
439
+ "ScheduleRun_scheduleId_Schedule_id_fk": {
440
+ "name": "ScheduleRun_scheduleId_Schedule_id_fk",
441
+ "tableFrom": "ScheduleRun",
442
+ "tableTo": "Schedule",
443
+ "columnsFrom": ["scheduleId"],
444
+ "columnsTo": ["id"],
445
+ "onDelete": "cascade",
446
+ "onUpdate": "no action"
447
+ }
448
+ },
449
+ "compositePrimaryKeys": {},
450
+ "uniqueConstraints": {},
451
+ "checkConstraints": {}
452
+ },
453
+ "Schedule": {
454
+ "name": "Schedule",
455
+ "columns": {
456
+ "id": {
457
+ "name": "id",
458
+ "type": "text",
459
+ "primaryKey": true,
460
+ "notNull": true,
461
+ "autoincrement": false
462
+ },
463
+ "chatId": {
464
+ "name": "chatId",
465
+ "type": "integer",
466
+ "primaryKey": false,
467
+ "notNull": true,
468
+ "autoincrement": false
469
+ },
470
+ "createdByUserId": {
471
+ "name": "createdByUserId",
472
+ "type": "integer",
473
+ "primaryKey": false,
474
+ "notNull": true,
475
+ "autoincrement": false
476
+ },
477
+ "threadId": {
478
+ "name": "threadId",
479
+ "type": "integer",
480
+ "primaryKey": false,
481
+ "notNull": false,
482
+ "autoincrement": false
483
+ },
484
+ "directMessagesTopicId": {
485
+ "name": "directMessagesTopicId",
486
+ "type": "integer",
487
+ "primaryKey": false,
488
+ "notNull": false,
489
+ "autoincrement": false
490
+ },
491
+ "title": {
492
+ "name": "title",
493
+ "type": "text",
494
+ "primaryKey": false,
495
+ "notNull": false,
496
+ "autoincrement": false
497
+ },
498
+ "taskPrompt": {
499
+ "name": "taskPrompt",
500
+ "type": "text",
501
+ "primaryKey": false,
502
+ "notNull": true,
503
+ "autoincrement": false
504
+ },
505
+ "sourceText": {
506
+ "name": "sourceText",
507
+ "type": "text",
508
+ "primaryKey": false,
509
+ "notNull": true,
510
+ "autoincrement": false
511
+ },
512
+ "type": {
513
+ "name": "type",
514
+ "type": "text",
515
+ "primaryKey": false,
516
+ "notNull": true,
517
+ "autoincrement": false
518
+ },
519
+ "cronExpression": {
520
+ "name": "cronExpression",
521
+ "type": "text",
522
+ "primaryKey": false,
523
+ "notNull": false,
524
+ "autoincrement": false
525
+ },
526
+ "runAt": {
527
+ "name": "runAt",
528
+ "type": "integer",
529
+ "primaryKey": false,
530
+ "notNull": false,
531
+ "autoincrement": false
532
+ },
533
+ "timezone": {
534
+ "name": "timezone",
535
+ "type": "text",
536
+ "primaryKey": false,
537
+ "notNull": true,
538
+ "autoincrement": false
539
+ },
540
+ "status": {
541
+ "name": "status",
542
+ "type": "text",
543
+ "primaryKey": false,
544
+ "notNull": true,
545
+ "autoincrement": false,
546
+ "default": "'active'"
547
+ },
548
+ "nextRunAt": {
549
+ "name": "nextRunAt",
550
+ "type": "integer",
551
+ "primaryKey": false,
552
+ "notNull": false,
553
+ "autoincrement": false
554
+ },
555
+ "lastRunAt": {
556
+ "name": "lastRunAt",
557
+ "type": "integer",
558
+ "primaryKey": false,
559
+ "notNull": false,
560
+ "autoincrement": false
561
+ },
562
+ "createdAt": {
563
+ "name": "createdAt",
564
+ "type": "integer",
565
+ "primaryKey": false,
566
+ "notNull": true,
567
+ "autoincrement": false
568
+ },
569
+ "updatedAt": {
570
+ "name": "updatedAt",
571
+ "type": "integer",
572
+ "primaryKey": false,
573
+ "notNull": true,
574
+ "autoincrement": false
575
+ },
576
+ "targetChatRef": {
577
+ "name": "targetChatRef",
578
+ "type": "text",
579
+ "primaryKey": false,
580
+ "notNull": false,
581
+ "autoincrement": false
582
+ },
583
+ "canceledAt": {
584
+ "name": "canceledAt",
585
+ "type": "integer",
586
+ "primaryKey": false,
587
+ "notNull": false,
588
+ "autoincrement": false
589
+ }
590
+ },
591
+ "indexes": {
592
+ "Schedule_chatId_status_nextRunAt_idx": {
593
+ "name": "Schedule_chatId_status_nextRunAt_idx",
594
+ "columns": ["chatId", "status", "nextRunAt"],
595
+ "isUnique": false
596
+ }
597
+ },
598
+ "foreignKeys": {},
599
+ "compositePrimaryKeys": {},
600
+ "uniqueConstraints": {},
601
+ "checkConstraints": {}
602
+ },
603
+ "Session": {
604
+ "name": "Session",
605
+ "columns": {
606
+ "id": {
607
+ "name": "id",
608
+ "type": "text",
609
+ "primaryKey": true,
610
+ "notNull": true,
611
+ "autoincrement": false
612
+ },
613
+ "key": {
614
+ "name": "key",
615
+ "type": "text",
616
+ "primaryKey": false,
617
+ "notNull": true,
618
+ "autoincrement": false
619
+ },
620
+ "chatId": {
621
+ "name": "chatId",
622
+ "type": "integer",
623
+ "primaryKey": false,
624
+ "notNull": true,
625
+ "autoincrement": false
626
+ },
627
+ "threadId": {
628
+ "name": "threadId",
629
+ "type": "integer",
630
+ "primaryKey": false,
631
+ "notNull": false,
632
+ "autoincrement": false
633
+ },
634
+ "title": {
635
+ "name": "title",
636
+ "type": "text",
637
+ "primaryKey": false,
638
+ "notNull": false,
639
+ "autoincrement": false
640
+ },
641
+ "workingMemory": {
642
+ "name": "workingMemory",
643
+ "type": "text",
644
+ "primaryKey": false,
645
+ "notNull": false,
646
+ "autoincrement": false
647
+ },
648
+ "lastActivityAt": {
649
+ "name": "lastActivityAt",
650
+ "type": "integer",
651
+ "primaryKey": false,
652
+ "notNull": false,
653
+ "autoincrement": false
654
+ },
655
+ "memoriesLastExtractedAt": {
656
+ "name": "memoriesLastExtractedAt",
657
+ "type": "integer",
658
+ "primaryKey": false,
659
+ "notNull": false,
660
+ "autoincrement": false
661
+ },
662
+ "createdAt": {
663
+ "name": "createdAt",
664
+ "type": "integer",
665
+ "primaryKey": false,
666
+ "notNull": true,
667
+ "autoincrement": false
668
+ },
669
+ "updatedAt": {
670
+ "name": "updatedAt",
671
+ "type": "integer",
672
+ "primaryKey": false,
673
+ "notNull": true,
674
+ "autoincrement": false
675
+ }
676
+ },
677
+ "indexes": {
678
+ "Session_key_unique": {
679
+ "name": "Session_key_unique",
680
+ "columns": ["key"],
681
+ "isUnique": true
682
+ }
683
+ },
684
+ "foreignKeys": {},
685
+ "compositePrimaryKeys": {},
686
+ "uniqueConstraints": {},
687
+ "checkConstraints": {}
688
+ }
689
+ },
690
+ "views": {},
691
+ "enums": {},
692
+ "_meta": {
693
+ "schemas": {},
694
+ "tables": {},
695
+ "columns": {}
696
+ },
697
+ "internal": {
698
+ "indexes": {}
699
+ }
700
+ }