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