@elizaos/plugin-sql 1.0.7 → 1.0.9

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,1629 +0,0 @@
1
- {
2
- "id": "355d7152-120c-4cfc-8ec4-fad352811436",
3
- "prevId": "00000000-0000-0000-0000-000000000000",
4
- "version": "7",
5
- "dialect": "postgresql",
6
- "tables": {
7
- "public.agents": {
8
- "name": "agents",
9
- "schema": "",
10
- "columns": {
11
- "id": {
12
- "name": "id",
13
- "type": "uuid",
14
- "primaryKey": true,
15
- "notNull": true,
16
- "default": "gen_random_uuid()"
17
- },
18
- "enabled": {
19
- "name": "enabled",
20
- "type": "boolean",
21
- "primaryKey": false,
22
- "notNull": true,
23
- "default": true
24
- },
25
- "createdAt": {
26
- "name": "createdAt",
27
- "type": "timestamptz",
28
- "primaryKey": false,
29
- "notNull": true,
30
- "default": "now()"
31
- },
32
- "updatedAt": {
33
- "name": "updatedAt",
34
- "type": "timestamptz",
35
- "primaryKey": false,
36
- "notNull": true,
37
- "default": "now()"
38
- },
39
- "name": {
40
- "name": "name",
41
- "type": "text",
42
- "primaryKey": false,
43
- "notNull": true
44
- },
45
- "username": {
46
- "name": "username",
47
- "type": "text",
48
- "primaryKey": false,
49
- "notNull": false
50
- },
51
- "system": {
52
- "name": "system",
53
- "type": "text",
54
- "primaryKey": false,
55
- "notNull": false,
56
- "default": "''"
57
- },
58
- "bio": {
59
- "name": "bio",
60
- "type": "jsonb",
61
- "primaryKey": false,
62
- "notNull": false,
63
- "default": "'[]'::jsonb"
64
- },
65
- "message_examples": {
66
- "name": "message_examples",
67
- "type": "jsonb",
68
- "primaryKey": false,
69
- "notNull": true,
70
- "default": "'[]'::jsonb"
71
- },
72
- "post_examples": {
73
- "name": "post_examples",
74
- "type": "jsonb",
75
- "primaryKey": false,
76
- "notNull": true,
77
- "default": "'[]'::jsonb"
78
- },
79
- "topics": {
80
- "name": "topics",
81
- "type": "jsonb",
82
- "primaryKey": false,
83
- "notNull": true,
84
- "default": "'[]'::jsonb"
85
- },
86
- "adjectives": {
87
- "name": "adjectives",
88
- "type": "jsonb",
89
- "primaryKey": false,
90
- "notNull": true,
91
- "default": "'[]'::jsonb"
92
- },
93
- "knowledge": {
94
- "name": "knowledge",
95
- "type": "jsonb",
96
- "primaryKey": false,
97
- "notNull": true,
98
- "default": "'[]'::jsonb"
99
- },
100
- "plugins": {
101
- "name": "plugins",
102
- "type": "jsonb",
103
- "primaryKey": false,
104
- "notNull": true,
105
- "default": "'[]'::jsonb"
106
- },
107
- "settings": {
108
- "name": "settings",
109
- "type": "jsonb",
110
- "primaryKey": false,
111
- "notNull": true,
112
- "default": "'{}'::jsonb"
113
- },
114
- "style": {
115
- "name": "style",
116
- "type": "jsonb",
117
- "primaryKey": false,
118
- "notNull": true,
119
- "default": "'{}'::jsonb"
120
- }
121
- },
122
- "indexes": {},
123
- "foreignKeys": {},
124
- "compositePrimaryKeys": {},
125
- "uniqueConstraints": {
126
- "name_unique": {
127
- "name": "name_unique",
128
- "nullsNotDistinct": false,
129
- "columns": ["name"]
130
- }
131
- },
132
- "policies": {},
133
- "checkConstraints": {},
134
- "isRLSEnabled": false
135
- },
136
- "public.cache": {
137
- "name": "cache",
138
- "schema": "",
139
- "columns": {
140
- "id": {
141
- "name": "id",
142
- "type": "uuid",
143
- "primaryKey": true,
144
- "notNull": true,
145
- "default": "gen_random_uuid()"
146
- },
147
- "key": {
148
- "name": "key",
149
- "type": "text",
150
- "primaryKey": false,
151
- "notNull": true
152
- },
153
- "agentId": {
154
- "name": "agentId",
155
- "type": "uuid",
156
- "primaryKey": false,
157
- "notNull": true
158
- },
159
- "value": {
160
- "name": "value",
161
- "type": "jsonb",
162
- "primaryKey": false,
163
- "notNull": true
164
- },
165
- "createdAt": {
166
- "name": "createdAt",
167
- "type": "timestamptz",
168
- "primaryKey": false,
169
- "notNull": true,
170
- "default": "now()"
171
- },
172
- "expiresAt": {
173
- "name": "expiresAt",
174
- "type": "timestamptz",
175
- "primaryKey": false,
176
- "notNull": false
177
- }
178
- },
179
- "indexes": {},
180
- "foreignKeys": {
181
- "cache_agentId_agents_id_fk": {
182
- "name": "cache_agentId_agents_id_fk",
183
- "tableFrom": "cache",
184
- "tableTo": "agents",
185
- "columnsFrom": ["agentId"],
186
- "columnsTo": ["id"],
187
- "onDelete": "cascade",
188
- "onUpdate": "no action"
189
- }
190
- },
191
- "compositePrimaryKeys": {},
192
- "uniqueConstraints": {
193
- "cache_key_agent_unique": {
194
- "name": "cache_key_agent_unique",
195
- "nullsNotDistinct": false,
196
- "columns": ["key", "agentId"]
197
- }
198
- },
199
- "policies": {},
200
- "checkConstraints": {},
201
- "isRLSEnabled": false
202
- },
203
- "public.channel_participants": {
204
- "name": "channel_participants",
205
- "schema": "",
206
- "columns": {
207
- "channel_id": {
208
- "name": "channel_id",
209
- "type": "text",
210
- "primaryKey": false,
211
- "notNull": true
212
- },
213
- "user_id": {
214
- "name": "user_id",
215
- "type": "text",
216
- "primaryKey": false,
217
- "notNull": true
218
- }
219
- },
220
- "indexes": {},
221
- "foreignKeys": {
222
- "channel_participants_channel_id_channels_id_fk": {
223
- "name": "channel_participants_channel_id_channels_id_fk",
224
- "tableFrom": "channel_participants",
225
- "tableTo": "channels",
226
- "columnsFrom": ["channel_id"],
227
- "columnsTo": ["id"],
228
- "onDelete": "cascade",
229
- "onUpdate": "no action"
230
- }
231
- },
232
- "compositePrimaryKeys": {
233
- "channel_participants_channel_id_user_id_pk": {
234
- "name": "channel_participants_channel_id_user_id_pk",
235
- "columns": ["channel_id", "user_id"]
236
- }
237
- },
238
- "uniqueConstraints": {},
239
- "policies": {},
240
- "checkConstraints": {},
241
- "isRLSEnabled": false
242
- },
243
- "public.channels": {
244
- "name": "channels",
245
- "schema": "",
246
- "columns": {
247
- "id": {
248
- "name": "id",
249
- "type": "text",
250
- "primaryKey": true,
251
- "notNull": true
252
- },
253
- "server_id": {
254
- "name": "server_id",
255
- "type": "text",
256
- "primaryKey": false,
257
- "notNull": true
258
- },
259
- "name": {
260
- "name": "name",
261
- "type": "text",
262
- "primaryKey": false,
263
- "notNull": true
264
- },
265
- "type": {
266
- "name": "type",
267
- "type": "text",
268
- "primaryKey": false,
269
- "notNull": true
270
- },
271
- "source_type": {
272
- "name": "source_type",
273
- "type": "text",
274
- "primaryKey": false,
275
- "notNull": false
276
- },
277
- "source_id": {
278
- "name": "source_id",
279
- "type": "text",
280
- "primaryKey": false,
281
- "notNull": false
282
- },
283
- "topic": {
284
- "name": "topic",
285
- "type": "text",
286
- "primaryKey": false,
287
- "notNull": false
288
- },
289
- "metadata": {
290
- "name": "metadata",
291
- "type": "jsonb",
292
- "primaryKey": false,
293
- "notNull": false
294
- },
295
- "created_at": {
296
- "name": "created_at",
297
- "type": "timestamp",
298
- "primaryKey": false,
299
- "notNull": true,
300
- "default": "CURRENT_TIMESTAMP"
301
- },
302
- "updated_at": {
303
- "name": "updated_at",
304
- "type": "timestamp",
305
- "primaryKey": false,
306
- "notNull": true,
307
- "default": "CURRENT_TIMESTAMP"
308
- }
309
- },
310
- "indexes": {},
311
- "foreignKeys": {
312
- "channels_server_id_message_servers_id_fk": {
313
- "name": "channels_server_id_message_servers_id_fk",
314
- "tableFrom": "channels",
315
- "tableTo": "message_servers",
316
- "columnsFrom": ["server_id"],
317
- "columnsTo": ["id"],
318
- "onDelete": "cascade",
319
- "onUpdate": "no action"
320
- }
321
- },
322
- "compositePrimaryKeys": {},
323
- "uniqueConstraints": {},
324
- "policies": {},
325
- "checkConstraints": {},
326
- "isRLSEnabled": false
327
- },
328
- "public.components": {
329
- "name": "components",
330
- "schema": "",
331
- "columns": {
332
- "id": {
333
- "name": "id",
334
- "type": "uuid",
335
- "primaryKey": true,
336
- "notNull": true,
337
- "default": "gen_random_uuid()"
338
- },
339
- "entityId": {
340
- "name": "entityId",
341
- "type": "uuid",
342
- "primaryKey": false,
343
- "notNull": true
344
- },
345
- "agentId": {
346
- "name": "agentId",
347
- "type": "uuid",
348
- "primaryKey": false,
349
- "notNull": true
350
- },
351
- "roomId": {
352
- "name": "roomId",
353
- "type": "uuid",
354
- "primaryKey": false,
355
- "notNull": true
356
- },
357
- "worldId": {
358
- "name": "worldId",
359
- "type": "uuid",
360
- "primaryKey": false,
361
- "notNull": false
362
- },
363
- "sourceEntityId": {
364
- "name": "sourceEntityId",
365
- "type": "uuid",
366
- "primaryKey": false,
367
- "notNull": false
368
- },
369
- "type": {
370
- "name": "type",
371
- "type": "text",
372
- "primaryKey": false,
373
- "notNull": true
374
- },
375
- "data": {
376
- "name": "data",
377
- "type": "jsonb",
378
- "primaryKey": false,
379
- "notNull": false,
380
- "default": "'{}'::jsonb"
381
- },
382
- "createdAt": {
383
- "name": "createdAt",
384
- "type": "timestamptz",
385
- "primaryKey": false,
386
- "notNull": true,
387
- "default": "now()"
388
- }
389
- },
390
- "indexes": {},
391
- "foreignKeys": {
392
- "components_entityId_entities_id_fk": {
393
- "name": "components_entityId_entities_id_fk",
394
- "tableFrom": "components",
395
- "tableTo": "entities",
396
- "columnsFrom": ["entityId"],
397
- "columnsTo": ["id"],
398
- "onDelete": "cascade",
399
- "onUpdate": "no action"
400
- },
401
- "components_agentId_agents_id_fk": {
402
- "name": "components_agentId_agents_id_fk",
403
- "tableFrom": "components",
404
- "tableTo": "agents",
405
- "columnsFrom": ["agentId"],
406
- "columnsTo": ["id"],
407
- "onDelete": "cascade",
408
- "onUpdate": "no action"
409
- },
410
- "components_roomId_rooms_id_fk": {
411
- "name": "components_roomId_rooms_id_fk",
412
- "tableFrom": "components",
413
- "tableTo": "rooms",
414
- "columnsFrom": ["roomId"],
415
- "columnsTo": ["id"],
416
- "onDelete": "cascade",
417
- "onUpdate": "no action"
418
- },
419
- "components_worldId_worlds_id_fk": {
420
- "name": "components_worldId_worlds_id_fk",
421
- "tableFrom": "components",
422
- "tableTo": "worlds",
423
- "columnsFrom": ["worldId"],
424
- "columnsTo": ["id"],
425
- "onDelete": "cascade",
426
- "onUpdate": "no action"
427
- },
428
- "components_sourceEntityId_entities_id_fk": {
429
- "name": "components_sourceEntityId_entities_id_fk",
430
- "tableFrom": "components",
431
- "tableTo": "entities",
432
- "columnsFrom": ["sourceEntityId"],
433
- "columnsTo": ["id"],
434
- "onDelete": "cascade",
435
- "onUpdate": "no action"
436
- }
437
- },
438
- "compositePrimaryKeys": {},
439
- "uniqueConstraints": {},
440
- "policies": {},
441
- "checkConstraints": {},
442
- "isRLSEnabled": false
443
- },
444
- "public.embeddings": {
445
- "name": "embeddings",
446
- "schema": "",
447
- "columns": {
448
- "id": {
449
- "name": "id",
450
- "type": "uuid",
451
- "primaryKey": true,
452
- "notNull": true,
453
- "default": "gen_random_uuid()"
454
- },
455
- "memory_id": {
456
- "name": "memory_id",
457
- "type": "uuid",
458
- "primaryKey": false,
459
- "notNull": false
460
- },
461
- "created_at": {
462
- "name": "created_at",
463
- "type": "timestamptz",
464
- "primaryKey": false,
465
- "notNull": true,
466
- "default": "now()"
467
- },
468
- "dim_384": {
469
- "name": "dim_384",
470
- "type": "vector(384)",
471
- "primaryKey": false,
472
- "notNull": false
473
- },
474
- "dim_512": {
475
- "name": "dim_512",
476
- "type": "vector(512)",
477
- "primaryKey": false,
478
- "notNull": false
479
- },
480
- "dim_768": {
481
- "name": "dim_768",
482
- "type": "vector(768)",
483
- "primaryKey": false,
484
- "notNull": false
485
- },
486
- "dim_1024": {
487
- "name": "dim_1024",
488
- "type": "vector(1024)",
489
- "primaryKey": false,
490
- "notNull": false
491
- },
492
- "dim_1536": {
493
- "name": "dim_1536",
494
- "type": "vector(1536)",
495
- "primaryKey": false,
496
- "notNull": false
497
- },
498
- "dim_3072": {
499
- "name": "dim_3072",
500
- "type": "vector(3072)",
501
- "primaryKey": false,
502
- "notNull": false
503
- }
504
- },
505
- "indexes": {
506
- "idx_embedding_memory": {
507
- "name": "idx_embedding_memory",
508
- "columns": [
509
- {
510
- "expression": "memory_id",
511
- "isExpression": false,
512
- "asc": true,
513
- "nulls": "last"
514
- }
515
- ],
516
- "isUnique": false,
517
- "concurrently": false,
518
- "method": "btree",
519
- "with": {}
520
- }
521
- },
522
- "foreignKeys": {
523
- "embeddings_memory_id_memories_id_fk": {
524
- "name": "embeddings_memory_id_memories_id_fk",
525
- "tableFrom": "embeddings",
526
- "tableTo": "memories",
527
- "columnsFrom": ["memory_id"],
528
- "columnsTo": ["id"],
529
- "onDelete": "no action",
530
- "onUpdate": "no action"
531
- },
532
- "fk_embedding_memory": {
533
- "name": "fk_embedding_memory",
534
- "tableFrom": "embeddings",
535
- "tableTo": "memories",
536
- "columnsFrom": ["memory_id"],
537
- "columnsTo": ["id"],
538
- "onDelete": "cascade",
539
- "onUpdate": "no action"
540
- }
541
- },
542
- "compositePrimaryKeys": {},
543
- "uniqueConstraints": {},
544
- "policies": {},
545
- "checkConstraints": {
546
- "embedding_source_check": {
547
- "name": "embedding_source_check",
548
- "value": "\"memory_id\" IS NOT NULL"
549
- }
550
- },
551
- "isRLSEnabled": false
552
- },
553
- "public.entities": {
554
- "name": "entities",
555
- "schema": "",
556
- "columns": {
557
- "id": {
558
- "name": "id",
559
- "type": "uuid",
560
- "primaryKey": true,
561
- "notNull": true
562
- },
563
- "agentId": {
564
- "name": "agentId",
565
- "type": "uuid",
566
- "primaryKey": false,
567
- "notNull": true
568
- },
569
- "createdAt": {
570
- "name": "createdAt",
571
- "type": "timestamptz",
572
- "primaryKey": false,
573
- "notNull": true,
574
- "default": "now()"
575
- },
576
- "names": {
577
- "name": "names",
578
- "type": "text[]",
579
- "primaryKey": false,
580
- "notNull": true,
581
- "default": "'{}'::text[]"
582
- },
583
- "metadata": {
584
- "name": "metadata",
585
- "type": "jsonb",
586
- "primaryKey": false,
587
- "notNull": true,
588
- "default": "'{}'::jsonb"
589
- }
590
- },
591
- "indexes": {},
592
- "foreignKeys": {
593
- "entities_agentId_agents_id_fk": {
594
- "name": "entities_agentId_agents_id_fk",
595
- "tableFrom": "entities",
596
- "tableTo": "agents",
597
- "columnsFrom": ["agentId"],
598
- "columnsTo": ["id"],
599
- "onDelete": "cascade",
600
- "onUpdate": "no action"
601
- }
602
- },
603
- "compositePrimaryKeys": {},
604
- "uniqueConstraints": {
605
- "id_agent_id_unique": {
606
- "name": "id_agent_id_unique",
607
- "nullsNotDistinct": false,
608
- "columns": ["id", "agentId"]
609
- }
610
- },
611
- "policies": {},
612
- "checkConstraints": {},
613
- "isRLSEnabled": false
614
- },
615
- "public.logs": {
616
- "name": "logs",
617
- "schema": "",
618
- "columns": {
619
- "id": {
620
- "name": "id",
621
- "type": "uuid",
622
- "primaryKey": false,
623
- "notNull": true,
624
- "default": "gen_random_uuid()"
625
- },
626
- "createdAt": {
627
- "name": "createdAt",
628
- "type": "timestamptz",
629
- "primaryKey": false,
630
- "notNull": true,
631
- "default": "now()"
632
- },
633
- "entityId": {
634
- "name": "entityId",
635
- "type": "uuid",
636
- "primaryKey": false,
637
- "notNull": true
638
- },
639
- "body": {
640
- "name": "body",
641
- "type": "jsonb",
642
- "primaryKey": false,
643
- "notNull": true
644
- },
645
- "type": {
646
- "name": "type",
647
- "type": "text",
648
- "primaryKey": false,
649
- "notNull": true
650
- },
651
- "roomId": {
652
- "name": "roomId",
653
- "type": "uuid",
654
- "primaryKey": false,
655
- "notNull": true
656
- }
657
- },
658
- "indexes": {},
659
- "foreignKeys": {
660
- "logs_entityId_entities_id_fk": {
661
- "name": "logs_entityId_entities_id_fk",
662
- "tableFrom": "logs",
663
- "tableTo": "entities",
664
- "columnsFrom": ["entityId"],
665
- "columnsTo": ["id"],
666
- "onDelete": "no action",
667
- "onUpdate": "no action"
668
- },
669
- "logs_roomId_rooms_id_fk": {
670
- "name": "logs_roomId_rooms_id_fk",
671
- "tableFrom": "logs",
672
- "tableTo": "rooms",
673
- "columnsFrom": ["roomId"],
674
- "columnsTo": ["id"],
675
- "onDelete": "cascade",
676
- "onUpdate": "no action"
677
- },
678
- "fk_room": {
679
- "name": "fk_room",
680
- "tableFrom": "logs",
681
- "tableTo": "rooms",
682
- "columnsFrom": ["roomId"],
683
- "columnsTo": ["id"],
684
- "onDelete": "cascade",
685
- "onUpdate": "no action"
686
- },
687
- "fk_user": {
688
- "name": "fk_user",
689
- "tableFrom": "logs",
690
- "tableTo": "entities",
691
- "columnsFrom": ["entityId"],
692
- "columnsTo": ["id"],
693
- "onDelete": "cascade",
694
- "onUpdate": "no action"
695
- }
696
- },
697
- "compositePrimaryKeys": {},
698
- "uniqueConstraints": {},
699
- "policies": {},
700
- "checkConstraints": {},
701
- "isRLSEnabled": false
702
- },
703
- "public.memories": {
704
- "name": "memories",
705
- "schema": "",
706
- "columns": {
707
- "id": {
708
- "name": "id",
709
- "type": "uuid",
710
- "primaryKey": true,
711
- "notNull": true
712
- },
713
- "type": {
714
- "name": "type",
715
- "type": "text",
716
- "primaryKey": false,
717
- "notNull": true
718
- },
719
- "createdAt": {
720
- "name": "createdAt",
721
- "type": "timestamptz",
722
- "primaryKey": false,
723
- "notNull": true,
724
- "default": "now()"
725
- },
726
- "content": {
727
- "name": "content",
728
- "type": "jsonb",
729
- "primaryKey": false,
730
- "notNull": true
731
- },
732
- "entityId": {
733
- "name": "entityId",
734
- "type": "uuid",
735
- "primaryKey": false,
736
- "notNull": false
737
- },
738
- "agentId": {
739
- "name": "agentId",
740
- "type": "uuid",
741
- "primaryKey": false,
742
- "notNull": true
743
- },
744
- "roomId": {
745
- "name": "roomId",
746
- "type": "uuid",
747
- "primaryKey": false,
748
- "notNull": false
749
- },
750
- "worldId": {
751
- "name": "worldId",
752
- "type": "uuid",
753
- "primaryKey": false,
754
- "notNull": false
755
- },
756
- "unique": {
757
- "name": "unique",
758
- "type": "boolean",
759
- "primaryKey": false,
760
- "notNull": true,
761
- "default": true
762
- },
763
- "metadata": {
764
- "name": "metadata",
765
- "type": "jsonb",
766
- "primaryKey": false,
767
- "notNull": true,
768
- "default": "'{}'::jsonb"
769
- }
770
- },
771
- "indexes": {
772
- "idx_memories_type_room": {
773
- "name": "idx_memories_type_room",
774
- "columns": [
775
- {
776
- "expression": "type",
777
- "isExpression": false,
778
- "asc": true,
779
- "nulls": "last"
780
- },
781
- {
782
- "expression": "roomId",
783
- "isExpression": false,
784
- "asc": true,
785
- "nulls": "last"
786
- }
787
- ],
788
- "isUnique": false,
789
- "concurrently": false,
790
- "method": "btree",
791
- "with": {}
792
- },
793
- "idx_memories_world_id": {
794
- "name": "idx_memories_world_id",
795
- "columns": [
796
- {
797
- "expression": "worldId",
798
- "isExpression": false,
799
- "asc": true,
800
- "nulls": "last"
801
- }
802
- ],
803
- "isUnique": false,
804
- "concurrently": false,
805
- "method": "btree",
806
- "with": {}
807
- },
808
- "idx_memories_metadata_type": {
809
- "name": "idx_memories_metadata_type",
810
- "columns": [
811
- {
812
- "expression": "((metadata->>'type'))",
813
- "asc": true,
814
- "isExpression": true,
815
- "nulls": "last"
816
- }
817
- ],
818
- "isUnique": false,
819
- "concurrently": false,
820
- "method": "btree",
821
- "with": {}
822
- },
823
- "idx_memories_document_id": {
824
- "name": "idx_memories_document_id",
825
- "columns": [
826
- {
827
- "expression": "((metadata->>'documentId'))",
828
- "asc": true,
829
- "isExpression": true,
830
- "nulls": "last"
831
- }
832
- ],
833
- "isUnique": false,
834
- "concurrently": false,
835
- "method": "btree",
836
- "with": {}
837
- },
838
- "idx_fragments_order": {
839
- "name": "idx_fragments_order",
840
- "columns": [
841
- {
842
- "expression": "((metadata->>'documentId'))",
843
- "asc": true,
844
- "isExpression": true,
845
- "nulls": "last"
846
- },
847
- {
848
- "expression": "((metadata->>'position'))",
849
- "asc": true,
850
- "isExpression": true,
851
- "nulls": "last"
852
- }
853
- ],
854
- "isUnique": false,
855
- "concurrently": false,
856
- "method": "btree",
857
- "with": {}
858
- }
859
- },
860
- "foreignKeys": {
861
- "memories_entityId_entities_id_fk": {
862
- "name": "memories_entityId_entities_id_fk",
863
- "tableFrom": "memories",
864
- "tableTo": "entities",
865
- "columnsFrom": ["entityId"],
866
- "columnsTo": ["id"],
867
- "onDelete": "cascade",
868
- "onUpdate": "no action"
869
- },
870
- "memories_agentId_agents_id_fk": {
871
- "name": "memories_agentId_agents_id_fk",
872
- "tableFrom": "memories",
873
- "tableTo": "agents",
874
- "columnsFrom": ["agentId"],
875
- "columnsTo": ["id"],
876
- "onDelete": "cascade",
877
- "onUpdate": "no action"
878
- },
879
- "memories_roomId_rooms_id_fk": {
880
- "name": "memories_roomId_rooms_id_fk",
881
- "tableFrom": "memories",
882
- "tableTo": "rooms",
883
- "columnsFrom": ["roomId"],
884
- "columnsTo": ["id"],
885
- "onDelete": "cascade",
886
- "onUpdate": "no action"
887
- },
888
- "fk_room": {
889
- "name": "fk_room",
890
- "tableFrom": "memories",
891
- "tableTo": "rooms",
892
- "columnsFrom": ["roomId"],
893
- "columnsTo": ["id"],
894
- "onDelete": "cascade",
895
- "onUpdate": "no action"
896
- },
897
- "fk_user": {
898
- "name": "fk_user",
899
- "tableFrom": "memories",
900
- "tableTo": "entities",
901
- "columnsFrom": ["entityId"],
902
- "columnsTo": ["id"],
903
- "onDelete": "cascade",
904
- "onUpdate": "no action"
905
- },
906
- "fk_agent": {
907
- "name": "fk_agent",
908
- "tableFrom": "memories",
909
- "tableTo": "agents",
910
- "columnsFrom": ["agentId"],
911
- "columnsTo": ["id"],
912
- "onDelete": "cascade",
913
- "onUpdate": "no action"
914
- }
915
- },
916
- "compositePrimaryKeys": {},
917
- "uniqueConstraints": {},
918
- "policies": {},
919
- "checkConstraints": {
920
- "fragment_metadata_check": {
921
- "name": "fragment_metadata_check",
922
- "value": "\n CASE \n WHEN metadata->>'type' = 'fragment' THEN\n metadata ? 'documentId' AND \n metadata ? 'position'\n ELSE true\n END\n "
923
- },
924
- "document_metadata_check": {
925
- "name": "document_metadata_check",
926
- "value": "\n CASE \n WHEN metadata->>'type' = 'document' THEN\n metadata ? 'timestamp'\n ELSE true\n END\n "
927
- }
928
- },
929
- "isRLSEnabled": false
930
- },
931
- "public.message_servers": {
932
- "name": "message_servers",
933
- "schema": "",
934
- "columns": {
935
- "id": {
936
- "name": "id",
937
- "type": "text",
938
- "primaryKey": true,
939
- "notNull": true
940
- },
941
- "name": {
942
- "name": "name",
943
- "type": "text",
944
- "primaryKey": false,
945
- "notNull": true
946
- },
947
- "source_type": {
948
- "name": "source_type",
949
- "type": "text",
950
- "primaryKey": false,
951
- "notNull": true
952
- },
953
- "source_id": {
954
- "name": "source_id",
955
- "type": "text",
956
- "primaryKey": false,
957
- "notNull": false
958
- },
959
- "metadata": {
960
- "name": "metadata",
961
- "type": "jsonb",
962
- "primaryKey": false,
963
- "notNull": false
964
- },
965
- "created_at": {
966
- "name": "created_at",
967
- "type": "timestamp",
968
- "primaryKey": false,
969
- "notNull": true,
970
- "default": "CURRENT_TIMESTAMP"
971
- },
972
- "updated_at": {
973
- "name": "updated_at",
974
- "type": "timestamp",
975
- "primaryKey": false,
976
- "notNull": true,
977
- "default": "CURRENT_TIMESTAMP"
978
- }
979
- },
980
- "indexes": {},
981
- "foreignKeys": {},
982
- "compositePrimaryKeys": {},
983
- "uniqueConstraints": {},
984
- "policies": {},
985
- "checkConstraints": {},
986
- "isRLSEnabled": false
987
- },
988
- "public.central_messages": {
989
- "name": "central_messages",
990
- "schema": "",
991
- "columns": {
992
- "id": {
993
- "name": "id",
994
- "type": "text",
995
- "primaryKey": true,
996
- "notNull": true
997
- },
998
- "channel_id": {
999
- "name": "channel_id",
1000
- "type": "text",
1001
- "primaryKey": false,
1002
- "notNull": true
1003
- },
1004
- "author_id": {
1005
- "name": "author_id",
1006
- "type": "text",
1007
- "primaryKey": false,
1008
- "notNull": true
1009
- },
1010
- "content": {
1011
- "name": "content",
1012
- "type": "text",
1013
- "primaryKey": false,
1014
- "notNull": true
1015
- },
1016
- "raw_message": {
1017
- "name": "raw_message",
1018
- "type": "jsonb",
1019
- "primaryKey": false,
1020
- "notNull": false
1021
- },
1022
- "in_reply_to_root_message_id": {
1023
- "name": "in_reply_to_root_message_id",
1024
- "type": "text",
1025
- "primaryKey": false,
1026
- "notNull": false
1027
- },
1028
- "source_type": {
1029
- "name": "source_type",
1030
- "type": "text",
1031
- "primaryKey": false,
1032
- "notNull": false
1033
- },
1034
- "source_id": {
1035
- "name": "source_id",
1036
- "type": "text",
1037
- "primaryKey": false,
1038
- "notNull": false
1039
- },
1040
- "metadata": {
1041
- "name": "metadata",
1042
- "type": "jsonb",
1043
- "primaryKey": false,
1044
- "notNull": false
1045
- },
1046
- "created_at": {
1047
- "name": "created_at",
1048
- "type": "timestamp",
1049
- "primaryKey": false,
1050
- "notNull": true,
1051
- "default": "CURRENT_TIMESTAMP"
1052
- },
1053
- "updated_at": {
1054
- "name": "updated_at",
1055
- "type": "timestamp",
1056
- "primaryKey": false,
1057
- "notNull": true,
1058
- "default": "CURRENT_TIMESTAMP"
1059
- }
1060
- },
1061
- "indexes": {},
1062
- "foreignKeys": {
1063
- "central_messages_channel_id_channels_id_fk": {
1064
- "name": "central_messages_channel_id_channels_id_fk",
1065
- "tableFrom": "central_messages",
1066
- "tableTo": "channels",
1067
- "columnsFrom": ["channel_id"],
1068
- "columnsTo": ["id"],
1069
- "onDelete": "cascade",
1070
- "onUpdate": "no action"
1071
- },
1072
- "central_messages_in_reply_to_root_message_id_central_messages_id_fk": {
1073
- "name": "central_messages_in_reply_to_root_message_id_central_messages_id_fk",
1074
- "tableFrom": "central_messages",
1075
- "tableTo": "central_messages",
1076
- "columnsFrom": ["in_reply_to_root_message_id"],
1077
- "columnsTo": ["id"],
1078
- "onDelete": "set null",
1079
- "onUpdate": "no action"
1080
- }
1081
- },
1082
- "compositePrimaryKeys": {},
1083
- "uniqueConstraints": {},
1084
- "policies": {},
1085
- "checkConstraints": {},
1086
- "isRLSEnabled": false
1087
- },
1088
- "public.participants": {
1089
- "name": "participants",
1090
- "schema": "",
1091
- "columns": {
1092
- "id": {
1093
- "name": "id",
1094
- "type": "uuid",
1095
- "primaryKey": true,
1096
- "notNull": true,
1097
- "default": "gen_random_uuid()"
1098
- },
1099
- "createdAt": {
1100
- "name": "createdAt",
1101
- "type": "timestamptz",
1102
- "primaryKey": false,
1103
- "notNull": true,
1104
- "default": "now()"
1105
- },
1106
- "entityId": {
1107
- "name": "entityId",
1108
- "type": "uuid",
1109
- "primaryKey": false,
1110
- "notNull": false
1111
- },
1112
- "roomId": {
1113
- "name": "roomId",
1114
- "type": "uuid",
1115
- "primaryKey": false,
1116
- "notNull": false
1117
- },
1118
- "agentId": {
1119
- "name": "agentId",
1120
- "type": "uuid",
1121
- "primaryKey": false,
1122
- "notNull": false
1123
- },
1124
- "roomState": {
1125
- "name": "roomState",
1126
- "type": "text",
1127
- "primaryKey": false,
1128
- "notNull": false
1129
- }
1130
- },
1131
- "indexes": {
1132
- "idx_participants_user": {
1133
- "name": "idx_participants_user",
1134
- "columns": [
1135
- {
1136
- "expression": "entityId",
1137
- "isExpression": false,
1138
- "asc": true,
1139
- "nulls": "last"
1140
- }
1141
- ],
1142
- "isUnique": false,
1143
- "concurrently": false,
1144
- "method": "btree",
1145
- "with": {}
1146
- },
1147
- "idx_participants_room": {
1148
- "name": "idx_participants_room",
1149
- "columns": [
1150
- {
1151
- "expression": "roomId",
1152
- "isExpression": false,
1153
- "asc": true,
1154
- "nulls": "last"
1155
- }
1156
- ],
1157
- "isUnique": false,
1158
- "concurrently": false,
1159
- "method": "btree",
1160
- "with": {}
1161
- }
1162
- },
1163
- "foreignKeys": {
1164
- "participants_entityId_entities_id_fk": {
1165
- "name": "participants_entityId_entities_id_fk",
1166
- "tableFrom": "participants",
1167
- "tableTo": "entities",
1168
- "columnsFrom": ["entityId"],
1169
- "columnsTo": ["id"],
1170
- "onDelete": "cascade",
1171
- "onUpdate": "no action"
1172
- },
1173
- "participants_roomId_rooms_id_fk": {
1174
- "name": "participants_roomId_rooms_id_fk",
1175
- "tableFrom": "participants",
1176
- "tableTo": "rooms",
1177
- "columnsFrom": ["roomId"],
1178
- "columnsTo": ["id"],
1179
- "onDelete": "cascade",
1180
- "onUpdate": "no action"
1181
- },
1182
- "participants_agentId_agents_id_fk": {
1183
- "name": "participants_agentId_agents_id_fk",
1184
- "tableFrom": "participants",
1185
- "tableTo": "agents",
1186
- "columnsFrom": ["agentId"],
1187
- "columnsTo": ["id"],
1188
- "onDelete": "cascade",
1189
- "onUpdate": "no action"
1190
- },
1191
- "fk_room": {
1192
- "name": "fk_room",
1193
- "tableFrom": "participants",
1194
- "tableTo": "rooms",
1195
- "columnsFrom": ["roomId"],
1196
- "columnsTo": ["id"],
1197
- "onDelete": "cascade",
1198
- "onUpdate": "no action"
1199
- },
1200
- "fk_user": {
1201
- "name": "fk_user",
1202
- "tableFrom": "participants",
1203
- "tableTo": "entities",
1204
- "columnsFrom": ["entityId"],
1205
- "columnsTo": ["id"],
1206
- "onDelete": "cascade",
1207
- "onUpdate": "no action"
1208
- }
1209
- },
1210
- "compositePrimaryKeys": {},
1211
- "uniqueConstraints": {},
1212
- "policies": {},
1213
- "checkConstraints": {},
1214
- "isRLSEnabled": false
1215
- },
1216
- "public.relationships": {
1217
- "name": "relationships",
1218
- "schema": "",
1219
- "columns": {
1220
- "id": {
1221
- "name": "id",
1222
- "type": "uuid",
1223
- "primaryKey": true,
1224
- "notNull": true,
1225
- "default": "gen_random_uuid()"
1226
- },
1227
- "createdAt": {
1228
- "name": "createdAt",
1229
- "type": "timestamptz",
1230
- "primaryKey": false,
1231
- "notNull": true,
1232
- "default": "now()"
1233
- },
1234
- "sourceEntityId": {
1235
- "name": "sourceEntityId",
1236
- "type": "uuid",
1237
- "primaryKey": false,
1238
- "notNull": true
1239
- },
1240
- "targetEntityId": {
1241
- "name": "targetEntityId",
1242
- "type": "uuid",
1243
- "primaryKey": false,
1244
- "notNull": true
1245
- },
1246
- "agentId": {
1247
- "name": "agentId",
1248
- "type": "uuid",
1249
- "primaryKey": false,
1250
- "notNull": true
1251
- },
1252
- "tags": {
1253
- "name": "tags",
1254
- "type": "text[]",
1255
- "primaryKey": false,
1256
- "notNull": false
1257
- },
1258
- "metadata": {
1259
- "name": "metadata",
1260
- "type": "jsonb",
1261
- "primaryKey": false,
1262
- "notNull": false
1263
- }
1264
- },
1265
- "indexes": {
1266
- "idx_relationships_users": {
1267
- "name": "idx_relationships_users",
1268
- "columns": [
1269
- {
1270
- "expression": "sourceEntityId",
1271
- "isExpression": false,
1272
- "asc": true,
1273
- "nulls": "last"
1274
- },
1275
- {
1276
- "expression": "targetEntityId",
1277
- "isExpression": false,
1278
- "asc": true,
1279
- "nulls": "last"
1280
- }
1281
- ],
1282
- "isUnique": false,
1283
- "concurrently": false,
1284
- "method": "btree",
1285
- "with": {}
1286
- }
1287
- },
1288
- "foreignKeys": {
1289
- "relationships_sourceEntityId_entities_id_fk": {
1290
- "name": "relationships_sourceEntityId_entities_id_fk",
1291
- "tableFrom": "relationships",
1292
- "tableTo": "entities",
1293
- "columnsFrom": ["sourceEntityId"],
1294
- "columnsTo": ["id"],
1295
- "onDelete": "cascade",
1296
- "onUpdate": "no action"
1297
- },
1298
- "relationships_targetEntityId_entities_id_fk": {
1299
- "name": "relationships_targetEntityId_entities_id_fk",
1300
- "tableFrom": "relationships",
1301
- "tableTo": "entities",
1302
- "columnsFrom": ["targetEntityId"],
1303
- "columnsTo": ["id"],
1304
- "onDelete": "cascade",
1305
- "onUpdate": "no action"
1306
- },
1307
- "relationships_agentId_agents_id_fk": {
1308
- "name": "relationships_agentId_agents_id_fk",
1309
- "tableFrom": "relationships",
1310
- "tableTo": "agents",
1311
- "columnsFrom": ["agentId"],
1312
- "columnsTo": ["id"],
1313
- "onDelete": "cascade",
1314
- "onUpdate": "no action"
1315
- },
1316
- "fk_user_a": {
1317
- "name": "fk_user_a",
1318
- "tableFrom": "relationships",
1319
- "tableTo": "entities",
1320
- "columnsFrom": ["sourceEntityId"],
1321
- "columnsTo": ["id"],
1322
- "onDelete": "cascade",
1323
- "onUpdate": "no action"
1324
- },
1325
- "fk_user_b": {
1326
- "name": "fk_user_b",
1327
- "tableFrom": "relationships",
1328
- "tableTo": "entities",
1329
- "columnsFrom": ["targetEntityId"],
1330
- "columnsTo": ["id"],
1331
- "onDelete": "cascade",
1332
- "onUpdate": "no action"
1333
- }
1334
- },
1335
- "compositePrimaryKeys": {},
1336
- "uniqueConstraints": {
1337
- "unique_relationship": {
1338
- "name": "unique_relationship",
1339
- "nullsNotDistinct": false,
1340
- "columns": ["sourceEntityId", "targetEntityId", "agentId"]
1341
- }
1342
- },
1343
- "policies": {},
1344
- "checkConstraints": {},
1345
- "isRLSEnabled": false
1346
- },
1347
- "public.rooms": {
1348
- "name": "rooms",
1349
- "schema": "",
1350
- "columns": {
1351
- "id": {
1352
- "name": "id",
1353
- "type": "uuid",
1354
- "primaryKey": true,
1355
- "notNull": true,
1356
- "default": "gen_random_uuid()"
1357
- },
1358
- "agentId": {
1359
- "name": "agentId",
1360
- "type": "uuid",
1361
- "primaryKey": false,
1362
- "notNull": false
1363
- },
1364
- "source": {
1365
- "name": "source",
1366
- "type": "text",
1367
- "primaryKey": false,
1368
- "notNull": true
1369
- },
1370
- "type": {
1371
- "name": "type",
1372
- "type": "text",
1373
- "primaryKey": false,
1374
- "notNull": true
1375
- },
1376
- "serverId": {
1377
- "name": "serverId",
1378
- "type": "text",
1379
- "primaryKey": false,
1380
- "notNull": false
1381
- },
1382
- "worldId": {
1383
- "name": "worldId",
1384
- "type": "uuid",
1385
- "primaryKey": false,
1386
- "notNull": false
1387
- },
1388
- "name": {
1389
- "name": "name",
1390
- "type": "text",
1391
- "primaryKey": false,
1392
- "notNull": false
1393
- },
1394
- "metadata": {
1395
- "name": "metadata",
1396
- "type": "jsonb",
1397
- "primaryKey": false,
1398
- "notNull": false
1399
- },
1400
- "channelId": {
1401
- "name": "channelId",
1402
- "type": "text",
1403
- "primaryKey": false,
1404
- "notNull": false
1405
- },
1406
- "createdAt": {
1407
- "name": "createdAt",
1408
- "type": "timestamptz",
1409
- "primaryKey": false,
1410
- "notNull": true,
1411
- "default": "now()"
1412
- }
1413
- },
1414
- "indexes": {},
1415
- "foreignKeys": {
1416
- "rooms_agentId_agents_id_fk": {
1417
- "name": "rooms_agentId_agents_id_fk",
1418
- "tableFrom": "rooms",
1419
- "tableTo": "agents",
1420
- "columnsFrom": ["agentId"],
1421
- "columnsTo": ["id"],
1422
- "onDelete": "cascade",
1423
- "onUpdate": "no action"
1424
- }
1425
- },
1426
- "compositePrimaryKeys": {},
1427
- "uniqueConstraints": {},
1428
- "policies": {},
1429
- "checkConstraints": {},
1430
- "isRLSEnabled": false
1431
- },
1432
- "public.server_agents": {
1433
- "name": "server_agents",
1434
- "schema": "",
1435
- "columns": {
1436
- "server_id": {
1437
- "name": "server_id",
1438
- "type": "text",
1439
- "primaryKey": false,
1440
- "notNull": true
1441
- },
1442
- "agent_id": {
1443
- "name": "agent_id",
1444
- "type": "text",
1445
- "primaryKey": false,
1446
- "notNull": true
1447
- }
1448
- },
1449
- "indexes": {},
1450
- "foreignKeys": {
1451
- "server_agents_server_id_message_servers_id_fk": {
1452
- "name": "server_agents_server_id_message_servers_id_fk",
1453
- "tableFrom": "server_agents",
1454
- "tableTo": "message_servers",
1455
- "columnsFrom": ["server_id"],
1456
- "columnsTo": ["id"],
1457
- "onDelete": "cascade",
1458
- "onUpdate": "no action"
1459
- }
1460
- },
1461
- "compositePrimaryKeys": {
1462
- "server_agents_server_id_agent_id_pk": {
1463
- "name": "server_agents_server_id_agent_id_pk",
1464
- "columns": ["server_id", "agent_id"]
1465
- }
1466
- },
1467
- "uniqueConstraints": {},
1468
- "policies": {},
1469
- "checkConstraints": {},
1470
- "isRLSEnabled": false
1471
- },
1472
- "public.tasks": {
1473
- "name": "tasks",
1474
- "schema": "",
1475
- "columns": {
1476
- "id": {
1477
- "name": "id",
1478
- "type": "uuid",
1479
- "primaryKey": true,
1480
- "notNull": true,
1481
- "default": "gen_random_uuid()"
1482
- },
1483
- "name": {
1484
- "name": "name",
1485
- "type": "text",
1486
- "primaryKey": false,
1487
- "notNull": true
1488
- },
1489
- "description": {
1490
- "name": "description",
1491
- "type": "text",
1492
- "primaryKey": false,
1493
- "notNull": false
1494
- },
1495
- "roomId": {
1496
- "name": "roomId",
1497
- "type": "uuid",
1498
- "primaryKey": false,
1499
- "notNull": false
1500
- },
1501
- "worldId": {
1502
- "name": "worldId",
1503
- "type": "uuid",
1504
- "primaryKey": false,
1505
- "notNull": false
1506
- },
1507
- "entityId": {
1508
- "name": "entityId",
1509
- "type": "uuid",
1510
- "primaryKey": false,
1511
- "notNull": false
1512
- },
1513
- "agent_id": {
1514
- "name": "agent_id",
1515
- "type": "uuid",
1516
- "primaryKey": false,
1517
- "notNull": true
1518
- },
1519
- "tags": {
1520
- "name": "tags",
1521
- "type": "text[]",
1522
- "primaryKey": false,
1523
- "notNull": false,
1524
- "default": "'{}'::text[]"
1525
- },
1526
- "metadata": {
1527
- "name": "metadata",
1528
- "type": "jsonb",
1529
- "primaryKey": false,
1530
- "notNull": false,
1531
- "default": "'{}'::jsonb"
1532
- },
1533
- "created_at": {
1534
- "name": "created_at",
1535
- "type": "timestamp with time zone",
1536
- "primaryKey": false,
1537
- "notNull": false,
1538
- "default": "now()"
1539
- },
1540
- "updated_at": {
1541
- "name": "updated_at",
1542
- "type": "timestamp with time zone",
1543
- "primaryKey": false,
1544
- "notNull": false,
1545
- "default": "now()"
1546
- }
1547
- },
1548
- "indexes": {},
1549
- "foreignKeys": {},
1550
- "compositePrimaryKeys": {},
1551
- "uniqueConstraints": {},
1552
- "policies": {},
1553
- "checkConstraints": {},
1554
- "isRLSEnabled": false
1555
- },
1556
- "public.worlds": {
1557
- "name": "worlds",
1558
- "schema": "",
1559
- "columns": {
1560
- "id": {
1561
- "name": "id",
1562
- "type": "uuid",
1563
- "primaryKey": true,
1564
- "notNull": true,
1565
- "default": "gen_random_uuid()"
1566
- },
1567
- "agentId": {
1568
- "name": "agentId",
1569
- "type": "uuid",
1570
- "primaryKey": false,
1571
- "notNull": true
1572
- },
1573
- "name": {
1574
- "name": "name",
1575
- "type": "text",
1576
- "primaryKey": false,
1577
- "notNull": true
1578
- },
1579
- "metadata": {
1580
- "name": "metadata",
1581
- "type": "jsonb",
1582
- "primaryKey": false,
1583
- "notNull": false
1584
- },
1585
- "serverId": {
1586
- "name": "serverId",
1587
- "type": "text",
1588
- "primaryKey": false,
1589
- "notNull": true
1590
- },
1591
- "createdAt": {
1592
- "name": "createdAt",
1593
- "type": "timestamptz",
1594
- "primaryKey": false,
1595
- "notNull": true,
1596
- "default": "now()"
1597
- }
1598
- },
1599
- "indexes": {},
1600
- "foreignKeys": {
1601
- "worlds_agentId_agents_id_fk": {
1602
- "name": "worlds_agentId_agents_id_fk",
1603
- "tableFrom": "worlds",
1604
- "tableTo": "agents",
1605
- "columnsFrom": ["agentId"],
1606
- "columnsTo": ["id"],
1607
- "onDelete": "cascade",
1608
- "onUpdate": "no action"
1609
- }
1610
- },
1611
- "compositePrimaryKeys": {},
1612
- "uniqueConstraints": {},
1613
- "policies": {},
1614
- "checkConstraints": {},
1615
- "isRLSEnabled": false
1616
- }
1617
- },
1618
- "enums": {},
1619
- "schemas": {},
1620
- "sequences": {},
1621
- "roles": {},
1622
- "policies": {},
1623
- "views": {},
1624
- "_meta": {
1625
- "columns": {},
1626
- "schemas": {},
1627
- "tables": {}
1628
- }
1629
- }