@paperclipai/db 0.2.2 → 0.2.4

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.
Files changed (91) hide show
  1. package/dist/migrations/0000_mature_masked_marvel.sql +208 -0
  2. package/dist/migrations/0001_fast_northstar.sql +87 -0
  3. package/dist/migrations/0002_big_zaladane.sql +1 -0
  4. package/dist/migrations/0003_shallow_quentin_quire.sql +5 -0
  5. package/dist/migrations/0004_issue_identifiers.sql +28 -0
  6. package/dist/migrations/0005_chief_luke_cage.sql +19 -0
  7. package/dist/migrations/0006_overjoyed_mister_sinister.sql +36 -0
  8. package/dist/migrations/0007_new_quentin_quire.sql +20 -0
  9. package/dist/migrations/0008_amused_zzzax.sql +1 -0
  10. package/dist/migrations/0009_fast_jackal.sql +36 -0
  11. package/dist/migrations/0010_stale_justin_hammer.sql +37 -0
  12. package/dist/migrations/0011_windy_corsair.sql +18 -0
  13. package/dist/migrations/0012_perpetual_ser_duncan.sql +2 -0
  14. package/dist/migrations/0013_dashing_wasp.sql +4 -0
  15. package/dist/migrations/0014_many_mikhail_rasputin.sql +135 -0
  16. package/dist/migrations/0015_project_color_archived.sql +2 -0
  17. package/dist/migrations/0016_agent_icon.sql +1 -0
  18. package/dist/migrations/0017_tiresome_gabe_jones.sql +51 -0
  19. package/dist/migrations/0018_flat_sleepwalker.sql +26 -0
  20. package/dist/migrations/0019_public_victor_mancha.sql +18 -0
  21. package/dist/migrations/0020_white_anita_blake.sql +1 -0
  22. package/dist/migrations/0021_chief_vindicator.sql +1 -0
  23. package/dist/migrations/0022_company_brand_color.sql +1 -0
  24. package/dist/migrations/0023_fair_lethal_legion.sql +3 -0
  25. package/dist/migrations/meta/0000_snapshot.json +1743 -0
  26. package/dist/migrations/meta/0001_snapshot.json +2441 -0
  27. package/dist/migrations/meta/0002_snapshot.json +2454 -0
  28. package/dist/migrations/meta/0003_snapshot.json +2502 -0
  29. package/dist/migrations/meta/0005_snapshot.json +2719 -0
  30. package/dist/migrations/meta/0006_snapshot.json +3048 -0
  31. package/dist/migrations/meta/0007_snapshot.json +3258 -0
  32. package/dist/migrations/meta/0008_snapshot.json +3264 -0
  33. package/dist/migrations/meta/0009_snapshot.json +3587 -0
  34. package/dist/migrations/meta/0010_snapshot.json +3929 -0
  35. package/dist/migrations/meta/0011_snapshot.json +4068 -0
  36. package/dist/migrations/meta/0012_snapshot.json +4087 -0
  37. package/dist/migrations/meta/0013_snapshot.json +4118 -0
  38. package/dist/migrations/meta/0014_snapshot.json +5187 -0
  39. package/dist/migrations/meta/0017_snapshot.json +5215 -0
  40. package/dist/migrations/meta/0018_snapshot.json +5450 -0
  41. package/dist/migrations/meta/0019_snapshot.json +5603 -0
  42. package/dist/migrations/meta/0020_snapshot.json +5603 -0
  43. package/dist/migrations/meta/0021_snapshot.json +5609 -0
  44. package/dist/migrations/meta/0023_snapshot.json +5633 -0
  45. package/dist/migrations/meta/_journal.json +174 -0
  46. package/dist/migrations/migrations/0000_mature_masked_marvel.sql +208 -0
  47. package/dist/migrations/migrations/0001_fast_northstar.sql +87 -0
  48. package/dist/migrations/migrations/0002_big_zaladane.sql +1 -0
  49. package/dist/migrations/migrations/0003_shallow_quentin_quire.sql +5 -0
  50. package/dist/migrations/migrations/0004_issue_identifiers.sql +28 -0
  51. package/dist/migrations/migrations/0005_chief_luke_cage.sql +19 -0
  52. package/dist/migrations/migrations/0006_overjoyed_mister_sinister.sql +36 -0
  53. package/dist/migrations/migrations/0007_new_quentin_quire.sql +20 -0
  54. package/dist/migrations/migrations/0008_amused_zzzax.sql +1 -0
  55. package/dist/migrations/migrations/0009_fast_jackal.sql +36 -0
  56. package/dist/migrations/migrations/0010_stale_justin_hammer.sql +37 -0
  57. package/dist/migrations/migrations/0011_windy_corsair.sql +18 -0
  58. package/dist/migrations/migrations/0012_perpetual_ser_duncan.sql +2 -0
  59. package/dist/migrations/migrations/0013_dashing_wasp.sql +4 -0
  60. package/dist/migrations/migrations/0014_many_mikhail_rasputin.sql +135 -0
  61. package/dist/migrations/migrations/0015_project_color_archived.sql +2 -0
  62. package/dist/migrations/migrations/0016_agent_icon.sql +1 -0
  63. package/dist/migrations/migrations/0017_tiresome_gabe_jones.sql +51 -0
  64. package/dist/migrations/migrations/0018_flat_sleepwalker.sql +26 -0
  65. package/dist/migrations/migrations/0019_public_victor_mancha.sql +18 -0
  66. package/dist/migrations/migrations/0020_white_anita_blake.sql +1 -0
  67. package/dist/migrations/migrations/0021_chief_vindicator.sql +1 -0
  68. package/dist/migrations/migrations/0022_company_brand_color.sql +1 -0
  69. package/dist/migrations/migrations/0023_fair_lethal_legion.sql +3 -0
  70. package/dist/migrations/migrations/meta/0000_snapshot.json +1743 -0
  71. package/dist/migrations/migrations/meta/0001_snapshot.json +2441 -0
  72. package/dist/migrations/migrations/meta/0002_snapshot.json +2454 -0
  73. package/dist/migrations/migrations/meta/0003_snapshot.json +2502 -0
  74. package/dist/migrations/migrations/meta/0005_snapshot.json +2719 -0
  75. package/dist/migrations/migrations/meta/0006_snapshot.json +3048 -0
  76. package/dist/migrations/migrations/meta/0007_snapshot.json +3258 -0
  77. package/dist/migrations/migrations/meta/0008_snapshot.json +3264 -0
  78. package/dist/migrations/migrations/meta/0009_snapshot.json +3587 -0
  79. package/dist/migrations/migrations/meta/0010_snapshot.json +3929 -0
  80. package/dist/migrations/migrations/meta/0011_snapshot.json +4068 -0
  81. package/dist/migrations/migrations/meta/0012_snapshot.json +4087 -0
  82. package/dist/migrations/migrations/meta/0013_snapshot.json +4118 -0
  83. package/dist/migrations/migrations/meta/0014_snapshot.json +5187 -0
  84. package/dist/migrations/migrations/meta/0017_snapshot.json +5215 -0
  85. package/dist/migrations/migrations/meta/0018_snapshot.json +5450 -0
  86. package/dist/migrations/migrations/meta/0019_snapshot.json +5603 -0
  87. package/dist/migrations/migrations/meta/0020_snapshot.json +5603 -0
  88. package/dist/migrations/migrations/meta/0021_snapshot.json +5609 -0
  89. package/dist/migrations/migrations/meta/0023_snapshot.json +5633 -0
  90. package/dist/migrations/migrations/meta/_journal.json +174 -0
  91. package/package.json +3 -3
@@ -0,0 +1,2441 @@
1
+ {
2
+ "id": "3c978251-7673-4c2f-8ec6-ef7352f04d4b",
3
+ "prevId": "ff4290a9-e0a7-4405-8fa0-219a00a09f83",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.activity_log": {
8
+ "name": "activity_log",
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
+ "company_id": {
19
+ "name": "company_id",
20
+ "type": "uuid",
21
+ "primaryKey": false,
22
+ "notNull": true
23
+ },
24
+ "actor_type": {
25
+ "name": "actor_type",
26
+ "type": "text",
27
+ "primaryKey": false,
28
+ "notNull": true,
29
+ "default": "'system'"
30
+ },
31
+ "actor_id": {
32
+ "name": "actor_id",
33
+ "type": "text",
34
+ "primaryKey": false,
35
+ "notNull": true
36
+ },
37
+ "action": {
38
+ "name": "action",
39
+ "type": "text",
40
+ "primaryKey": false,
41
+ "notNull": true
42
+ },
43
+ "entity_type": {
44
+ "name": "entity_type",
45
+ "type": "text",
46
+ "primaryKey": false,
47
+ "notNull": true
48
+ },
49
+ "entity_id": {
50
+ "name": "entity_id",
51
+ "type": "text",
52
+ "primaryKey": false,
53
+ "notNull": true
54
+ },
55
+ "agent_id": {
56
+ "name": "agent_id",
57
+ "type": "uuid",
58
+ "primaryKey": false,
59
+ "notNull": false
60
+ },
61
+ "details": {
62
+ "name": "details",
63
+ "type": "jsonb",
64
+ "primaryKey": false,
65
+ "notNull": false
66
+ },
67
+ "created_at": {
68
+ "name": "created_at",
69
+ "type": "timestamp with time zone",
70
+ "primaryKey": false,
71
+ "notNull": true,
72
+ "default": "now()"
73
+ }
74
+ },
75
+ "indexes": {
76
+ "activity_log_company_created_idx": {
77
+ "name": "activity_log_company_created_idx",
78
+ "columns": [
79
+ {
80
+ "expression": "company_id",
81
+ "isExpression": false,
82
+ "asc": true,
83
+ "nulls": "last"
84
+ },
85
+ {
86
+ "expression": "created_at",
87
+ "isExpression": false,
88
+ "asc": true,
89
+ "nulls": "last"
90
+ }
91
+ ],
92
+ "isUnique": false,
93
+ "concurrently": false,
94
+ "method": "btree",
95
+ "with": {}
96
+ }
97
+ },
98
+ "foreignKeys": {
99
+ "activity_log_company_id_companies_id_fk": {
100
+ "name": "activity_log_company_id_companies_id_fk",
101
+ "tableFrom": "activity_log",
102
+ "tableTo": "companies",
103
+ "columnsFrom": [
104
+ "company_id"
105
+ ],
106
+ "columnsTo": [
107
+ "id"
108
+ ],
109
+ "onDelete": "no action",
110
+ "onUpdate": "no action"
111
+ },
112
+ "activity_log_agent_id_agents_id_fk": {
113
+ "name": "activity_log_agent_id_agents_id_fk",
114
+ "tableFrom": "activity_log",
115
+ "tableTo": "agents",
116
+ "columnsFrom": [
117
+ "agent_id"
118
+ ],
119
+ "columnsTo": [
120
+ "id"
121
+ ],
122
+ "onDelete": "no action",
123
+ "onUpdate": "no action"
124
+ }
125
+ },
126
+ "compositePrimaryKeys": {},
127
+ "uniqueConstraints": {},
128
+ "policies": {},
129
+ "checkConstraints": {},
130
+ "isRLSEnabled": false
131
+ },
132
+ "public.agent_api_keys": {
133
+ "name": "agent_api_keys",
134
+ "schema": "",
135
+ "columns": {
136
+ "id": {
137
+ "name": "id",
138
+ "type": "uuid",
139
+ "primaryKey": true,
140
+ "notNull": true,
141
+ "default": "gen_random_uuid()"
142
+ },
143
+ "agent_id": {
144
+ "name": "agent_id",
145
+ "type": "uuid",
146
+ "primaryKey": false,
147
+ "notNull": true
148
+ },
149
+ "company_id": {
150
+ "name": "company_id",
151
+ "type": "uuid",
152
+ "primaryKey": false,
153
+ "notNull": true
154
+ },
155
+ "name": {
156
+ "name": "name",
157
+ "type": "text",
158
+ "primaryKey": false,
159
+ "notNull": true
160
+ },
161
+ "key_hash": {
162
+ "name": "key_hash",
163
+ "type": "text",
164
+ "primaryKey": false,
165
+ "notNull": true
166
+ },
167
+ "last_used_at": {
168
+ "name": "last_used_at",
169
+ "type": "timestamp with time zone",
170
+ "primaryKey": false,
171
+ "notNull": false
172
+ },
173
+ "revoked_at": {
174
+ "name": "revoked_at",
175
+ "type": "timestamp with time zone",
176
+ "primaryKey": false,
177
+ "notNull": false
178
+ },
179
+ "created_at": {
180
+ "name": "created_at",
181
+ "type": "timestamp with time zone",
182
+ "primaryKey": false,
183
+ "notNull": true,
184
+ "default": "now()"
185
+ }
186
+ },
187
+ "indexes": {
188
+ "agent_api_keys_key_hash_idx": {
189
+ "name": "agent_api_keys_key_hash_idx",
190
+ "columns": [
191
+ {
192
+ "expression": "key_hash",
193
+ "isExpression": false,
194
+ "asc": true,
195
+ "nulls": "last"
196
+ }
197
+ ],
198
+ "isUnique": false,
199
+ "concurrently": false,
200
+ "method": "btree",
201
+ "with": {}
202
+ },
203
+ "agent_api_keys_company_agent_idx": {
204
+ "name": "agent_api_keys_company_agent_idx",
205
+ "columns": [
206
+ {
207
+ "expression": "company_id",
208
+ "isExpression": false,
209
+ "asc": true,
210
+ "nulls": "last"
211
+ },
212
+ {
213
+ "expression": "agent_id",
214
+ "isExpression": false,
215
+ "asc": true,
216
+ "nulls": "last"
217
+ }
218
+ ],
219
+ "isUnique": false,
220
+ "concurrently": false,
221
+ "method": "btree",
222
+ "with": {}
223
+ }
224
+ },
225
+ "foreignKeys": {
226
+ "agent_api_keys_agent_id_agents_id_fk": {
227
+ "name": "agent_api_keys_agent_id_agents_id_fk",
228
+ "tableFrom": "agent_api_keys",
229
+ "tableTo": "agents",
230
+ "columnsFrom": [
231
+ "agent_id"
232
+ ],
233
+ "columnsTo": [
234
+ "id"
235
+ ],
236
+ "onDelete": "no action",
237
+ "onUpdate": "no action"
238
+ },
239
+ "agent_api_keys_company_id_companies_id_fk": {
240
+ "name": "agent_api_keys_company_id_companies_id_fk",
241
+ "tableFrom": "agent_api_keys",
242
+ "tableTo": "companies",
243
+ "columnsFrom": [
244
+ "company_id"
245
+ ],
246
+ "columnsTo": [
247
+ "id"
248
+ ],
249
+ "onDelete": "no action",
250
+ "onUpdate": "no action"
251
+ }
252
+ },
253
+ "compositePrimaryKeys": {},
254
+ "uniqueConstraints": {},
255
+ "policies": {},
256
+ "checkConstraints": {},
257
+ "isRLSEnabled": false
258
+ },
259
+ "public.agent_runtime_state": {
260
+ "name": "agent_runtime_state",
261
+ "schema": "",
262
+ "columns": {
263
+ "agent_id": {
264
+ "name": "agent_id",
265
+ "type": "uuid",
266
+ "primaryKey": true,
267
+ "notNull": true
268
+ },
269
+ "company_id": {
270
+ "name": "company_id",
271
+ "type": "uuid",
272
+ "primaryKey": false,
273
+ "notNull": true
274
+ },
275
+ "adapter_type": {
276
+ "name": "adapter_type",
277
+ "type": "text",
278
+ "primaryKey": false,
279
+ "notNull": true
280
+ },
281
+ "session_id": {
282
+ "name": "session_id",
283
+ "type": "text",
284
+ "primaryKey": false,
285
+ "notNull": false
286
+ },
287
+ "state_json": {
288
+ "name": "state_json",
289
+ "type": "jsonb",
290
+ "primaryKey": false,
291
+ "notNull": true,
292
+ "default": "'{}'::jsonb"
293
+ },
294
+ "last_run_id": {
295
+ "name": "last_run_id",
296
+ "type": "uuid",
297
+ "primaryKey": false,
298
+ "notNull": false
299
+ },
300
+ "last_run_status": {
301
+ "name": "last_run_status",
302
+ "type": "text",
303
+ "primaryKey": false,
304
+ "notNull": false
305
+ },
306
+ "total_input_tokens": {
307
+ "name": "total_input_tokens",
308
+ "type": "bigint",
309
+ "primaryKey": false,
310
+ "notNull": true,
311
+ "default": 0
312
+ },
313
+ "total_output_tokens": {
314
+ "name": "total_output_tokens",
315
+ "type": "bigint",
316
+ "primaryKey": false,
317
+ "notNull": true,
318
+ "default": 0
319
+ },
320
+ "total_cached_input_tokens": {
321
+ "name": "total_cached_input_tokens",
322
+ "type": "bigint",
323
+ "primaryKey": false,
324
+ "notNull": true,
325
+ "default": 0
326
+ },
327
+ "total_cost_cents": {
328
+ "name": "total_cost_cents",
329
+ "type": "bigint",
330
+ "primaryKey": false,
331
+ "notNull": true,
332
+ "default": 0
333
+ },
334
+ "last_error": {
335
+ "name": "last_error",
336
+ "type": "text",
337
+ "primaryKey": false,
338
+ "notNull": false
339
+ },
340
+ "created_at": {
341
+ "name": "created_at",
342
+ "type": "timestamp with time zone",
343
+ "primaryKey": false,
344
+ "notNull": true,
345
+ "default": "now()"
346
+ },
347
+ "updated_at": {
348
+ "name": "updated_at",
349
+ "type": "timestamp with time zone",
350
+ "primaryKey": false,
351
+ "notNull": true,
352
+ "default": "now()"
353
+ }
354
+ },
355
+ "indexes": {
356
+ "agent_runtime_state_company_agent_idx": {
357
+ "name": "agent_runtime_state_company_agent_idx",
358
+ "columns": [
359
+ {
360
+ "expression": "company_id",
361
+ "isExpression": false,
362
+ "asc": true,
363
+ "nulls": "last"
364
+ },
365
+ {
366
+ "expression": "agent_id",
367
+ "isExpression": false,
368
+ "asc": true,
369
+ "nulls": "last"
370
+ }
371
+ ],
372
+ "isUnique": false,
373
+ "concurrently": false,
374
+ "method": "btree",
375
+ "with": {}
376
+ },
377
+ "agent_runtime_state_company_updated_idx": {
378
+ "name": "agent_runtime_state_company_updated_idx",
379
+ "columns": [
380
+ {
381
+ "expression": "company_id",
382
+ "isExpression": false,
383
+ "asc": true,
384
+ "nulls": "last"
385
+ },
386
+ {
387
+ "expression": "updated_at",
388
+ "isExpression": false,
389
+ "asc": true,
390
+ "nulls": "last"
391
+ }
392
+ ],
393
+ "isUnique": false,
394
+ "concurrently": false,
395
+ "method": "btree",
396
+ "with": {}
397
+ }
398
+ },
399
+ "foreignKeys": {
400
+ "agent_runtime_state_agent_id_agents_id_fk": {
401
+ "name": "agent_runtime_state_agent_id_agents_id_fk",
402
+ "tableFrom": "agent_runtime_state",
403
+ "tableTo": "agents",
404
+ "columnsFrom": [
405
+ "agent_id"
406
+ ],
407
+ "columnsTo": [
408
+ "id"
409
+ ],
410
+ "onDelete": "no action",
411
+ "onUpdate": "no action"
412
+ },
413
+ "agent_runtime_state_company_id_companies_id_fk": {
414
+ "name": "agent_runtime_state_company_id_companies_id_fk",
415
+ "tableFrom": "agent_runtime_state",
416
+ "tableTo": "companies",
417
+ "columnsFrom": [
418
+ "company_id"
419
+ ],
420
+ "columnsTo": [
421
+ "id"
422
+ ],
423
+ "onDelete": "no action",
424
+ "onUpdate": "no action"
425
+ }
426
+ },
427
+ "compositePrimaryKeys": {},
428
+ "uniqueConstraints": {},
429
+ "policies": {},
430
+ "checkConstraints": {},
431
+ "isRLSEnabled": false
432
+ },
433
+ "public.agent_wakeup_requests": {
434
+ "name": "agent_wakeup_requests",
435
+ "schema": "",
436
+ "columns": {
437
+ "id": {
438
+ "name": "id",
439
+ "type": "uuid",
440
+ "primaryKey": true,
441
+ "notNull": true,
442
+ "default": "gen_random_uuid()"
443
+ },
444
+ "company_id": {
445
+ "name": "company_id",
446
+ "type": "uuid",
447
+ "primaryKey": false,
448
+ "notNull": true
449
+ },
450
+ "agent_id": {
451
+ "name": "agent_id",
452
+ "type": "uuid",
453
+ "primaryKey": false,
454
+ "notNull": true
455
+ },
456
+ "source": {
457
+ "name": "source",
458
+ "type": "text",
459
+ "primaryKey": false,
460
+ "notNull": true
461
+ },
462
+ "trigger_detail": {
463
+ "name": "trigger_detail",
464
+ "type": "text",
465
+ "primaryKey": false,
466
+ "notNull": false
467
+ },
468
+ "reason": {
469
+ "name": "reason",
470
+ "type": "text",
471
+ "primaryKey": false,
472
+ "notNull": false
473
+ },
474
+ "payload": {
475
+ "name": "payload",
476
+ "type": "jsonb",
477
+ "primaryKey": false,
478
+ "notNull": false
479
+ },
480
+ "status": {
481
+ "name": "status",
482
+ "type": "text",
483
+ "primaryKey": false,
484
+ "notNull": true,
485
+ "default": "'queued'"
486
+ },
487
+ "coalesced_count": {
488
+ "name": "coalesced_count",
489
+ "type": "integer",
490
+ "primaryKey": false,
491
+ "notNull": true,
492
+ "default": 0
493
+ },
494
+ "requested_by_actor_type": {
495
+ "name": "requested_by_actor_type",
496
+ "type": "text",
497
+ "primaryKey": false,
498
+ "notNull": false
499
+ },
500
+ "requested_by_actor_id": {
501
+ "name": "requested_by_actor_id",
502
+ "type": "text",
503
+ "primaryKey": false,
504
+ "notNull": false
505
+ },
506
+ "idempotency_key": {
507
+ "name": "idempotency_key",
508
+ "type": "text",
509
+ "primaryKey": false,
510
+ "notNull": false
511
+ },
512
+ "run_id": {
513
+ "name": "run_id",
514
+ "type": "uuid",
515
+ "primaryKey": false,
516
+ "notNull": false
517
+ },
518
+ "requested_at": {
519
+ "name": "requested_at",
520
+ "type": "timestamp with time zone",
521
+ "primaryKey": false,
522
+ "notNull": true,
523
+ "default": "now()"
524
+ },
525
+ "claimed_at": {
526
+ "name": "claimed_at",
527
+ "type": "timestamp with time zone",
528
+ "primaryKey": false,
529
+ "notNull": false
530
+ },
531
+ "finished_at": {
532
+ "name": "finished_at",
533
+ "type": "timestamp with time zone",
534
+ "primaryKey": false,
535
+ "notNull": false
536
+ },
537
+ "error": {
538
+ "name": "error",
539
+ "type": "text",
540
+ "primaryKey": false,
541
+ "notNull": false
542
+ },
543
+ "created_at": {
544
+ "name": "created_at",
545
+ "type": "timestamp with time zone",
546
+ "primaryKey": false,
547
+ "notNull": true,
548
+ "default": "now()"
549
+ },
550
+ "updated_at": {
551
+ "name": "updated_at",
552
+ "type": "timestamp with time zone",
553
+ "primaryKey": false,
554
+ "notNull": true,
555
+ "default": "now()"
556
+ }
557
+ },
558
+ "indexes": {
559
+ "agent_wakeup_requests_company_agent_status_idx": {
560
+ "name": "agent_wakeup_requests_company_agent_status_idx",
561
+ "columns": [
562
+ {
563
+ "expression": "company_id",
564
+ "isExpression": false,
565
+ "asc": true,
566
+ "nulls": "last"
567
+ },
568
+ {
569
+ "expression": "agent_id",
570
+ "isExpression": false,
571
+ "asc": true,
572
+ "nulls": "last"
573
+ },
574
+ {
575
+ "expression": "status",
576
+ "isExpression": false,
577
+ "asc": true,
578
+ "nulls": "last"
579
+ }
580
+ ],
581
+ "isUnique": false,
582
+ "concurrently": false,
583
+ "method": "btree",
584
+ "with": {}
585
+ },
586
+ "agent_wakeup_requests_company_requested_idx": {
587
+ "name": "agent_wakeup_requests_company_requested_idx",
588
+ "columns": [
589
+ {
590
+ "expression": "company_id",
591
+ "isExpression": false,
592
+ "asc": true,
593
+ "nulls": "last"
594
+ },
595
+ {
596
+ "expression": "requested_at",
597
+ "isExpression": false,
598
+ "asc": true,
599
+ "nulls": "last"
600
+ }
601
+ ],
602
+ "isUnique": false,
603
+ "concurrently": false,
604
+ "method": "btree",
605
+ "with": {}
606
+ },
607
+ "agent_wakeup_requests_agent_requested_idx": {
608
+ "name": "agent_wakeup_requests_agent_requested_idx",
609
+ "columns": [
610
+ {
611
+ "expression": "agent_id",
612
+ "isExpression": false,
613
+ "asc": true,
614
+ "nulls": "last"
615
+ },
616
+ {
617
+ "expression": "requested_at",
618
+ "isExpression": false,
619
+ "asc": true,
620
+ "nulls": "last"
621
+ }
622
+ ],
623
+ "isUnique": false,
624
+ "concurrently": false,
625
+ "method": "btree",
626
+ "with": {}
627
+ }
628
+ },
629
+ "foreignKeys": {
630
+ "agent_wakeup_requests_company_id_companies_id_fk": {
631
+ "name": "agent_wakeup_requests_company_id_companies_id_fk",
632
+ "tableFrom": "agent_wakeup_requests",
633
+ "tableTo": "companies",
634
+ "columnsFrom": [
635
+ "company_id"
636
+ ],
637
+ "columnsTo": [
638
+ "id"
639
+ ],
640
+ "onDelete": "no action",
641
+ "onUpdate": "no action"
642
+ },
643
+ "agent_wakeup_requests_agent_id_agents_id_fk": {
644
+ "name": "agent_wakeup_requests_agent_id_agents_id_fk",
645
+ "tableFrom": "agent_wakeup_requests",
646
+ "tableTo": "agents",
647
+ "columnsFrom": [
648
+ "agent_id"
649
+ ],
650
+ "columnsTo": [
651
+ "id"
652
+ ],
653
+ "onDelete": "no action",
654
+ "onUpdate": "no action"
655
+ }
656
+ },
657
+ "compositePrimaryKeys": {},
658
+ "uniqueConstraints": {},
659
+ "policies": {},
660
+ "checkConstraints": {},
661
+ "isRLSEnabled": false
662
+ },
663
+ "public.agents": {
664
+ "name": "agents",
665
+ "schema": "",
666
+ "columns": {
667
+ "id": {
668
+ "name": "id",
669
+ "type": "uuid",
670
+ "primaryKey": true,
671
+ "notNull": true,
672
+ "default": "gen_random_uuid()"
673
+ },
674
+ "company_id": {
675
+ "name": "company_id",
676
+ "type": "uuid",
677
+ "primaryKey": false,
678
+ "notNull": true
679
+ },
680
+ "name": {
681
+ "name": "name",
682
+ "type": "text",
683
+ "primaryKey": false,
684
+ "notNull": true
685
+ },
686
+ "role": {
687
+ "name": "role",
688
+ "type": "text",
689
+ "primaryKey": false,
690
+ "notNull": true,
691
+ "default": "'general'"
692
+ },
693
+ "title": {
694
+ "name": "title",
695
+ "type": "text",
696
+ "primaryKey": false,
697
+ "notNull": false
698
+ },
699
+ "status": {
700
+ "name": "status",
701
+ "type": "text",
702
+ "primaryKey": false,
703
+ "notNull": true,
704
+ "default": "'idle'"
705
+ },
706
+ "reports_to": {
707
+ "name": "reports_to",
708
+ "type": "uuid",
709
+ "primaryKey": false,
710
+ "notNull": false
711
+ },
712
+ "capabilities": {
713
+ "name": "capabilities",
714
+ "type": "text",
715
+ "primaryKey": false,
716
+ "notNull": false
717
+ },
718
+ "adapter_type": {
719
+ "name": "adapter_type",
720
+ "type": "text",
721
+ "primaryKey": false,
722
+ "notNull": true,
723
+ "default": "'process'"
724
+ },
725
+ "adapter_config": {
726
+ "name": "adapter_config",
727
+ "type": "jsonb",
728
+ "primaryKey": false,
729
+ "notNull": true,
730
+ "default": "'{}'::jsonb"
731
+ },
732
+ "runtime_config": {
733
+ "name": "runtime_config",
734
+ "type": "jsonb",
735
+ "primaryKey": false,
736
+ "notNull": true,
737
+ "default": "'{}'::jsonb"
738
+ },
739
+ "context_mode": {
740
+ "name": "context_mode",
741
+ "type": "text",
742
+ "primaryKey": false,
743
+ "notNull": true,
744
+ "default": "'thin'"
745
+ },
746
+ "budget_monthly_cents": {
747
+ "name": "budget_monthly_cents",
748
+ "type": "integer",
749
+ "primaryKey": false,
750
+ "notNull": true,
751
+ "default": 0
752
+ },
753
+ "spent_monthly_cents": {
754
+ "name": "spent_monthly_cents",
755
+ "type": "integer",
756
+ "primaryKey": false,
757
+ "notNull": true,
758
+ "default": 0
759
+ },
760
+ "last_heartbeat_at": {
761
+ "name": "last_heartbeat_at",
762
+ "type": "timestamp with time zone",
763
+ "primaryKey": false,
764
+ "notNull": false
765
+ },
766
+ "metadata": {
767
+ "name": "metadata",
768
+ "type": "jsonb",
769
+ "primaryKey": false,
770
+ "notNull": false
771
+ },
772
+ "created_at": {
773
+ "name": "created_at",
774
+ "type": "timestamp with time zone",
775
+ "primaryKey": false,
776
+ "notNull": true,
777
+ "default": "now()"
778
+ },
779
+ "updated_at": {
780
+ "name": "updated_at",
781
+ "type": "timestamp with time zone",
782
+ "primaryKey": false,
783
+ "notNull": true,
784
+ "default": "now()"
785
+ }
786
+ },
787
+ "indexes": {
788
+ "agents_company_status_idx": {
789
+ "name": "agents_company_status_idx",
790
+ "columns": [
791
+ {
792
+ "expression": "company_id",
793
+ "isExpression": false,
794
+ "asc": true,
795
+ "nulls": "last"
796
+ },
797
+ {
798
+ "expression": "status",
799
+ "isExpression": false,
800
+ "asc": true,
801
+ "nulls": "last"
802
+ }
803
+ ],
804
+ "isUnique": false,
805
+ "concurrently": false,
806
+ "method": "btree",
807
+ "with": {}
808
+ },
809
+ "agents_company_reports_to_idx": {
810
+ "name": "agents_company_reports_to_idx",
811
+ "columns": [
812
+ {
813
+ "expression": "company_id",
814
+ "isExpression": false,
815
+ "asc": true,
816
+ "nulls": "last"
817
+ },
818
+ {
819
+ "expression": "reports_to",
820
+ "isExpression": false,
821
+ "asc": true,
822
+ "nulls": "last"
823
+ }
824
+ ],
825
+ "isUnique": false,
826
+ "concurrently": false,
827
+ "method": "btree",
828
+ "with": {}
829
+ }
830
+ },
831
+ "foreignKeys": {
832
+ "agents_company_id_companies_id_fk": {
833
+ "name": "agents_company_id_companies_id_fk",
834
+ "tableFrom": "agents",
835
+ "tableTo": "companies",
836
+ "columnsFrom": [
837
+ "company_id"
838
+ ],
839
+ "columnsTo": [
840
+ "id"
841
+ ],
842
+ "onDelete": "no action",
843
+ "onUpdate": "no action"
844
+ },
845
+ "agents_reports_to_agents_id_fk": {
846
+ "name": "agents_reports_to_agents_id_fk",
847
+ "tableFrom": "agents",
848
+ "tableTo": "agents",
849
+ "columnsFrom": [
850
+ "reports_to"
851
+ ],
852
+ "columnsTo": [
853
+ "id"
854
+ ],
855
+ "onDelete": "no action",
856
+ "onUpdate": "no action"
857
+ }
858
+ },
859
+ "compositePrimaryKeys": {},
860
+ "uniqueConstraints": {},
861
+ "policies": {},
862
+ "checkConstraints": {},
863
+ "isRLSEnabled": false
864
+ },
865
+ "public.approvals": {
866
+ "name": "approvals",
867
+ "schema": "",
868
+ "columns": {
869
+ "id": {
870
+ "name": "id",
871
+ "type": "uuid",
872
+ "primaryKey": true,
873
+ "notNull": true,
874
+ "default": "gen_random_uuid()"
875
+ },
876
+ "company_id": {
877
+ "name": "company_id",
878
+ "type": "uuid",
879
+ "primaryKey": false,
880
+ "notNull": true
881
+ },
882
+ "type": {
883
+ "name": "type",
884
+ "type": "text",
885
+ "primaryKey": false,
886
+ "notNull": true
887
+ },
888
+ "requested_by_agent_id": {
889
+ "name": "requested_by_agent_id",
890
+ "type": "uuid",
891
+ "primaryKey": false,
892
+ "notNull": false
893
+ },
894
+ "requested_by_user_id": {
895
+ "name": "requested_by_user_id",
896
+ "type": "text",
897
+ "primaryKey": false,
898
+ "notNull": false
899
+ },
900
+ "status": {
901
+ "name": "status",
902
+ "type": "text",
903
+ "primaryKey": false,
904
+ "notNull": true,
905
+ "default": "'pending'"
906
+ },
907
+ "payload": {
908
+ "name": "payload",
909
+ "type": "jsonb",
910
+ "primaryKey": false,
911
+ "notNull": true
912
+ },
913
+ "decision_note": {
914
+ "name": "decision_note",
915
+ "type": "text",
916
+ "primaryKey": false,
917
+ "notNull": false
918
+ },
919
+ "decided_by_user_id": {
920
+ "name": "decided_by_user_id",
921
+ "type": "text",
922
+ "primaryKey": false,
923
+ "notNull": false
924
+ },
925
+ "decided_at": {
926
+ "name": "decided_at",
927
+ "type": "timestamp with time zone",
928
+ "primaryKey": false,
929
+ "notNull": false
930
+ },
931
+ "created_at": {
932
+ "name": "created_at",
933
+ "type": "timestamp with time zone",
934
+ "primaryKey": false,
935
+ "notNull": true,
936
+ "default": "now()"
937
+ },
938
+ "updated_at": {
939
+ "name": "updated_at",
940
+ "type": "timestamp with time zone",
941
+ "primaryKey": false,
942
+ "notNull": true,
943
+ "default": "now()"
944
+ }
945
+ },
946
+ "indexes": {
947
+ "approvals_company_status_type_idx": {
948
+ "name": "approvals_company_status_type_idx",
949
+ "columns": [
950
+ {
951
+ "expression": "company_id",
952
+ "isExpression": false,
953
+ "asc": true,
954
+ "nulls": "last"
955
+ },
956
+ {
957
+ "expression": "status",
958
+ "isExpression": false,
959
+ "asc": true,
960
+ "nulls": "last"
961
+ },
962
+ {
963
+ "expression": "type",
964
+ "isExpression": false,
965
+ "asc": true,
966
+ "nulls": "last"
967
+ }
968
+ ],
969
+ "isUnique": false,
970
+ "concurrently": false,
971
+ "method": "btree",
972
+ "with": {}
973
+ }
974
+ },
975
+ "foreignKeys": {
976
+ "approvals_company_id_companies_id_fk": {
977
+ "name": "approvals_company_id_companies_id_fk",
978
+ "tableFrom": "approvals",
979
+ "tableTo": "companies",
980
+ "columnsFrom": [
981
+ "company_id"
982
+ ],
983
+ "columnsTo": [
984
+ "id"
985
+ ],
986
+ "onDelete": "no action",
987
+ "onUpdate": "no action"
988
+ },
989
+ "approvals_requested_by_agent_id_agents_id_fk": {
990
+ "name": "approvals_requested_by_agent_id_agents_id_fk",
991
+ "tableFrom": "approvals",
992
+ "tableTo": "agents",
993
+ "columnsFrom": [
994
+ "requested_by_agent_id"
995
+ ],
996
+ "columnsTo": [
997
+ "id"
998
+ ],
999
+ "onDelete": "no action",
1000
+ "onUpdate": "no action"
1001
+ }
1002
+ },
1003
+ "compositePrimaryKeys": {},
1004
+ "uniqueConstraints": {},
1005
+ "policies": {},
1006
+ "checkConstraints": {},
1007
+ "isRLSEnabled": false
1008
+ },
1009
+ "public.companies": {
1010
+ "name": "companies",
1011
+ "schema": "",
1012
+ "columns": {
1013
+ "id": {
1014
+ "name": "id",
1015
+ "type": "uuid",
1016
+ "primaryKey": true,
1017
+ "notNull": true,
1018
+ "default": "gen_random_uuid()"
1019
+ },
1020
+ "name": {
1021
+ "name": "name",
1022
+ "type": "text",
1023
+ "primaryKey": false,
1024
+ "notNull": true
1025
+ },
1026
+ "description": {
1027
+ "name": "description",
1028
+ "type": "text",
1029
+ "primaryKey": false,
1030
+ "notNull": false
1031
+ },
1032
+ "status": {
1033
+ "name": "status",
1034
+ "type": "text",
1035
+ "primaryKey": false,
1036
+ "notNull": true,
1037
+ "default": "'active'"
1038
+ },
1039
+ "budget_monthly_cents": {
1040
+ "name": "budget_monthly_cents",
1041
+ "type": "integer",
1042
+ "primaryKey": false,
1043
+ "notNull": true,
1044
+ "default": 0
1045
+ },
1046
+ "spent_monthly_cents": {
1047
+ "name": "spent_monthly_cents",
1048
+ "type": "integer",
1049
+ "primaryKey": false,
1050
+ "notNull": true,
1051
+ "default": 0
1052
+ },
1053
+ "created_at": {
1054
+ "name": "created_at",
1055
+ "type": "timestamp with time zone",
1056
+ "primaryKey": false,
1057
+ "notNull": true,
1058
+ "default": "now()"
1059
+ },
1060
+ "updated_at": {
1061
+ "name": "updated_at",
1062
+ "type": "timestamp with time zone",
1063
+ "primaryKey": false,
1064
+ "notNull": true,
1065
+ "default": "now()"
1066
+ }
1067
+ },
1068
+ "indexes": {},
1069
+ "foreignKeys": {},
1070
+ "compositePrimaryKeys": {},
1071
+ "uniqueConstraints": {},
1072
+ "policies": {},
1073
+ "checkConstraints": {},
1074
+ "isRLSEnabled": false
1075
+ },
1076
+ "public.cost_events": {
1077
+ "name": "cost_events",
1078
+ "schema": "",
1079
+ "columns": {
1080
+ "id": {
1081
+ "name": "id",
1082
+ "type": "uuid",
1083
+ "primaryKey": true,
1084
+ "notNull": true,
1085
+ "default": "gen_random_uuid()"
1086
+ },
1087
+ "company_id": {
1088
+ "name": "company_id",
1089
+ "type": "uuid",
1090
+ "primaryKey": false,
1091
+ "notNull": true
1092
+ },
1093
+ "agent_id": {
1094
+ "name": "agent_id",
1095
+ "type": "uuid",
1096
+ "primaryKey": false,
1097
+ "notNull": true
1098
+ },
1099
+ "issue_id": {
1100
+ "name": "issue_id",
1101
+ "type": "uuid",
1102
+ "primaryKey": false,
1103
+ "notNull": false
1104
+ },
1105
+ "project_id": {
1106
+ "name": "project_id",
1107
+ "type": "uuid",
1108
+ "primaryKey": false,
1109
+ "notNull": false
1110
+ },
1111
+ "goal_id": {
1112
+ "name": "goal_id",
1113
+ "type": "uuid",
1114
+ "primaryKey": false,
1115
+ "notNull": false
1116
+ },
1117
+ "billing_code": {
1118
+ "name": "billing_code",
1119
+ "type": "text",
1120
+ "primaryKey": false,
1121
+ "notNull": false
1122
+ },
1123
+ "provider": {
1124
+ "name": "provider",
1125
+ "type": "text",
1126
+ "primaryKey": false,
1127
+ "notNull": true
1128
+ },
1129
+ "model": {
1130
+ "name": "model",
1131
+ "type": "text",
1132
+ "primaryKey": false,
1133
+ "notNull": true
1134
+ },
1135
+ "input_tokens": {
1136
+ "name": "input_tokens",
1137
+ "type": "integer",
1138
+ "primaryKey": false,
1139
+ "notNull": true,
1140
+ "default": 0
1141
+ },
1142
+ "output_tokens": {
1143
+ "name": "output_tokens",
1144
+ "type": "integer",
1145
+ "primaryKey": false,
1146
+ "notNull": true,
1147
+ "default": 0
1148
+ },
1149
+ "cost_cents": {
1150
+ "name": "cost_cents",
1151
+ "type": "integer",
1152
+ "primaryKey": false,
1153
+ "notNull": true
1154
+ },
1155
+ "occurred_at": {
1156
+ "name": "occurred_at",
1157
+ "type": "timestamp with time zone",
1158
+ "primaryKey": false,
1159
+ "notNull": true
1160
+ },
1161
+ "created_at": {
1162
+ "name": "created_at",
1163
+ "type": "timestamp with time zone",
1164
+ "primaryKey": false,
1165
+ "notNull": true,
1166
+ "default": "now()"
1167
+ }
1168
+ },
1169
+ "indexes": {
1170
+ "cost_events_company_occurred_idx": {
1171
+ "name": "cost_events_company_occurred_idx",
1172
+ "columns": [
1173
+ {
1174
+ "expression": "company_id",
1175
+ "isExpression": false,
1176
+ "asc": true,
1177
+ "nulls": "last"
1178
+ },
1179
+ {
1180
+ "expression": "occurred_at",
1181
+ "isExpression": false,
1182
+ "asc": true,
1183
+ "nulls": "last"
1184
+ }
1185
+ ],
1186
+ "isUnique": false,
1187
+ "concurrently": false,
1188
+ "method": "btree",
1189
+ "with": {}
1190
+ },
1191
+ "cost_events_company_agent_occurred_idx": {
1192
+ "name": "cost_events_company_agent_occurred_idx",
1193
+ "columns": [
1194
+ {
1195
+ "expression": "company_id",
1196
+ "isExpression": false,
1197
+ "asc": true,
1198
+ "nulls": "last"
1199
+ },
1200
+ {
1201
+ "expression": "agent_id",
1202
+ "isExpression": false,
1203
+ "asc": true,
1204
+ "nulls": "last"
1205
+ },
1206
+ {
1207
+ "expression": "occurred_at",
1208
+ "isExpression": false,
1209
+ "asc": true,
1210
+ "nulls": "last"
1211
+ }
1212
+ ],
1213
+ "isUnique": false,
1214
+ "concurrently": false,
1215
+ "method": "btree",
1216
+ "with": {}
1217
+ }
1218
+ },
1219
+ "foreignKeys": {
1220
+ "cost_events_company_id_companies_id_fk": {
1221
+ "name": "cost_events_company_id_companies_id_fk",
1222
+ "tableFrom": "cost_events",
1223
+ "tableTo": "companies",
1224
+ "columnsFrom": [
1225
+ "company_id"
1226
+ ],
1227
+ "columnsTo": [
1228
+ "id"
1229
+ ],
1230
+ "onDelete": "no action",
1231
+ "onUpdate": "no action"
1232
+ },
1233
+ "cost_events_agent_id_agents_id_fk": {
1234
+ "name": "cost_events_agent_id_agents_id_fk",
1235
+ "tableFrom": "cost_events",
1236
+ "tableTo": "agents",
1237
+ "columnsFrom": [
1238
+ "agent_id"
1239
+ ],
1240
+ "columnsTo": [
1241
+ "id"
1242
+ ],
1243
+ "onDelete": "no action",
1244
+ "onUpdate": "no action"
1245
+ },
1246
+ "cost_events_issue_id_issues_id_fk": {
1247
+ "name": "cost_events_issue_id_issues_id_fk",
1248
+ "tableFrom": "cost_events",
1249
+ "tableTo": "issues",
1250
+ "columnsFrom": [
1251
+ "issue_id"
1252
+ ],
1253
+ "columnsTo": [
1254
+ "id"
1255
+ ],
1256
+ "onDelete": "no action",
1257
+ "onUpdate": "no action"
1258
+ },
1259
+ "cost_events_project_id_projects_id_fk": {
1260
+ "name": "cost_events_project_id_projects_id_fk",
1261
+ "tableFrom": "cost_events",
1262
+ "tableTo": "projects",
1263
+ "columnsFrom": [
1264
+ "project_id"
1265
+ ],
1266
+ "columnsTo": [
1267
+ "id"
1268
+ ],
1269
+ "onDelete": "no action",
1270
+ "onUpdate": "no action"
1271
+ },
1272
+ "cost_events_goal_id_goals_id_fk": {
1273
+ "name": "cost_events_goal_id_goals_id_fk",
1274
+ "tableFrom": "cost_events",
1275
+ "tableTo": "goals",
1276
+ "columnsFrom": [
1277
+ "goal_id"
1278
+ ],
1279
+ "columnsTo": [
1280
+ "id"
1281
+ ],
1282
+ "onDelete": "no action",
1283
+ "onUpdate": "no action"
1284
+ }
1285
+ },
1286
+ "compositePrimaryKeys": {},
1287
+ "uniqueConstraints": {},
1288
+ "policies": {},
1289
+ "checkConstraints": {},
1290
+ "isRLSEnabled": false
1291
+ },
1292
+ "public.goals": {
1293
+ "name": "goals",
1294
+ "schema": "",
1295
+ "columns": {
1296
+ "id": {
1297
+ "name": "id",
1298
+ "type": "uuid",
1299
+ "primaryKey": true,
1300
+ "notNull": true,
1301
+ "default": "gen_random_uuid()"
1302
+ },
1303
+ "company_id": {
1304
+ "name": "company_id",
1305
+ "type": "uuid",
1306
+ "primaryKey": false,
1307
+ "notNull": true
1308
+ },
1309
+ "title": {
1310
+ "name": "title",
1311
+ "type": "text",
1312
+ "primaryKey": false,
1313
+ "notNull": true
1314
+ },
1315
+ "description": {
1316
+ "name": "description",
1317
+ "type": "text",
1318
+ "primaryKey": false,
1319
+ "notNull": false
1320
+ },
1321
+ "level": {
1322
+ "name": "level",
1323
+ "type": "text",
1324
+ "primaryKey": false,
1325
+ "notNull": true,
1326
+ "default": "'task'"
1327
+ },
1328
+ "status": {
1329
+ "name": "status",
1330
+ "type": "text",
1331
+ "primaryKey": false,
1332
+ "notNull": true,
1333
+ "default": "'planned'"
1334
+ },
1335
+ "parent_id": {
1336
+ "name": "parent_id",
1337
+ "type": "uuid",
1338
+ "primaryKey": false,
1339
+ "notNull": false
1340
+ },
1341
+ "owner_agent_id": {
1342
+ "name": "owner_agent_id",
1343
+ "type": "uuid",
1344
+ "primaryKey": false,
1345
+ "notNull": false
1346
+ },
1347
+ "created_at": {
1348
+ "name": "created_at",
1349
+ "type": "timestamp with time zone",
1350
+ "primaryKey": false,
1351
+ "notNull": true,
1352
+ "default": "now()"
1353
+ },
1354
+ "updated_at": {
1355
+ "name": "updated_at",
1356
+ "type": "timestamp with time zone",
1357
+ "primaryKey": false,
1358
+ "notNull": true,
1359
+ "default": "now()"
1360
+ }
1361
+ },
1362
+ "indexes": {
1363
+ "goals_company_idx": {
1364
+ "name": "goals_company_idx",
1365
+ "columns": [
1366
+ {
1367
+ "expression": "company_id",
1368
+ "isExpression": false,
1369
+ "asc": true,
1370
+ "nulls": "last"
1371
+ }
1372
+ ],
1373
+ "isUnique": false,
1374
+ "concurrently": false,
1375
+ "method": "btree",
1376
+ "with": {}
1377
+ }
1378
+ },
1379
+ "foreignKeys": {
1380
+ "goals_company_id_companies_id_fk": {
1381
+ "name": "goals_company_id_companies_id_fk",
1382
+ "tableFrom": "goals",
1383
+ "tableTo": "companies",
1384
+ "columnsFrom": [
1385
+ "company_id"
1386
+ ],
1387
+ "columnsTo": [
1388
+ "id"
1389
+ ],
1390
+ "onDelete": "no action",
1391
+ "onUpdate": "no action"
1392
+ },
1393
+ "goals_parent_id_goals_id_fk": {
1394
+ "name": "goals_parent_id_goals_id_fk",
1395
+ "tableFrom": "goals",
1396
+ "tableTo": "goals",
1397
+ "columnsFrom": [
1398
+ "parent_id"
1399
+ ],
1400
+ "columnsTo": [
1401
+ "id"
1402
+ ],
1403
+ "onDelete": "no action",
1404
+ "onUpdate": "no action"
1405
+ },
1406
+ "goals_owner_agent_id_agents_id_fk": {
1407
+ "name": "goals_owner_agent_id_agents_id_fk",
1408
+ "tableFrom": "goals",
1409
+ "tableTo": "agents",
1410
+ "columnsFrom": [
1411
+ "owner_agent_id"
1412
+ ],
1413
+ "columnsTo": [
1414
+ "id"
1415
+ ],
1416
+ "onDelete": "no action",
1417
+ "onUpdate": "no action"
1418
+ }
1419
+ },
1420
+ "compositePrimaryKeys": {},
1421
+ "uniqueConstraints": {},
1422
+ "policies": {},
1423
+ "checkConstraints": {},
1424
+ "isRLSEnabled": false
1425
+ },
1426
+ "public.heartbeat_run_events": {
1427
+ "name": "heartbeat_run_events",
1428
+ "schema": "",
1429
+ "columns": {
1430
+ "id": {
1431
+ "name": "id",
1432
+ "type": "bigserial",
1433
+ "primaryKey": true,
1434
+ "notNull": true
1435
+ },
1436
+ "company_id": {
1437
+ "name": "company_id",
1438
+ "type": "uuid",
1439
+ "primaryKey": false,
1440
+ "notNull": true
1441
+ },
1442
+ "run_id": {
1443
+ "name": "run_id",
1444
+ "type": "uuid",
1445
+ "primaryKey": false,
1446
+ "notNull": true
1447
+ },
1448
+ "agent_id": {
1449
+ "name": "agent_id",
1450
+ "type": "uuid",
1451
+ "primaryKey": false,
1452
+ "notNull": true
1453
+ },
1454
+ "seq": {
1455
+ "name": "seq",
1456
+ "type": "integer",
1457
+ "primaryKey": false,
1458
+ "notNull": true
1459
+ },
1460
+ "event_type": {
1461
+ "name": "event_type",
1462
+ "type": "text",
1463
+ "primaryKey": false,
1464
+ "notNull": true
1465
+ },
1466
+ "stream": {
1467
+ "name": "stream",
1468
+ "type": "text",
1469
+ "primaryKey": false,
1470
+ "notNull": false
1471
+ },
1472
+ "level": {
1473
+ "name": "level",
1474
+ "type": "text",
1475
+ "primaryKey": false,
1476
+ "notNull": false
1477
+ },
1478
+ "color": {
1479
+ "name": "color",
1480
+ "type": "text",
1481
+ "primaryKey": false,
1482
+ "notNull": false
1483
+ },
1484
+ "message": {
1485
+ "name": "message",
1486
+ "type": "text",
1487
+ "primaryKey": false,
1488
+ "notNull": false
1489
+ },
1490
+ "payload": {
1491
+ "name": "payload",
1492
+ "type": "jsonb",
1493
+ "primaryKey": false,
1494
+ "notNull": false
1495
+ },
1496
+ "created_at": {
1497
+ "name": "created_at",
1498
+ "type": "timestamp with time zone",
1499
+ "primaryKey": false,
1500
+ "notNull": true,
1501
+ "default": "now()"
1502
+ }
1503
+ },
1504
+ "indexes": {
1505
+ "heartbeat_run_events_run_seq_idx": {
1506
+ "name": "heartbeat_run_events_run_seq_idx",
1507
+ "columns": [
1508
+ {
1509
+ "expression": "run_id",
1510
+ "isExpression": false,
1511
+ "asc": true,
1512
+ "nulls": "last"
1513
+ },
1514
+ {
1515
+ "expression": "seq",
1516
+ "isExpression": false,
1517
+ "asc": true,
1518
+ "nulls": "last"
1519
+ }
1520
+ ],
1521
+ "isUnique": false,
1522
+ "concurrently": false,
1523
+ "method": "btree",
1524
+ "with": {}
1525
+ },
1526
+ "heartbeat_run_events_company_run_idx": {
1527
+ "name": "heartbeat_run_events_company_run_idx",
1528
+ "columns": [
1529
+ {
1530
+ "expression": "company_id",
1531
+ "isExpression": false,
1532
+ "asc": true,
1533
+ "nulls": "last"
1534
+ },
1535
+ {
1536
+ "expression": "run_id",
1537
+ "isExpression": false,
1538
+ "asc": true,
1539
+ "nulls": "last"
1540
+ }
1541
+ ],
1542
+ "isUnique": false,
1543
+ "concurrently": false,
1544
+ "method": "btree",
1545
+ "with": {}
1546
+ },
1547
+ "heartbeat_run_events_company_created_idx": {
1548
+ "name": "heartbeat_run_events_company_created_idx",
1549
+ "columns": [
1550
+ {
1551
+ "expression": "company_id",
1552
+ "isExpression": false,
1553
+ "asc": true,
1554
+ "nulls": "last"
1555
+ },
1556
+ {
1557
+ "expression": "created_at",
1558
+ "isExpression": false,
1559
+ "asc": true,
1560
+ "nulls": "last"
1561
+ }
1562
+ ],
1563
+ "isUnique": false,
1564
+ "concurrently": false,
1565
+ "method": "btree",
1566
+ "with": {}
1567
+ }
1568
+ },
1569
+ "foreignKeys": {
1570
+ "heartbeat_run_events_company_id_companies_id_fk": {
1571
+ "name": "heartbeat_run_events_company_id_companies_id_fk",
1572
+ "tableFrom": "heartbeat_run_events",
1573
+ "tableTo": "companies",
1574
+ "columnsFrom": [
1575
+ "company_id"
1576
+ ],
1577
+ "columnsTo": [
1578
+ "id"
1579
+ ],
1580
+ "onDelete": "no action",
1581
+ "onUpdate": "no action"
1582
+ },
1583
+ "heartbeat_run_events_run_id_heartbeat_runs_id_fk": {
1584
+ "name": "heartbeat_run_events_run_id_heartbeat_runs_id_fk",
1585
+ "tableFrom": "heartbeat_run_events",
1586
+ "tableTo": "heartbeat_runs",
1587
+ "columnsFrom": [
1588
+ "run_id"
1589
+ ],
1590
+ "columnsTo": [
1591
+ "id"
1592
+ ],
1593
+ "onDelete": "no action",
1594
+ "onUpdate": "no action"
1595
+ },
1596
+ "heartbeat_run_events_agent_id_agents_id_fk": {
1597
+ "name": "heartbeat_run_events_agent_id_agents_id_fk",
1598
+ "tableFrom": "heartbeat_run_events",
1599
+ "tableTo": "agents",
1600
+ "columnsFrom": [
1601
+ "agent_id"
1602
+ ],
1603
+ "columnsTo": [
1604
+ "id"
1605
+ ],
1606
+ "onDelete": "no action",
1607
+ "onUpdate": "no action"
1608
+ }
1609
+ },
1610
+ "compositePrimaryKeys": {},
1611
+ "uniqueConstraints": {},
1612
+ "policies": {},
1613
+ "checkConstraints": {},
1614
+ "isRLSEnabled": false
1615
+ },
1616
+ "public.heartbeat_runs": {
1617
+ "name": "heartbeat_runs",
1618
+ "schema": "",
1619
+ "columns": {
1620
+ "id": {
1621
+ "name": "id",
1622
+ "type": "uuid",
1623
+ "primaryKey": true,
1624
+ "notNull": true,
1625
+ "default": "gen_random_uuid()"
1626
+ },
1627
+ "company_id": {
1628
+ "name": "company_id",
1629
+ "type": "uuid",
1630
+ "primaryKey": false,
1631
+ "notNull": true
1632
+ },
1633
+ "agent_id": {
1634
+ "name": "agent_id",
1635
+ "type": "uuid",
1636
+ "primaryKey": false,
1637
+ "notNull": true
1638
+ },
1639
+ "invocation_source": {
1640
+ "name": "invocation_source",
1641
+ "type": "text",
1642
+ "primaryKey": false,
1643
+ "notNull": true,
1644
+ "default": "'on_demand'"
1645
+ },
1646
+ "trigger_detail": {
1647
+ "name": "trigger_detail",
1648
+ "type": "text",
1649
+ "primaryKey": false,
1650
+ "notNull": false
1651
+ },
1652
+ "status": {
1653
+ "name": "status",
1654
+ "type": "text",
1655
+ "primaryKey": false,
1656
+ "notNull": true,
1657
+ "default": "'queued'"
1658
+ },
1659
+ "started_at": {
1660
+ "name": "started_at",
1661
+ "type": "timestamp with time zone",
1662
+ "primaryKey": false,
1663
+ "notNull": false
1664
+ },
1665
+ "finished_at": {
1666
+ "name": "finished_at",
1667
+ "type": "timestamp with time zone",
1668
+ "primaryKey": false,
1669
+ "notNull": false
1670
+ },
1671
+ "error": {
1672
+ "name": "error",
1673
+ "type": "text",
1674
+ "primaryKey": false,
1675
+ "notNull": false
1676
+ },
1677
+ "wakeup_request_id": {
1678
+ "name": "wakeup_request_id",
1679
+ "type": "uuid",
1680
+ "primaryKey": false,
1681
+ "notNull": false
1682
+ },
1683
+ "exit_code": {
1684
+ "name": "exit_code",
1685
+ "type": "integer",
1686
+ "primaryKey": false,
1687
+ "notNull": false
1688
+ },
1689
+ "signal": {
1690
+ "name": "signal",
1691
+ "type": "text",
1692
+ "primaryKey": false,
1693
+ "notNull": false
1694
+ },
1695
+ "usage_json": {
1696
+ "name": "usage_json",
1697
+ "type": "jsonb",
1698
+ "primaryKey": false,
1699
+ "notNull": false
1700
+ },
1701
+ "result_json": {
1702
+ "name": "result_json",
1703
+ "type": "jsonb",
1704
+ "primaryKey": false,
1705
+ "notNull": false
1706
+ },
1707
+ "session_id_before": {
1708
+ "name": "session_id_before",
1709
+ "type": "text",
1710
+ "primaryKey": false,
1711
+ "notNull": false
1712
+ },
1713
+ "session_id_after": {
1714
+ "name": "session_id_after",
1715
+ "type": "text",
1716
+ "primaryKey": false,
1717
+ "notNull": false
1718
+ },
1719
+ "log_store": {
1720
+ "name": "log_store",
1721
+ "type": "text",
1722
+ "primaryKey": false,
1723
+ "notNull": false
1724
+ },
1725
+ "log_ref": {
1726
+ "name": "log_ref",
1727
+ "type": "text",
1728
+ "primaryKey": false,
1729
+ "notNull": false
1730
+ },
1731
+ "log_bytes": {
1732
+ "name": "log_bytes",
1733
+ "type": "bigint",
1734
+ "primaryKey": false,
1735
+ "notNull": false
1736
+ },
1737
+ "log_sha256": {
1738
+ "name": "log_sha256",
1739
+ "type": "text",
1740
+ "primaryKey": false,
1741
+ "notNull": false
1742
+ },
1743
+ "log_compressed": {
1744
+ "name": "log_compressed",
1745
+ "type": "boolean",
1746
+ "primaryKey": false,
1747
+ "notNull": true,
1748
+ "default": false
1749
+ },
1750
+ "stdout_excerpt": {
1751
+ "name": "stdout_excerpt",
1752
+ "type": "text",
1753
+ "primaryKey": false,
1754
+ "notNull": false
1755
+ },
1756
+ "stderr_excerpt": {
1757
+ "name": "stderr_excerpt",
1758
+ "type": "text",
1759
+ "primaryKey": false,
1760
+ "notNull": false
1761
+ },
1762
+ "error_code": {
1763
+ "name": "error_code",
1764
+ "type": "text",
1765
+ "primaryKey": false,
1766
+ "notNull": false
1767
+ },
1768
+ "external_run_id": {
1769
+ "name": "external_run_id",
1770
+ "type": "text",
1771
+ "primaryKey": false,
1772
+ "notNull": false
1773
+ },
1774
+ "context_snapshot": {
1775
+ "name": "context_snapshot",
1776
+ "type": "jsonb",
1777
+ "primaryKey": false,
1778
+ "notNull": false
1779
+ },
1780
+ "created_at": {
1781
+ "name": "created_at",
1782
+ "type": "timestamp with time zone",
1783
+ "primaryKey": false,
1784
+ "notNull": true,
1785
+ "default": "now()"
1786
+ },
1787
+ "updated_at": {
1788
+ "name": "updated_at",
1789
+ "type": "timestamp with time zone",
1790
+ "primaryKey": false,
1791
+ "notNull": true,
1792
+ "default": "now()"
1793
+ }
1794
+ },
1795
+ "indexes": {
1796
+ "heartbeat_runs_company_agent_started_idx": {
1797
+ "name": "heartbeat_runs_company_agent_started_idx",
1798
+ "columns": [
1799
+ {
1800
+ "expression": "company_id",
1801
+ "isExpression": false,
1802
+ "asc": true,
1803
+ "nulls": "last"
1804
+ },
1805
+ {
1806
+ "expression": "agent_id",
1807
+ "isExpression": false,
1808
+ "asc": true,
1809
+ "nulls": "last"
1810
+ },
1811
+ {
1812
+ "expression": "started_at",
1813
+ "isExpression": false,
1814
+ "asc": true,
1815
+ "nulls": "last"
1816
+ }
1817
+ ],
1818
+ "isUnique": false,
1819
+ "concurrently": false,
1820
+ "method": "btree",
1821
+ "with": {}
1822
+ }
1823
+ },
1824
+ "foreignKeys": {
1825
+ "heartbeat_runs_company_id_companies_id_fk": {
1826
+ "name": "heartbeat_runs_company_id_companies_id_fk",
1827
+ "tableFrom": "heartbeat_runs",
1828
+ "tableTo": "companies",
1829
+ "columnsFrom": [
1830
+ "company_id"
1831
+ ],
1832
+ "columnsTo": [
1833
+ "id"
1834
+ ],
1835
+ "onDelete": "no action",
1836
+ "onUpdate": "no action"
1837
+ },
1838
+ "heartbeat_runs_agent_id_agents_id_fk": {
1839
+ "name": "heartbeat_runs_agent_id_agents_id_fk",
1840
+ "tableFrom": "heartbeat_runs",
1841
+ "tableTo": "agents",
1842
+ "columnsFrom": [
1843
+ "agent_id"
1844
+ ],
1845
+ "columnsTo": [
1846
+ "id"
1847
+ ],
1848
+ "onDelete": "no action",
1849
+ "onUpdate": "no action"
1850
+ }
1851
+ },
1852
+ "compositePrimaryKeys": {},
1853
+ "uniqueConstraints": {},
1854
+ "policies": {},
1855
+ "checkConstraints": {},
1856
+ "isRLSEnabled": false
1857
+ },
1858
+ "public.issue_comments": {
1859
+ "name": "issue_comments",
1860
+ "schema": "",
1861
+ "columns": {
1862
+ "id": {
1863
+ "name": "id",
1864
+ "type": "uuid",
1865
+ "primaryKey": true,
1866
+ "notNull": true,
1867
+ "default": "gen_random_uuid()"
1868
+ },
1869
+ "company_id": {
1870
+ "name": "company_id",
1871
+ "type": "uuid",
1872
+ "primaryKey": false,
1873
+ "notNull": true
1874
+ },
1875
+ "issue_id": {
1876
+ "name": "issue_id",
1877
+ "type": "uuid",
1878
+ "primaryKey": false,
1879
+ "notNull": true
1880
+ },
1881
+ "author_agent_id": {
1882
+ "name": "author_agent_id",
1883
+ "type": "uuid",
1884
+ "primaryKey": false,
1885
+ "notNull": false
1886
+ },
1887
+ "author_user_id": {
1888
+ "name": "author_user_id",
1889
+ "type": "text",
1890
+ "primaryKey": false,
1891
+ "notNull": false
1892
+ },
1893
+ "body": {
1894
+ "name": "body",
1895
+ "type": "text",
1896
+ "primaryKey": false,
1897
+ "notNull": true
1898
+ },
1899
+ "created_at": {
1900
+ "name": "created_at",
1901
+ "type": "timestamp with time zone",
1902
+ "primaryKey": false,
1903
+ "notNull": true,
1904
+ "default": "now()"
1905
+ },
1906
+ "updated_at": {
1907
+ "name": "updated_at",
1908
+ "type": "timestamp with time zone",
1909
+ "primaryKey": false,
1910
+ "notNull": true,
1911
+ "default": "now()"
1912
+ }
1913
+ },
1914
+ "indexes": {
1915
+ "issue_comments_issue_idx": {
1916
+ "name": "issue_comments_issue_idx",
1917
+ "columns": [
1918
+ {
1919
+ "expression": "issue_id",
1920
+ "isExpression": false,
1921
+ "asc": true,
1922
+ "nulls": "last"
1923
+ }
1924
+ ],
1925
+ "isUnique": false,
1926
+ "concurrently": false,
1927
+ "method": "btree",
1928
+ "with": {}
1929
+ },
1930
+ "issue_comments_company_idx": {
1931
+ "name": "issue_comments_company_idx",
1932
+ "columns": [
1933
+ {
1934
+ "expression": "company_id",
1935
+ "isExpression": false,
1936
+ "asc": true,
1937
+ "nulls": "last"
1938
+ }
1939
+ ],
1940
+ "isUnique": false,
1941
+ "concurrently": false,
1942
+ "method": "btree",
1943
+ "with": {}
1944
+ }
1945
+ },
1946
+ "foreignKeys": {
1947
+ "issue_comments_company_id_companies_id_fk": {
1948
+ "name": "issue_comments_company_id_companies_id_fk",
1949
+ "tableFrom": "issue_comments",
1950
+ "tableTo": "companies",
1951
+ "columnsFrom": [
1952
+ "company_id"
1953
+ ],
1954
+ "columnsTo": [
1955
+ "id"
1956
+ ],
1957
+ "onDelete": "no action",
1958
+ "onUpdate": "no action"
1959
+ },
1960
+ "issue_comments_issue_id_issues_id_fk": {
1961
+ "name": "issue_comments_issue_id_issues_id_fk",
1962
+ "tableFrom": "issue_comments",
1963
+ "tableTo": "issues",
1964
+ "columnsFrom": [
1965
+ "issue_id"
1966
+ ],
1967
+ "columnsTo": [
1968
+ "id"
1969
+ ],
1970
+ "onDelete": "no action",
1971
+ "onUpdate": "no action"
1972
+ },
1973
+ "issue_comments_author_agent_id_agents_id_fk": {
1974
+ "name": "issue_comments_author_agent_id_agents_id_fk",
1975
+ "tableFrom": "issue_comments",
1976
+ "tableTo": "agents",
1977
+ "columnsFrom": [
1978
+ "author_agent_id"
1979
+ ],
1980
+ "columnsTo": [
1981
+ "id"
1982
+ ],
1983
+ "onDelete": "no action",
1984
+ "onUpdate": "no action"
1985
+ }
1986
+ },
1987
+ "compositePrimaryKeys": {},
1988
+ "uniqueConstraints": {},
1989
+ "policies": {},
1990
+ "checkConstraints": {},
1991
+ "isRLSEnabled": false
1992
+ },
1993
+ "public.issues": {
1994
+ "name": "issues",
1995
+ "schema": "",
1996
+ "columns": {
1997
+ "id": {
1998
+ "name": "id",
1999
+ "type": "uuid",
2000
+ "primaryKey": true,
2001
+ "notNull": true,
2002
+ "default": "gen_random_uuid()"
2003
+ },
2004
+ "company_id": {
2005
+ "name": "company_id",
2006
+ "type": "uuid",
2007
+ "primaryKey": false,
2008
+ "notNull": true
2009
+ },
2010
+ "project_id": {
2011
+ "name": "project_id",
2012
+ "type": "uuid",
2013
+ "primaryKey": false,
2014
+ "notNull": false
2015
+ },
2016
+ "goal_id": {
2017
+ "name": "goal_id",
2018
+ "type": "uuid",
2019
+ "primaryKey": false,
2020
+ "notNull": false
2021
+ },
2022
+ "parent_id": {
2023
+ "name": "parent_id",
2024
+ "type": "uuid",
2025
+ "primaryKey": false,
2026
+ "notNull": false
2027
+ },
2028
+ "title": {
2029
+ "name": "title",
2030
+ "type": "text",
2031
+ "primaryKey": false,
2032
+ "notNull": true
2033
+ },
2034
+ "description": {
2035
+ "name": "description",
2036
+ "type": "text",
2037
+ "primaryKey": false,
2038
+ "notNull": false
2039
+ },
2040
+ "status": {
2041
+ "name": "status",
2042
+ "type": "text",
2043
+ "primaryKey": false,
2044
+ "notNull": true,
2045
+ "default": "'backlog'"
2046
+ },
2047
+ "priority": {
2048
+ "name": "priority",
2049
+ "type": "text",
2050
+ "primaryKey": false,
2051
+ "notNull": true,
2052
+ "default": "'medium'"
2053
+ },
2054
+ "assignee_agent_id": {
2055
+ "name": "assignee_agent_id",
2056
+ "type": "uuid",
2057
+ "primaryKey": false,
2058
+ "notNull": false
2059
+ },
2060
+ "created_by_agent_id": {
2061
+ "name": "created_by_agent_id",
2062
+ "type": "uuid",
2063
+ "primaryKey": false,
2064
+ "notNull": false
2065
+ },
2066
+ "created_by_user_id": {
2067
+ "name": "created_by_user_id",
2068
+ "type": "text",
2069
+ "primaryKey": false,
2070
+ "notNull": false
2071
+ },
2072
+ "request_depth": {
2073
+ "name": "request_depth",
2074
+ "type": "integer",
2075
+ "primaryKey": false,
2076
+ "notNull": true,
2077
+ "default": 0
2078
+ },
2079
+ "billing_code": {
2080
+ "name": "billing_code",
2081
+ "type": "text",
2082
+ "primaryKey": false,
2083
+ "notNull": false
2084
+ },
2085
+ "started_at": {
2086
+ "name": "started_at",
2087
+ "type": "timestamp with time zone",
2088
+ "primaryKey": false,
2089
+ "notNull": false
2090
+ },
2091
+ "completed_at": {
2092
+ "name": "completed_at",
2093
+ "type": "timestamp with time zone",
2094
+ "primaryKey": false,
2095
+ "notNull": false
2096
+ },
2097
+ "cancelled_at": {
2098
+ "name": "cancelled_at",
2099
+ "type": "timestamp with time zone",
2100
+ "primaryKey": false,
2101
+ "notNull": false
2102
+ },
2103
+ "created_at": {
2104
+ "name": "created_at",
2105
+ "type": "timestamp with time zone",
2106
+ "primaryKey": false,
2107
+ "notNull": true,
2108
+ "default": "now()"
2109
+ },
2110
+ "updated_at": {
2111
+ "name": "updated_at",
2112
+ "type": "timestamp with time zone",
2113
+ "primaryKey": false,
2114
+ "notNull": true,
2115
+ "default": "now()"
2116
+ }
2117
+ },
2118
+ "indexes": {
2119
+ "issues_company_status_idx": {
2120
+ "name": "issues_company_status_idx",
2121
+ "columns": [
2122
+ {
2123
+ "expression": "company_id",
2124
+ "isExpression": false,
2125
+ "asc": true,
2126
+ "nulls": "last"
2127
+ },
2128
+ {
2129
+ "expression": "status",
2130
+ "isExpression": false,
2131
+ "asc": true,
2132
+ "nulls": "last"
2133
+ }
2134
+ ],
2135
+ "isUnique": false,
2136
+ "concurrently": false,
2137
+ "method": "btree",
2138
+ "with": {}
2139
+ },
2140
+ "issues_company_assignee_status_idx": {
2141
+ "name": "issues_company_assignee_status_idx",
2142
+ "columns": [
2143
+ {
2144
+ "expression": "company_id",
2145
+ "isExpression": false,
2146
+ "asc": true,
2147
+ "nulls": "last"
2148
+ },
2149
+ {
2150
+ "expression": "assignee_agent_id",
2151
+ "isExpression": false,
2152
+ "asc": true,
2153
+ "nulls": "last"
2154
+ },
2155
+ {
2156
+ "expression": "status",
2157
+ "isExpression": false,
2158
+ "asc": true,
2159
+ "nulls": "last"
2160
+ }
2161
+ ],
2162
+ "isUnique": false,
2163
+ "concurrently": false,
2164
+ "method": "btree",
2165
+ "with": {}
2166
+ },
2167
+ "issues_company_parent_idx": {
2168
+ "name": "issues_company_parent_idx",
2169
+ "columns": [
2170
+ {
2171
+ "expression": "company_id",
2172
+ "isExpression": false,
2173
+ "asc": true,
2174
+ "nulls": "last"
2175
+ },
2176
+ {
2177
+ "expression": "parent_id",
2178
+ "isExpression": false,
2179
+ "asc": true,
2180
+ "nulls": "last"
2181
+ }
2182
+ ],
2183
+ "isUnique": false,
2184
+ "concurrently": false,
2185
+ "method": "btree",
2186
+ "with": {}
2187
+ },
2188
+ "issues_company_project_idx": {
2189
+ "name": "issues_company_project_idx",
2190
+ "columns": [
2191
+ {
2192
+ "expression": "company_id",
2193
+ "isExpression": false,
2194
+ "asc": true,
2195
+ "nulls": "last"
2196
+ },
2197
+ {
2198
+ "expression": "project_id",
2199
+ "isExpression": false,
2200
+ "asc": true,
2201
+ "nulls": "last"
2202
+ }
2203
+ ],
2204
+ "isUnique": false,
2205
+ "concurrently": false,
2206
+ "method": "btree",
2207
+ "with": {}
2208
+ }
2209
+ },
2210
+ "foreignKeys": {
2211
+ "issues_company_id_companies_id_fk": {
2212
+ "name": "issues_company_id_companies_id_fk",
2213
+ "tableFrom": "issues",
2214
+ "tableTo": "companies",
2215
+ "columnsFrom": [
2216
+ "company_id"
2217
+ ],
2218
+ "columnsTo": [
2219
+ "id"
2220
+ ],
2221
+ "onDelete": "no action",
2222
+ "onUpdate": "no action"
2223
+ },
2224
+ "issues_project_id_projects_id_fk": {
2225
+ "name": "issues_project_id_projects_id_fk",
2226
+ "tableFrom": "issues",
2227
+ "tableTo": "projects",
2228
+ "columnsFrom": [
2229
+ "project_id"
2230
+ ],
2231
+ "columnsTo": [
2232
+ "id"
2233
+ ],
2234
+ "onDelete": "no action",
2235
+ "onUpdate": "no action"
2236
+ },
2237
+ "issues_goal_id_goals_id_fk": {
2238
+ "name": "issues_goal_id_goals_id_fk",
2239
+ "tableFrom": "issues",
2240
+ "tableTo": "goals",
2241
+ "columnsFrom": [
2242
+ "goal_id"
2243
+ ],
2244
+ "columnsTo": [
2245
+ "id"
2246
+ ],
2247
+ "onDelete": "no action",
2248
+ "onUpdate": "no action"
2249
+ },
2250
+ "issues_parent_id_issues_id_fk": {
2251
+ "name": "issues_parent_id_issues_id_fk",
2252
+ "tableFrom": "issues",
2253
+ "tableTo": "issues",
2254
+ "columnsFrom": [
2255
+ "parent_id"
2256
+ ],
2257
+ "columnsTo": [
2258
+ "id"
2259
+ ],
2260
+ "onDelete": "no action",
2261
+ "onUpdate": "no action"
2262
+ },
2263
+ "issues_assignee_agent_id_agents_id_fk": {
2264
+ "name": "issues_assignee_agent_id_agents_id_fk",
2265
+ "tableFrom": "issues",
2266
+ "tableTo": "agents",
2267
+ "columnsFrom": [
2268
+ "assignee_agent_id"
2269
+ ],
2270
+ "columnsTo": [
2271
+ "id"
2272
+ ],
2273
+ "onDelete": "no action",
2274
+ "onUpdate": "no action"
2275
+ },
2276
+ "issues_created_by_agent_id_agents_id_fk": {
2277
+ "name": "issues_created_by_agent_id_agents_id_fk",
2278
+ "tableFrom": "issues",
2279
+ "tableTo": "agents",
2280
+ "columnsFrom": [
2281
+ "created_by_agent_id"
2282
+ ],
2283
+ "columnsTo": [
2284
+ "id"
2285
+ ],
2286
+ "onDelete": "no action",
2287
+ "onUpdate": "no action"
2288
+ }
2289
+ },
2290
+ "compositePrimaryKeys": {},
2291
+ "uniqueConstraints": {},
2292
+ "policies": {},
2293
+ "checkConstraints": {},
2294
+ "isRLSEnabled": false
2295
+ },
2296
+ "public.projects": {
2297
+ "name": "projects",
2298
+ "schema": "",
2299
+ "columns": {
2300
+ "id": {
2301
+ "name": "id",
2302
+ "type": "uuid",
2303
+ "primaryKey": true,
2304
+ "notNull": true,
2305
+ "default": "gen_random_uuid()"
2306
+ },
2307
+ "company_id": {
2308
+ "name": "company_id",
2309
+ "type": "uuid",
2310
+ "primaryKey": false,
2311
+ "notNull": true
2312
+ },
2313
+ "goal_id": {
2314
+ "name": "goal_id",
2315
+ "type": "uuid",
2316
+ "primaryKey": false,
2317
+ "notNull": false
2318
+ },
2319
+ "name": {
2320
+ "name": "name",
2321
+ "type": "text",
2322
+ "primaryKey": false,
2323
+ "notNull": true
2324
+ },
2325
+ "description": {
2326
+ "name": "description",
2327
+ "type": "text",
2328
+ "primaryKey": false,
2329
+ "notNull": false
2330
+ },
2331
+ "status": {
2332
+ "name": "status",
2333
+ "type": "text",
2334
+ "primaryKey": false,
2335
+ "notNull": true,
2336
+ "default": "'backlog'"
2337
+ },
2338
+ "lead_agent_id": {
2339
+ "name": "lead_agent_id",
2340
+ "type": "uuid",
2341
+ "primaryKey": false,
2342
+ "notNull": false
2343
+ },
2344
+ "target_date": {
2345
+ "name": "target_date",
2346
+ "type": "date",
2347
+ "primaryKey": false,
2348
+ "notNull": false
2349
+ },
2350
+ "created_at": {
2351
+ "name": "created_at",
2352
+ "type": "timestamp with time zone",
2353
+ "primaryKey": false,
2354
+ "notNull": true,
2355
+ "default": "now()"
2356
+ },
2357
+ "updated_at": {
2358
+ "name": "updated_at",
2359
+ "type": "timestamp with time zone",
2360
+ "primaryKey": false,
2361
+ "notNull": true,
2362
+ "default": "now()"
2363
+ }
2364
+ },
2365
+ "indexes": {
2366
+ "projects_company_idx": {
2367
+ "name": "projects_company_idx",
2368
+ "columns": [
2369
+ {
2370
+ "expression": "company_id",
2371
+ "isExpression": false,
2372
+ "asc": true,
2373
+ "nulls": "last"
2374
+ }
2375
+ ],
2376
+ "isUnique": false,
2377
+ "concurrently": false,
2378
+ "method": "btree",
2379
+ "with": {}
2380
+ }
2381
+ },
2382
+ "foreignKeys": {
2383
+ "projects_company_id_companies_id_fk": {
2384
+ "name": "projects_company_id_companies_id_fk",
2385
+ "tableFrom": "projects",
2386
+ "tableTo": "companies",
2387
+ "columnsFrom": [
2388
+ "company_id"
2389
+ ],
2390
+ "columnsTo": [
2391
+ "id"
2392
+ ],
2393
+ "onDelete": "no action",
2394
+ "onUpdate": "no action"
2395
+ },
2396
+ "projects_goal_id_goals_id_fk": {
2397
+ "name": "projects_goal_id_goals_id_fk",
2398
+ "tableFrom": "projects",
2399
+ "tableTo": "goals",
2400
+ "columnsFrom": [
2401
+ "goal_id"
2402
+ ],
2403
+ "columnsTo": [
2404
+ "id"
2405
+ ],
2406
+ "onDelete": "no action",
2407
+ "onUpdate": "no action"
2408
+ },
2409
+ "projects_lead_agent_id_agents_id_fk": {
2410
+ "name": "projects_lead_agent_id_agents_id_fk",
2411
+ "tableFrom": "projects",
2412
+ "tableTo": "agents",
2413
+ "columnsFrom": [
2414
+ "lead_agent_id"
2415
+ ],
2416
+ "columnsTo": [
2417
+ "id"
2418
+ ],
2419
+ "onDelete": "no action",
2420
+ "onUpdate": "no action"
2421
+ }
2422
+ },
2423
+ "compositePrimaryKeys": {},
2424
+ "uniqueConstraints": {},
2425
+ "policies": {},
2426
+ "checkConstraints": {},
2427
+ "isRLSEnabled": false
2428
+ }
2429
+ },
2430
+ "enums": {},
2431
+ "schemas": {},
2432
+ "sequences": {},
2433
+ "roles": {},
2434
+ "policies": {},
2435
+ "views": {},
2436
+ "_meta": {
2437
+ "columns": {},
2438
+ "schemas": {},
2439
+ "tables": {}
2440
+ }
2441
+ }