@vinihcrosa/lumem-os 0.6.0 → 0.7.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,2644 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "f7122b27-dc94-4ea9-a5f2-65c51beb25b9",
5
+ "prevId": "a0a96f1c-09c5-490c-bfa4-258e8abe1cb7",
6
+ "tables": {
7
+ "action_signal": {
8
+ "name": "action_signal",
9
+ "columns": {
10
+ "id": {
11
+ "name": "id",
12
+ "type": "text",
13
+ "primaryKey": true,
14
+ "notNull": true,
15
+ "autoincrement": false
16
+ },
17
+ "kind": {
18
+ "name": "kind",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true,
22
+ "autoincrement": false
23
+ },
24
+ "target": {
25
+ "name": "target",
26
+ "type": "text",
27
+ "primaryKey": false,
28
+ "notNull": true,
29
+ "autoincrement": false
30
+ },
31
+ "workspace_id": {
32
+ "name": "workspace_id",
33
+ "type": "text",
34
+ "primaryKey": false,
35
+ "notNull": false,
36
+ "autoincrement": false
37
+ },
38
+ "project_id": {
39
+ "name": "project_id",
40
+ "type": "text",
41
+ "primaryKey": false,
42
+ "notNull": false,
43
+ "autoincrement": false
44
+ },
45
+ "worktree_id": {
46
+ "name": "worktree_id",
47
+ "type": "text",
48
+ "primaryKey": false,
49
+ "notNull": false,
50
+ "autoincrement": false
51
+ },
52
+ "session_id": {
53
+ "name": "session_id",
54
+ "type": "text",
55
+ "primaryKey": false,
56
+ "notNull": false,
57
+ "autoincrement": false
58
+ },
59
+ "detail": {
60
+ "name": "detail",
61
+ "type": "integer",
62
+ "primaryKey": false,
63
+ "notNull": false,
64
+ "autoincrement": false
65
+ },
66
+ "created_at": {
67
+ "name": "created_at",
68
+ "type": "integer",
69
+ "primaryKey": false,
70
+ "notNull": true,
71
+ "autoincrement": false,
72
+ "default": "(unixepoch('subsec') * 1000)"
73
+ },
74
+ "updated_at": {
75
+ "name": "updated_at",
76
+ "type": "integer",
77
+ "primaryKey": false,
78
+ "notNull": true,
79
+ "autoincrement": false,
80
+ "default": "(unixepoch('subsec') * 1000)"
81
+ }
82
+ },
83
+ "indexes": {},
84
+ "foreignKeys": {},
85
+ "compositePrimaryKeys": {},
86
+ "uniqueConstraints": {},
87
+ "checkConstraints": {
88
+ "action_signal_kind": {
89
+ "name": "action_signal_kind",
90
+ "value": "\"action_signal\".\"kind\" IN (\n 'user_edited_after_agent',\n 'user_reverted_agent_commit',\n 'worktree_discarded',\n 'session_killed_early'\n )"
91
+ },
92
+ "action_signal_detail_number": {
93
+ "name": "action_signal_detail_number",
94
+ "value": "\"action_signal\".\"detail\" IS NULL OR typeof(\"action_signal\".\"detail\") = 'integer'"
95
+ },
96
+ "action_signal_target_shape": {
97
+ "name": "action_signal_target_shape",
98
+ "value": "length(\"action_signal\".\"target\") BETWEEN 1 AND 1024\n AND instr(\"action_signal\".\"target\", char(10)) = 0"
99
+ }
100
+ }
101
+ },
102
+ "agent_config": {
103
+ "name": "agent_config",
104
+ "columns": {
105
+ "id": {
106
+ "name": "id",
107
+ "type": "text",
108
+ "primaryKey": true,
109
+ "notNull": true,
110
+ "autoincrement": false
111
+ },
112
+ "name": {
113
+ "name": "name",
114
+ "type": "text",
115
+ "primaryKey": false,
116
+ "notNull": true,
117
+ "autoincrement": false
118
+ },
119
+ "command": {
120
+ "name": "command",
121
+ "type": "text",
122
+ "primaryKey": false,
123
+ "notNull": true,
124
+ "autoincrement": false
125
+ },
126
+ "args": {
127
+ "name": "args",
128
+ "type": "text",
129
+ "primaryKey": false,
130
+ "notNull": true,
131
+ "autoincrement": false,
132
+ "default": "'[]'"
133
+ },
134
+ "env": {
135
+ "name": "env",
136
+ "type": "text",
137
+ "primaryKey": false,
138
+ "notNull": true,
139
+ "autoincrement": false,
140
+ "default": "'{}'"
141
+ },
142
+ "adapter_version": {
143
+ "name": "adapter_version",
144
+ "type": "text",
145
+ "primaryKey": false,
146
+ "notNull": false,
147
+ "autoincrement": false
148
+ },
149
+ "retired_at": {
150
+ "name": "retired_at",
151
+ "type": "integer",
152
+ "primaryKey": false,
153
+ "notNull": false,
154
+ "autoincrement": false
155
+ },
156
+ "created_at": {
157
+ "name": "created_at",
158
+ "type": "integer",
159
+ "primaryKey": false,
160
+ "notNull": true,
161
+ "autoincrement": false,
162
+ "default": "(unixepoch('subsec') * 1000)"
163
+ },
164
+ "updated_at": {
165
+ "name": "updated_at",
166
+ "type": "integer",
167
+ "primaryKey": false,
168
+ "notNull": true,
169
+ "autoincrement": false,
170
+ "default": "(unixepoch('subsec') * 1000)"
171
+ }
172
+ },
173
+ "indexes": {
174
+ "agent_config_name_unique": {
175
+ "name": "agent_config_name_unique",
176
+ "columns": [
177
+ "name"
178
+ ],
179
+ "isUnique": true
180
+ }
181
+ },
182
+ "foreignKeys": {},
183
+ "compositePrimaryKeys": {},
184
+ "uniqueConstraints": {},
185
+ "checkConstraints": {
186
+ "agent_config_adapter_version": {
187
+ "name": "agent_config_adapter_version",
188
+ "value": "\"agent_config\".\"retired_at\" IS NOT NULL OR \"agent_config\".\"adapter_version\" IS NOT NULL"
189
+ }
190
+ }
191
+ },
192
+ "checkout_port": {
193
+ "name": "checkout_port",
194
+ "columns": {
195
+ "id": {
196
+ "name": "id",
197
+ "type": "text",
198
+ "primaryKey": true,
199
+ "notNull": true,
200
+ "autoincrement": false
201
+ },
202
+ "scope_type": {
203
+ "name": "scope_type",
204
+ "type": "text",
205
+ "primaryKey": false,
206
+ "notNull": true,
207
+ "autoincrement": false
208
+ },
209
+ "scope_id": {
210
+ "name": "scope_id",
211
+ "type": "text",
212
+ "primaryKey": false,
213
+ "notNull": true,
214
+ "autoincrement": false
215
+ },
216
+ "port": {
217
+ "name": "port",
218
+ "type": "integer",
219
+ "primaryKey": false,
220
+ "notNull": true,
221
+ "autoincrement": false
222
+ },
223
+ "created_at": {
224
+ "name": "created_at",
225
+ "type": "integer",
226
+ "primaryKey": false,
227
+ "notNull": true,
228
+ "autoincrement": false,
229
+ "default": "(unixepoch('subsec') * 1000)"
230
+ },
231
+ "updated_at": {
232
+ "name": "updated_at",
233
+ "type": "integer",
234
+ "primaryKey": false,
235
+ "notNull": true,
236
+ "autoincrement": false,
237
+ "default": "(unixepoch('subsec') * 1000)"
238
+ }
239
+ },
240
+ "indexes": {
241
+ "checkout_port_scope": {
242
+ "name": "checkout_port_scope",
243
+ "columns": [
244
+ "scope_type",
245
+ "scope_id"
246
+ ],
247
+ "isUnique": true
248
+ },
249
+ "checkout_port_port": {
250
+ "name": "checkout_port_port",
251
+ "columns": [
252
+ "port"
253
+ ],
254
+ "isUnique": true
255
+ }
256
+ },
257
+ "foreignKeys": {},
258
+ "compositePrimaryKeys": {},
259
+ "uniqueConstraints": {},
260
+ "checkConstraints": {
261
+ "checkout_port_scope_type": {
262
+ "name": "checkout_port_scope_type",
263
+ "value": "\"checkout_port\".\"scope_type\" IN ('project', 'worktree')"
264
+ },
265
+ "checkout_port_range": {
266
+ "name": "checkout_port_range",
267
+ "value": "\"checkout_port\".\"port\" > 0 AND \"checkout_port\".\"port\" < 65536"
268
+ }
269
+ }
270
+ },
271
+ "memory_access": {
272
+ "name": "memory_access",
273
+ "columns": {
274
+ "id": {
275
+ "name": "id",
276
+ "type": "text",
277
+ "primaryKey": true,
278
+ "notNull": true,
279
+ "autoincrement": false
280
+ },
281
+ "workspace_id": {
282
+ "name": "workspace_id",
283
+ "type": "text",
284
+ "primaryKey": false,
285
+ "notNull": false,
286
+ "autoincrement": false
287
+ },
288
+ "from_project_id": {
289
+ "name": "from_project_id",
290
+ "type": "text",
291
+ "primaryKey": false,
292
+ "notNull": false,
293
+ "autoincrement": false
294
+ },
295
+ "target_project_id": {
296
+ "name": "target_project_id",
297
+ "type": "text",
298
+ "primaryKey": false,
299
+ "notNull": false,
300
+ "autoincrement": false
301
+ },
302
+ "kind": {
303
+ "name": "kind",
304
+ "type": "text",
305
+ "primaryKey": false,
306
+ "notNull": true,
307
+ "autoincrement": false
308
+ },
309
+ "target": {
310
+ "name": "target",
311
+ "type": "text",
312
+ "primaryKey": false,
313
+ "notNull": true,
314
+ "autoincrement": false
315
+ },
316
+ "decision": {
317
+ "name": "decision",
318
+ "type": "text",
319
+ "primaryKey": false,
320
+ "notNull": true,
321
+ "autoincrement": false
322
+ },
323
+ "reason": {
324
+ "name": "reason",
325
+ "type": "text",
326
+ "primaryKey": false,
327
+ "notNull": false,
328
+ "autoincrement": false
329
+ },
330
+ "actor": {
331
+ "name": "actor",
332
+ "type": "text",
333
+ "primaryKey": false,
334
+ "notNull": true,
335
+ "autoincrement": false
336
+ },
337
+ "created_at": {
338
+ "name": "created_at",
339
+ "type": "integer",
340
+ "primaryKey": false,
341
+ "notNull": true,
342
+ "autoincrement": false,
343
+ "default": "(unixepoch('subsec') * 1000)"
344
+ },
345
+ "updated_at": {
346
+ "name": "updated_at",
347
+ "type": "integer",
348
+ "primaryKey": false,
349
+ "notNull": true,
350
+ "autoincrement": false,
351
+ "default": "(unixepoch('subsec') * 1000)"
352
+ }
353
+ },
354
+ "indexes": {},
355
+ "foreignKeys": {},
356
+ "compositePrimaryKeys": {},
357
+ "uniqueConstraints": {},
358
+ "checkConstraints": {
359
+ "memory_access_kind": {
360
+ "name": "memory_access_kind",
361
+ "value": "\"memory_access\".\"kind\" IN ('memory', 'repository')"
362
+ },
363
+ "memory_access_decision": {
364
+ "name": "memory_access_decision",
365
+ "value": "\"memory_access\".\"decision\" IN ('allowed', 'denied')"
366
+ }
367
+ }
368
+ },
369
+ "memory_decision": {
370
+ "name": "memory_decision",
371
+ "columns": {
372
+ "id": {
373
+ "name": "id",
374
+ "type": "text",
375
+ "primaryKey": true,
376
+ "notNull": true,
377
+ "autoincrement": false
378
+ },
379
+ "idempotency_key": {
380
+ "name": "idempotency_key",
381
+ "type": "text",
382
+ "primaryKey": false,
383
+ "notNull": true,
384
+ "autoincrement": false
385
+ },
386
+ "path": {
387
+ "name": "path",
388
+ "type": "text",
389
+ "primaryKey": false,
390
+ "notNull": true,
391
+ "autoincrement": false
392
+ },
393
+ "operation": {
394
+ "name": "operation",
395
+ "type": "text",
396
+ "primaryKey": false,
397
+ "notNull": true,
398
+ "autoincrement": false
399
+ },
400
+ "outcome": {
401
+ "name": "outcome",
402
+ "type": "text",
403
+ "primaryKey": false,
404
+ "notNull": true,
405
+ "autoincrement": false
406
+ },
407
+ "actor": {
408
+ "name": "actor",
409
+ "type": "text",
410
+ "primaryKey": false,
411
+ "notNull": true,
412
+ "autoincrement": false
413
+ },
414
+ "confidence": {
415
+ "name": "confidence",
416
+ "type": "text",
417
+ "primaryKey": false,
418
+ "notNull": true,
419
+ "autoincrement": false
420
+ },
421
+ "candidate_hash": {
422
+ "name": "candidate_hash",
423
+ "type": "text",
424
+ "primaryKey": false,
425
+ "notNull": true,
426
+ "autoincrement": false
427
+ },
428
+ "rule_trace": {
429
+ "name": "rule_trace",
430
+ "type": "text",
431
+ "primaryKey": false,
432
+ "notNull": true,
433
+ "autoincrement": false,
434
+ "default": "'[]'"
435
+ },
436
+ "source_sessions": {
437
+ "name": "source_sessions",
438
+ "type": "text",
439
+ "primaryKey": false,
440
+ "notNull": true,
441
+ "autoincrement": false,
442
+ "default": "'[]'"
443
+ },
444
+ "reason": {
445
+ "name": "reason",
446
+ "type": "text",
447
+ "primaryKey": false,
448
+ "notNull": false,
449
+ "autoincrement": false
450
+ },
451
+ "commit_sha": {
452
+ "name": "commit_sha",
453
+ "type": "text",
454
+ "primaryKey": false,
455
+ "notNull": false,
456
+ "autoincrement": false
457
+ },
458
+ "created_at": {
459
+ "name": "created_at",
460
+ "type": "integer",
461
+ "primaryKey": false,
462
+ "notNull": true,
463
+ "autoincrement": false,
464
+ "default": "(unixepoch('subsec') * 1000)"
465
+ },
466
+ "updated_at": {
467
+ "name": "updated_at",
468
+ "type": "integer",
469
+ "primaryKey": false,
470
+ "notNull": true,
471
+ "autoincrement": false,
472
+ "default": "(unixepoch('subsec') * 1000)"
473
+ }
474
+ },
475
+ "indexes": {
476
+ "memory_decision_idempotency_key_unique": {
477
+ "name": "memory_decision_idempotency_key_unique",
478
+ "columns": [
479
+ "idempotency_key"
480
+ ],
481
+ "isUnique": true
482
+ }
483
+ },
484
+ "foreignKeys": {},
485
+ "compositePrimaryKeys": {},
486
+ "uniqueConstraints": {},
487
+ "checkConstraints": {
488
+ "memory_decision_operation": {
489
+ "name": "memory_decision_operation",
490
+ "value": "\"memory_decision\".\"operation\" IN ('add', 'update', 'delete')"
491
+ },
492
+ "memory_decision_outcome": {
493
+ "name": "memory_decision_outcome",
494
+ "value": "\"memory_decision\".\"outcome\" IN ('applied', 'noop', 'rejected')"
495
+ }
496
+ }
497
+ },
498
+ "memory_entry": {
499
+ "name": "memory_entry",
500
+ "columns": {
501
+ "id": {
502
+ "name": "id",
503
+ "type": "text",
504
+ "primaryKey": true,
505
+ "notNull": true,
506
+ "autoincrement": false
507
+ },
508
+ "path": {
509
+ "name": "path",
510
+ "type": "text",
511
+ "primaryKey": false,
512
+ "notNull": true,
513
+ "autoincrement": false
514
+ },
515
+ "type": {
516
+ "name": "type",
517
+ "type": "text",
518
+ "primaryKey": false,
519
+ "notNull": true,
520
+ "autoincrement": false
521
+ },
522
+ "scope": {
523
+ "name": "scope",
524
+ "type": "text",
525
+ "primaryKey": false,
526
+ "notNull": true,
527
+ "autoincrement": false
528
+ },
529
+ "slug": {
530
+ "name": "slug",
531
+ "type": "text",
532
+ "primaryKey": false,
533
+ "notNull": true,
534
+ "autoincrement": false
535
+ },
536
+ "workspace_id": {
537
+ "name": "workspace_id",
538
+ "type": "text",
539
+ "primaryKey": false,
540
+ "notNull": true,
541
+ "autoincrement": false,
542
+ "default": "''"
543
+ },
544
+ "project_id": {
545
+ "name": "project_id",
546
+ "type": "text",
547
+ "primaryKey": false,
548
+ "notNull": true,
549
+ "autoincrement": false,
550
+ "default": "''"
551
+ },
552
+ "name": {
553
+ "name": "name",
554
+ "type": "text",
555
+ "primaryKey": false,
556
+ "notNull": true,
557
+ "autoincrement": false
558
+ },
559
+ "description": {
560
+ "name": "description",
561
+ "type": "text",
562
+ "primaryKey": false,
563
+ "notNull": true,
564
+ "autoincrement": false
565
+ },
566
+ "source_actor": {
567
+ "name": "source_actor",
568
+ "type": "text",
569
+ "primaryKey": false,
570
+ "notNull": true,
571
+ "autoincrement": false
572
+ },
573
+ "confidence": {
574
+ "name": "confidence",
575
+ "type": "text",
576
+ "primaryKey": false,
577
+ "notNull": true,
578
+ "autoincrement": false
579
+ },
580
+ "pinned": {
581
+ "name": "pinned",
582
+ "type": "integer",
583
+ "primaryKey": false,
584
+ "notNull": true,
585
+ "autoincrement": false,
586
+ "default": false
587
+ },
588
+ "content_hash": {
589
+ "name": "content_hash",
590
+ "type": "text",
591
+ "primaryKey": false,
592
+ "notNull": true,
593
+ "autoincrement": false
594
+ },
595
+ "created_at": {
596
+ "name": "created_at",
597
+ "type": "integer",
598
+ "primaryKey": false,
599
+ "notNull": true,
600
+ "autoincrement": false,
601
+ "default": "(unixepoch('subsec') * 1000)"
602
+ },
603
+ "updated_at": {
604
+ "name": "updated_at",
605
+ "type": "integer",
606
+ "primaryKey": false,
607
+ "notNull": true,
608
+ "autoincrement": false,
609
+ "default": "(unixepoch('subsec') * 1000)"
610
+ }
611
+ },
612
+ "indexes": {
613
+ "memory_entry_path_unique": {
614
+ "name": "memory_entry_path_unique",
615
+ "columns": [
616
+ "path"
617
+ ],
618
+ "isUnique": true
619
+ },
620
+ "memory_entry_identity": {
621
+ "name": "memory_entry_identity",
622
+ "columns": [
623
+ "scope",
624
+ "workspace_id",
625
+ "project_id",
626
+ "type",
627
+ "slug"
628
+ ],
629
+ "isUnique": true
630
+ }
631
+ },
632
+ "foreignKeys": {},
633
+ "compositePrimaryKeys": {},
634
+ "uniqueConstraints": {},
635
+ "checkConstraints": {
636
+ "memory_entry_type": {
637
+ "name": "memory_entry_type",
638
+ "value": "\"memory_entry\".\"type\" IN ('user', 'feedback', 'project', 'domain', 'process', 'contract', 'reference')"
639
+ },
640
+ "memory_entry_scope": {
641
+ "name": "memory_entry_scope",
642
+ "value": "\"memory_entry\".\"scope\" IN ('global', 'workspace', 'project')"
643
+ }
644
+ }
645
+ },
646
+ "memory_proposal": {
647
+ "name": "memory_proposal",
648
+ "columns": {
649
+ "id": {
650
+ "name": "id",
651
+ "type": "text",
652
+ "primaryKey": true,
653
+ "notNull": true,
654
+ "autoincrement": false
655
+ },
656
+ "path": {
657
+ "name": "path",
658
+ "type": "text",
659
+ "primaryKey": false,
660
+ "notNull": true,
661
+ "autoincrement": false
662
+ },
663
+ "type": {
664
+ "name": "type",
665
+ "type": "text",
666
+ "primaryKey": false,
667
+ "notNull": true,
668
+ "autoincrement": false
669
+ },
670
+ "scope": {
671
+ "name": "scope",
672
+ "type": "text",
673
+ "primaryKey": false,
674
+ "notNull": true,
675
+ "autoincrement": false
676
+ },
677
+ "slug": {
678
+ "name": "slug",
679
+ "type": "text",
680
+ "primaryKey": false,
681
+ "notNull": true,
682
+ "autoincrement": false
683
+ },
684
+ "workspace_id": {
685
+ "name": "workspace_id",
686
+ "type": "text",
687
+ "primaryKey": false,
688
+ "notNull": false,
689
+ "autoincrement": false
690
+ },
691
+ "project_id": {
692
+ "name": "project_id",
693
+ "type": "text",
694
+ "primaryKey": false,
695
+ "notNull": false,
696
+ "autoincrement": false
697
+ },
698
+ "name": {
699
+ "name": "name",
700
+ "type": "text",
701
+ "primaryKey": false,
702
+ "notNull": true,
703
+ "autoincrement": false
704
+ },
705
+ "description": {
706
+ "name": "description",
707
+ "type": "text",
708
+ "primaryKey": false,
709
+ "notNull": true,
710
+ "autoincrement": false
711
+ },
712
+ "body": {
713
+ "name": "body",
714
+ "type": "text",
715
+ "primaryKey": false,
716
+ "notNull": true,
717
+ "autoincrement": false,
718
+ "default": "''"
719
+ },
720
+ "actor": {
721
+ "name": "actor",
722
+ "type": "text",
723
+ "primaryKey": false,
724
+ "notNull": true,
725
+ "autoincrement": false
726
+ },
727
+ "from_project_id": {
728
+ "name": "from_project_id",
729
+ "type": "text",
730
+ "primaryKey": false,
731
+ "notNull": false,
732
+ "autoincrement": false
733
+ },
734
+ "session_id": {
735
+ "name": "session_id",
736
+ "type": "text",
737
+ "primaryKey": false,
738
+ "notNull": false,
739
+ "autoincrement": false
740
+ },
741
+ "confidence": {
742
+ "name": "confidence",
743
+ "type": "text",
744
+ "primaryKey": false,
745
+ "notNull": true,
746
+ "autoincrement": false
747
+ },
748
+ "evidence": {
749
+ "name": "evidence",
750
+ "type": "text",
751
+ "primaryKey": false,
752
+ "notNull": false,
753
+ "autoincrement": false
754
+ },
755
+ "status": {
756
+ "name": "status",
757
+ "type": "text",
758
+ "primaryKey": false,
759
+ "notNull": true,
760
+ "autoincrement": false,
761
+ "default": "'pending'"
762
+ },
763
+ "resolved_at": {
764
+ "name": "resolved_at",
765
+ "type": "integer",
766
+ "primaryKey": false,
767
+ "notNull": false,
768
+ "autoincrement": false
769
+ },
770
+ "resolution_note": {
771
+ "name": "resolution_note",
772
+ "type": "text",
773
+ "primaryKey": false,
774
+ "notNull": false,
775
+ "autoincrement": false
776
+ },
777
+ "created_at": {
778
+ "name": "created_at",
779
+ "type": "integer",
780
+ "primaryKey": false,
781
+ "notNull": true,
782
+ "autoincrement": false,
783
+ "default": "(unixepoch('subsec') * 1000)"
784
+ },
785
+ "updated_at": {
786
+ "name": "updated_at",
787
+ "type": "integer",
788
+ "primaryKey": false,
789
+ "notNull": true,
790
+ "autoincrement": false,
791
+ "default": "(unixepoch('subsec') * 1000)"
792
+ }
793
+ },
794
+ "indexes": {},
795
+ "foreignKeys": {},
796
+ "compositePrimaryKeys": {},
797
+ "uniqueConstraints": {},
798
+ "checkConstraints": {
799
+ "memory_proposal_status": {
800
+ "name": "memory_proposal_status",
801
+ "value": "\"memory_proposal\".\"status\" IN ('pending', 'approved', 'rejected')"
802
+ },
803
+ "memory_proposal_type": {
804
+ "name": "memory_proposal_type",
805
+ "value": "\"memory_proposal\".\"type\" IN ('user', 'feedback', 'project', 'domain', 'process', 'contract', 'reference')"
806
+ },
807
+ "memory_proposal_scope": {
808
+ "name": "memory_proposal_scope",
809
+ "value": "\"memory_proposal\".\"scope\" IN ('global', 'workspace', 'project')"
810
+ },
811
+ "memory_proposal_actor": {
812
+ "name": "memory_proposal_actor",
813
+ "value": "\"memory_proposal\".\"actor\" IN ('human', 'agent', 'distiller', 'auto_research', 'import')"
814
+ },
815
+ "memory_proposal_confidence": {
816
+ "name": "memory_proposal_confidence",
817
+ "value": "\"memory_proposal\".\"confidence\" IN ('low', 'medium', 'high')"
818
+ }
819
+ }
820
+ },
821
+ "memory_signal": {
822
+ "name": "memory_signal",
823
+ "columns": {
824
+ "path": {
825
+ "name": "path",
826
+ "type": "text",
827
+ "primaryKey": true,
828
+ "notNull": true,
829
+ "autoincrement": false
830
+ },
831
+ "recall_count": {
832
+ "name": "recall_count",
833
+ "type": "integer",
834
+ "primaryKey": false,
835
+ "notNull": true,
836
+ "autoincrement": false,
837
+ "default": 0
838
+ },
839
+ "last_recalled_at": {
840
+ "name": "last_recalled_at",
841
+ "type": "integer",
842
+ "primaryKey": false,
843
+ "notNull": false,
844
+ "autoincrement": false
845
+ },
846
+ "best_score": {
847
+ "name": "best_score",
848
+ "type": "real",
849
+ "primaryKey": false,
850
+ "notNull": true,
851
+ "autoincrement": false,
852
+ "default": 0
853
+ },
854
+ "created_at": {
855
+ "name": "created_at",
856
+ "type": "integer",
857
+ "primaryKey": false,
858
+ "notNull": true,
859
+ "autoincrement": false,
860
+ "default": "(unixepoch('subsec') * 1000)"
861
+ },
862
+ "updated_at": {
863
+ "name": "updated_at",
864
+ "type": "integer",
865
+ "primaryKey": false,
866
+ "notNull": true,
867
+ "autoincrement": false,
868
+ "default": "(unixepoch('subsec') * 1000)"
869
+ }
870
+ },
871
+ "indexes": {},
872
+ "foreignKeys": {},
873
+ "compositePrimaryKeys": {},
874
+ "uniqueConstraints": {},
875
+ "checkConstraints": {}
876
+ },
877
+ "memory_usage": {
878
+ "name": "memory_usage",
879
+ "columns": {
880
+ "id": {
881
+ "name": "id",
882
+ "type": "text",
883
+ "primaryKey": true,
884
+ "notNull": true,
885
+ "autoincrement": false
886
+ },
887
+ "kind": {
888
+ "name": "kind",
889
+ "type": "text",
890
+ "primaryKey": false,
891
+ "notNull": true,
892
+ "autoincrement": false
893
+ },
894
+ "session_id": {
895
+ "name": "session_id",
896
+ "type": "text",
897
+ "primaryKey": false,
898
+ "notNull": false,
899
+ "autoincrement": false
900
+ },
901
+ "workspace_id": {
902
+ "name": "workspace_id",
903
+ "type": "text",
904
+ "primaryKey": false,
905
+ "notNull": false,
906
+ "autoincrement": false
907
+ },
908
+ "project_id": {
909
+ "name": "project_id",
910
+ "type": "text",
911
+ "primaryKey": false,
912
+ "notNull": false,
913
+ "autoincrement": false
914
+ },
915
+ "amount": {
916
+ "name": "amount",
917
+ "type": "integer",
918
+ "primaryKey": false,
919
+ "notNull": true,
920
+ "autoincrement": false,
921
+ "default": 0
922
+ },
923
+ "duration_ms": {
924
+ "name": "duration_ms",
925
+ "type": "integer",
926
+ "primaryKey": false,
927
+ "notNull": true,
928
+ "autoincrement": false,
929
+ "default": 0
930
+ },
931
+ "created_at": {
932
+ "name": "created_at",
933
+ "type": "integer",
934
+ "primaryKey": false,
935
+ "notNull": true,
936
+ "autoincrement": false,
937
+ "default": "(unixepoch('subsec') * 1000)"
938
+ },
939
+ "updated_at": {
940
+ "name": "updated_at",
941
+ "type": "integer",
942
+ "primaryKey": false,
943
+ "notNull": true,
944
+ "autoincrement": false,
945
+ "default": "(unixepoch('subsec') * 1000)"
946
+ }
947
+ },
948
+ "indexes": {},
949
+ "foreignKeys": {},
950
+ "compositePrimaryKeys": {},
951
+ "uniqueConstraints": {},
952
+ "checkConstraints": {}
953
+ },
954
+ "named_agent": {
955
+ "name": "named_agent",
956
+ "columns": {
957
+ "id": {
958
+ "name": "id",
959
+ "type": "text",
960
+ "primaryKey": true,
961
+ "notNull": true,
962
+ "autoincrement": false
963
+ },
964
+ "workspace_id": {
965
+ "name": "workspace_id",
966
+ "type": "text",
967
+ "primaryKey": false,
968
+ "notNull": true,
969
+ "autoincrement": false
970
+ },
971
+ "name": {
972
+ "name": "name",
973
+ "type": "text",
974
+ "primaryKey": false,
975
+ "notNull": true,
976
+ "autoincrement": false
977
+ },
978
+ "adapter": {
979
+ "name": "adapter",
980
+ "type": "text",
981
+ "primaryKey": false,
982
+ "notNull": true,
983
+ "autoincrement": false
984
+ },
985
+ "model": {
986
+ "name": "model",
987
+ "type": "text",
988
+ "primaryKey": false,
989
+ "notNull": false,
990
+ "autoincrement": false
991
+ },
992
+ "instructions": {
993
+ "name": "instructions",
994
+ "type": "text",
995
+ "primaryKey": false,
996
+ "notNull": true,
997
+ "autoincrement": false,
998
+ "default": "''"
999
+ },
1000
+ "created_at": {
1001
+ "name": "created_at",
1002
+ "type": "integer",
1003
+ "primaryKey": false,
1004
+ "notNull": true,
1005
+ "autoincrement": false,
1006
+ "default": "(unixepoch('subsec') * 1000)"
1007
+ },
1008
+ "updated_at": {
1009
+ "name": "updated_at",
1010
+ "type": "integer",
1011
+ "primaryKey": false,
1012
+ "notNull": true,
1013
+ "autoincrement": false,
1014
+ "default": "(unixepoch('subsec') * 1000)"
1015
+ }
1016
+ },
1017
+ "indexes": {
1018
+ "named_agent_name_in_workspace": {
1019
+ "name": "named_agent_name_in_workspace",
1020
+ "columns": [
1021
+ "workspace_id",
1022
+ "name"
1023
+ ],
1024
+ "isUnique": true
1025
+ }
1026
+ },
1027
+ "foreignKeys": {
1028
+ "named_agent_workspace_id_workspace_id_fk": {
1029
+ "name": "named_agent_workspace_id_workspace_id_fk",
1030
+ "tableFrom": "named_agent",
1031
+ "tableTo": "workspace",
1032
+ "columnsFrom": [
1033
+ "workspace_id"
1034
+ ],
1035
+ "columnsTo": [
1036
+ "id"
1037
+ ],
1038
+ "onDelete": "restrict",
1039
+ "onUpdate": "no action"
1040
+ }
1041
+ },
1042
+ "compositePrimaryKeys": {},
1043
+ "uniqueConstraints": {},
1044
+ "checkConstraints": {}
1045
+ },
1046
+ "playbook": {
1047
+ "name": "playbook",
1048
+ "columns": {
1049
+ "id": {
1050
+ "name": "id",
1051
+ "type": "text",
1052
+ "primaryKey": true,
1053
+ "notNull": true,
1054
+ "autoincrement": false
1055
+ },
1056
+ "path": {
1057
+ "name": "path",
1058
+ "type": "text",
1059
+ "primaryKey": false,
1060
+ "notNull": true,
1061
+ "autoincrement": false
1062
+ },
1063
+ "scope": {
1064
+ "name": "scope",
1065
+ "type": "text",
1066
+ "primaryKey": false,
1067
+ "notNull": true,
1068
+ "autoincrement": false
1069
+ },
1070
+ "slug": {
1071
+ "name": "slug",
1072
+ "type": "text",
1073
+ "primaryKey": false,
1074
+ "notNull": true,
1075
+ "autoincrement": false
1076
+ },
1077
+ "workspace_id": {
1078
+ "name": "workspace_id",
1079
+ "type": "text",
1080
+ "primaryKey": false,
1081
+ "notNull": true,
1082
+ "autoincrement": false,
1083
+ "default": "''"
1084
+ },
1085
+ "project_id": {
1086
+ "name": "project_id",
1087
+ "type": "text",
1088
+ "primaryKey": false,
1089
+ "notNull": true,
1090
+ "autoincrement": false,
1091
+ "default": "''"
1092
+ },
1093
+ "task_class": {
1094
+ "name": "task_class",
1095
+ "type": "text",
1096
+ "primaryKey": false,
1097
+ "notNull": true,
1098
+ "autoincrement": false
1099
+ },
1100
+ "description": {
1101
+ "name": "description",
1102
+ "type": "text",
1103
+ "primaryKey": false,
1104
+ "notNull": true,
1105
+ "autoincrement": false
1106
+ },
1107
+ "pinned": {
1108
+ "name": "pinned",
1109
+ "type": "integer",
1110
+ "primaryKey": false,
1111
+ "notNull": true,
1112
+ "autoincrement": false,
1113
+ "default": false
1114
+ },
1115
+ "archived": {
1116
+ "name": "archived",
1117
+ "type": "integer",
1118
+ "primaryKey": false,
1119
+ "notNull": true,
1120
+ "autoincrement": false,
1121
+ "default": false
1122
+ },
1123
+ "loads": {
1124
+ "name": "loads",
1125
+ "type": "integer",
1126
+ "primaryKey": false,
1127
+ "notNull": true,
1128
+ "autoincrement": false,
1129
+ "default": 0
1130
+ },
1131
+ "last_loaded_at": {
1132
+ "name": "last_loaded_at",
1133
+ "type": "integer",
1134
+ "primaryKey": false,
1135
+ "notNull": false,
1136
+ "autoincrement": false
1137
+ },
1138
+ "content_hash": {
1139
+ "name": "content_hash",
1140
+ "type": "text",
1141
+ "primaryKey": false,
1142
+ "notNull": true,
1143
+ "autoincrement": false
1144
+ },
1145
+ "created_at": {
1146
+ "name": "created_at",
1147
+ "type": "integer",
1148
+ "primaryKey": false,
1149
+ "notNull": true,
1150
+ "autoincrement": false,
1151
+ "default": "(unixepoch('subsec') * 1000)"
1152
+ },
1153
+ "updated_at": {
1154
+ "name": "updated_at",
1155
+ "type": "integer",
1156
+ "primaryKey": false,
1157
+ "notNull": true,
1158
+ "autoincrement": false,
1159
+ "default": "(unixepoch('subsec') * 1000)"
1160
+ }
1161
+ },
1162
+ "indexes": {
1163
+ "playbook_path_unique": {
1164
+ "name": "playbook_path_unique",
1165
+ "columns": [
1166
+ "path"
1167
+ ],
1168
+ "isUnique": true
1169
+ },
1170
+ "playbook_identity": {
1171
+ "name": "playbook_identity",
1172
+ "columns": [
1173
+ "scope",
1174
+ "workspace_id",
1175
+ "project_id",
1176
+ "slug"
1177
+ ],
1178
+ "isUnique": true
1179
+ }
1180
+ },
1181
+ "foreignKeys": {},
1182
+ "compositePrimaryKeys": {},
1183
+ "uniqueConstraints": {},
1184
+ "checkConstraints": {
1185
+ "playbook_scope": {
1186
+ "name": "playbook_scope",
1187
+ "value": "\"playbook\".\"scope\" IN ('workspace', 'project')"
1188
+ }
1189
+ }
1190
+ },
1191
+ "project": {
1192
+ "name": "project",
1193
+ "columns": {
1194
+ "id": {
1195
+ "name": "id",
1196
+ "type": "text",
1197
+ "primaryKey": true,
1198
+ "notNull": true,
1199
+ "autoincrement": false
1200
+ },
1201
+ "workspace_id": {
1202
+ "name": "workspace_id",
1203
+ "type": "text",
1204
+ "primaryKey": false,
1205
+ "notNull": true,
1206
+ "autoincrement": false
1207
+ },
1208
+ "name": {
1209
+ "name": "name",
1210
+ "type": "text",
1211
+ "primaryKey": false,
1212
+ "notNull": true,
1213
+ "autoincrement": false
1214
+ },
1215
+ "path": {
1216
+ "name": "path",
1217
+ "type": "text",
1218
+ "primaryKey": false,
1219
+ "notNull": true,
1220
+ "autoincrement": false
1221
+ },
1222
+ "default_branch": {
1223
+ "name": "default_branch",
1224
+ "type": "text",
1225
+ "primaryKey": false,
1226
+ "notNull": true,
1227
+ "autoincrement": false
1228
+ },
1229
+ "remote_url": {
1230
+ "name": "remote_url",
1231
+ "type": "text",
1232
+ "primaryKey": false,
1233
+ "notNull": false,
1234
+ "autoincrement": false
1235
+ },
1236
+ "managed": {
1237
+ "name": "managed",
1238
+ "type": "integer",
1239
+ "primaryKey": false,
1240
+ "notNull": true,
1241
+ "autoincrement": false,
1242
+ "default": false
1243
+ },
1244
+ "scripts_trusted_hash": {
1245
+ "name": "scripts_trusted_hash",
1246
+ "type": "text",
1247
+ "primaryKey": false,
1248
+ "notNull": false,
1249
+ "autoincrement": false
1250
+ },
1251
+ "created_at": {
1252
+ "name": "created_at",
1253
+ "type": "integer",
1254
+ "primaryKey": false,
1255
+ "notNull": true,
1256
+ "autoincrement": false,
1257
+ "default": "(unixepoch('subsec') * 1000)"
1258
+ },
1259
+ "updated_at": {
1260
+ "name": "updated_at",
1261
+ "type": "integer",
1262
+ "primaryKey": false,
1263
+ "notNull": true,
1264
+ "autoincrement": false,
1265
+ "default": "(unixepoch('subsec') * 1000)"
1266
+ }
1267
+ },
1268
+ "indexes": {
1269
+ "project_path_unique": {
1270
+ "name": "project_path_unique",
1271
+ "columns": [
1272
+ "path"
1273
+ ],
1274
+ "isUnique": true
1275
+ },
1276
+ "project_name_per_workspace": {
1277
+ "name": "project_name_per_workspace",
1278
+ "columns": [
1279
+ "workspace_id",
1280
+ "name"
1281
+ ],
1282
+ "isUnique": true
1283
+ }
1284
+ },
1285
+ "foreignKeys": {
1286
+ "project_workspace_id_workspace_id_fk": {
1287
+ "name": "project_workspace_id_workspace_id_fk",
1288
+ "tableFrom": "project",
1289
+ "tableTo": "workspace",
1290
+ "columnsFrom": [
1291
+ "workspace_id"
1292
+ ],
1293
+ "columnsTo": [
1294
+ "id"
1295
+ ],
1296
+ "onDelete": "restrict",
1297
+ "onUpdate": "no action"
1298
+ }
1299
+ },
1300
+ "compositePrimaryKeys": {},
1301
+ "uniqueConstraints": {},
1302
+ "checkConstraints": {}
1303
+ },
1304
+ "role_binding": {
1305
+ "name": "role_binding",
1306
+ "columns": {
1307
+ "id": {
1308
+ "name": "id",
1309
+ "type": "text",
1310
+ "primaryKey": true,
1311
+ "notNull": true,
1312
+ "autoincrement": false
1313
+ },
1314
+ "scope_type": {
1315
+ "name": "scope_type",
1316
+ "type": "text",
1317
+ "primaryKey": false,
1318
+ "notNull": true,
1319
+ "autoincrement": false
1320
+ },
1321
+ "scope_id": {
1322
+ "name": "scope_id",
1323
+ "type": "text",
1324
+ "primaryKey": false,
1325
+ "notNull": true,
1326
+ "autoincrement": false
1327
+ },
1328
+ "role": {
1329
+ "name": "role",
1330
+ "type": "text",
1331
+ "primaryKey": false,
1332
+ "notNull": true,
1333
+ "autoincrement": false
1334
+ },
1335
+ "agent_id": {
1336
+ "name": "agent_id",
1337
+ "type": "text",
1338
+ "primaryKey": false,
1339
+ "notNull": true,
1340
+ "autoincrement": false
1341
+ },
1342
+ "created_at": {
1343
+ "name": "created_at",
1344
+ "type": "integer",
1345
+ "primaryKey": false,
1346
+ "notNull": true,
1347
+ "autoincrement": false,
1348
+ "default": "(unixepoch('subsec') * 1000)"
1349
+ },
1350
+ "updated_at": {
1351
+ "name": "updated_at",
1352
+ "type": "integer",
1353
+ "primaryKey": false,
1354
+ "notNull": true,
1355
+ "autoincrement": false,
1356
+ "default": "(unixepoch('subsec') * 1000)"
1357
+ }
1358
+ },
1359
+ "indexes": {
1360
+ "role_binding_one_per_scope": {
1361
+ "name": "role_binding_one_per_scope",
1362
+ "columns": [
1363
+ "scope_type",
1364
+ "scope_id",
1365
+ "role"
1366
+ ],
1367
+ "isUnique": true
1368
+ }
1369
+ },
1370
+ "foreignKeys": {
1371
+ "role_binding_agent_id_named_agent_id_fk": {
1372
+ "name": "role_binding_agent_id_named_agent_id_fk",
1373
+ "tableFrom": "role_binding",
1374
+ "tableTo": "named_agent",
1375
+ "columnsFrom": [
1376
+ "agent_id"
1377
+ ],
1378
+ "columnsTo": [
1379
+ "id"
1380
+ ],
1381
+ "onDelete": "cascade",
1382
+ "onUpdate": "no action"
1383
+ }
1384
+ },
1385
+ "compositePrimaryKeys": {},
1386
+ "uniqueConstraints": {},
1387
+ "checkConstraints": {
1388
+ "role_binding_scope_type": {
1389
+ "name": "role_binding_scope_type",
1390
+ "value": "\"role_binding\".\"scope_type\" IN ('workspace', 'project', 'task')"
1391
+ },
1392
+ "role_binding_role": {
1393
+ "name": "role_binding_role",
1394
+ "value": "\"role_binding\".\"role\" IN ('implementador', 'revisor', 'testador')"
1395
+ }
1396
+ }
1397
+ },
1398
+ "session": {
1399
+ "name": "session",
1400
+ "columns": {
1401
+ "id": {
1402
+ "name": "id",
1403
+ "type": "text",
1404
+ "primaryKey": true,
1405
+ "notNull": true,
1406
+ "autoincrement": false
1407
+ },
1408
+ "kind": {
1409
+ "name": "kind",
1410
+ "type": "text",
1411
+ "primaryKey": false,
1412
+ "notNull": true,
1413
+ "autoincrement": false
1414
+ },
1415
+ "script_name": {
1416
+ "name": "script_name",
1417
+ "type": "text",
1418
+ "primaryKey": false,
1419
+ "notNull": false,
1420
+ "autoincrement": false
1421
+ },
1422
+ "agent_config_id": {
1423
+ "name": "agent_config_id",
1424
+ "type": "text",
1425
+ "primaryKey": false,
1426
+ "notNull": false,
1427
+ "autoincrement": false
1428
+ },
1429
+ "scope_type": {
1430
+ "name": "scope_type",
1431
+ "type": "text",
1432
+ "primaryKey": false,
1433
+ "notNull": true,
1434
+ "autoincrement": false
1435
+ },
1436
+ "scope_id": {
1437
+ "name": "scope_id",
1438
+ "type": "text",
1439
+ "primaryKey": false,
1440
+ "notNull": true,
1441
+ "autoincrement": false
1442
+ },
1443
+ "cwd": {
1444
+ "name": "cwd",
1445
+ "type": "text",
1446
+ "primaryKey": false,
1447
+ "notNull": true,
1448
+ "autoincrement": false
1449
+ },
1450
+ "command": {
1451
+ "name": "command",
1452
+ "type": "text",
1453
+ "primaryKey": false,
1454
+ "notNull": true,
1455
+ "autoincrement": false
1456
+ },
1457
+ "state": {
1458
+ "name": "state",
1459
+ "type": "text",
1460
+ "primaryKey": false,
1461
+ "notNull": true,
1462
+ "autoincrement": false,
1463
+ "default": "'running'"
1464
+ },
1465
+ "exit_code": {
1466
+ "name": "exit_code",
1467
+ "type": "integer",
1468
+ "primaryKey": false,
1469
+ "notNull": false,
1470
+ "autoincrement": false
1471
+ },
1472
+ "transport": {
1473
+ "name": "transport",
1474
+ "type": "text",
1475
+ "primaryKey": false,
1476
+ "notNull": true,
1477
+ "autoincrement": false,
1478
+ "default": "'pty'"
1479
+ },
1480
+ "acp_session_id": {
1481
+ "name": "acp_session_id",
1482
+ "type": "text",
1483
+ "primaryKey": false,
1484
+ "notNull": false,
1485
+ "autoincrement": false
1486
+ },
1487
+ "mode": {
1488
+ "name": "mode",
1489
+ "type": "text",
1490
+ "primaryKey": false,
1491
+ "notNull": false,
1492
+ "autoincrement": false
1493
+ },
1494
+ "model": {
1495
+ "name": "model",
1496
+ "type": "text",
1497
+ "primaryKey": false,
1498
+ "notNull": false,
1499
+ "autoincrement": false
1500
+ },
1501
+ "lumem_mode": {
1502
+ "name": "lumem_mode",
1503
+ "type": "text",
1504
+ "primaryKey": false,
1505
+ "notNull": true,
1506
+ "autoincrement": false,
1507
+ "default": "'ask'"
1508
+ },
1509
+ "resumed_from_id": {
1510
+ "name": "resumed_from_id",
1511
+ "type": "text",
1512
+ "primaryKey": false,
1513
+ "notNull": false,
1514
+ "autoincrement": false
1515
+ },
1516
+ "task_id": {
1517
+ "name": "task_id",
1518
+ "type": "text",
1519
+ "primaryKey": false,
1520
+ "notNull": false,
1521
+ "autoincrement": false
1522
+ },
1523
+ "task_role": {
1524
+ "name": "task_role",
1525
+ "type": "text",
1526
+ "primaryKey": false,
1527
+ "notNull": false,
1528
+ "autoincrement": false
1529
+ },
1530
+ "pending_prompt": {
1531
+ "name": "pending_prompt",
1532
+ "type": "text",
1533
+ "primaryKey": false,
1534
+ "notNull": false,
1535
+ "autoincrement": false
1536
+ },
1537
+ "pending_reason": {
1538
+ "name": "pending_reason",
1539
+ "type": "text",
1540
+ "primaryKey": false,
1541
+ "notNull": false,
1542
+ "autoincrement": false
1543
+ },
1544
+ "created_at": {
1545
+ "name": "created_at",
1546
+ "type": "integer",
1547
+ "primaryKey": false,
1548
+ "notNull": true,
1549
+ "autoincrement": false,
1550
+ "default": "(unixepoch('subsec') * 1000)"
1551
+ },
1552
+ "updated_at": {
1553
+ "name": "updated_at",
1554
+ "type": "integer",
1555
+ "primaryKey": false,
1556
+ "notNull": true,
1557
+ "autoincrement": false,
1558
+ "default": "(unixepoch('subsec') * 1000)"
1559
+ }
1560
+ },
1561
+ "indexes": {},
1562
+ "foreignKeys": {
1563
+ "session_agent_config_id_agent_config_id_fk": {
1564
+ "name": "session_agent_config_id_agent_config_id_fk",
1565
+ "tableFrom": "session",
1566
+ "tableTo": "agent_config",
1567
+ "columnsFrom": [
1568
+ "agent_config_id"
1569
+ ],
1570
+ "columnsTo": [
1571
+ "id"
1572
+ ],
1573
+ "onDelete": "restrict",
1574
+ "onUpdate": "no action"
1575
+ },
1576
+ "session_task_id_task_id_fk": {
1577
+ "name": "session_task_id_task_id_fk",
1578
+ "tableFrom": "session",
1579
+ "tableTo": "task",
1580
+ "columnsFrom": [
1581
+ "task_id"
1582
+ ],
1583
+ "columnsTo": [
1584
+ "id"
1585
+ ],
1586
+ "onDelete": "set null",
1587
+ "onUpdate": "no action"
1588
+ }
1589
+ },
1590
+ "compositePrimaryKeys": {},
1591
+ "uniqueConstraints": {},
1592
+ "checkConstraints": {
1593
+ "session_kind": {
1594
+ "name": "session_kind",
1595
+ "value": "\"session\".\"kind\" IN ('shell', 'agent', 'script')"
1596
+ },
1597
+ "session_scope_type": {
1598
+ "name": "session_scope_type",
1599
+ "value": "\"session\".\"scope_type\" IN ('project', 'worktree')"
1600
+ },
1601
+ "session_state": {
1602
+ "name": "session_state",
1603
+ "value": "\"session\".\"state\" IN ('running', 'exited')"
1604
+ },
1605
+ "session_agent_config": {
1606
+ "name": "session_agent_config",
1607
+ "value": "(\"session\".\"kind\" = 'agent' AND \"session\".\"agent_config_id\" IS NOT NULL)\n OR (\"session\".\"kind\" <> 'agent' AND \"session\".\"agent_config_id\" IS NULL)"
1608
+ },
1609
+ "session_script_name": {
1610
+ "name": "session_script_name",
1611
+ "value": "(\"session\".\"kind\" = 'script' AND \"session\".\"script_name\" IS NOT NULL\n AND \"session\".\"script_name\" IN ('setup', 'run', 'teardown', 'test'))\n OR (\"session\".\"kind\" <> 'script' AND \"session\".\"script_name\" IS NULL)"
1612
+ },
1613
+ "session_exit_code": {
1614
+ "name": "session_exit_code",
1615
+ "value": "(\"session\".\"state\" = 'running' AND \"session\".\"exit_code\" IS NULL)\n OR (\"session\".\"state\" = 'exited')"
1616
+ },
1617
+ "session_transport": {
1618
+ "name": "session_transport",
1619
+ "value": "\"session\".\"transport\" IN ('pty', 'acp')"
1620
+ },
1621
+ "session_shell_transport": {
1622
+ "name": "session_shell_transport",
1623
+ "value": "\"session\".\"kind\" = 'agent' OR \"session\".\"transport\" = 'pty'"
1624
+ },
1625
+ "session_acp_id": {
1626
+ "name": "session_acp_id",
1627
+ "value": "(\"session\".\"transport\" = 'acp' AND \"session\".\"acp_session_id\" IS NOT NULL)\n OR (\"session\".\"transport\" = 'pty' AND \"session\".\"acp_session_id\" IS NULL)"
1628
+ },
1629
+ "session_lumem_mode": {
1630
+ "name": "session_lumem_mode",
1631
+ "value": "\"session\".\"lumem_mode\" IN ('ask', 'auto', 'free')"
1632
+ },
1633
+ "session_pending_reason": {
1634
+ "name": "session_pending_reason",
1635
+ "value": "\"session\".\"pending_reason\" IS NULL OR \"session\".\"pending_reason\" IN ('setup_failed')"
1636
+ }
1637
+ }
1638
+ },
1639
+ "session_usage": {
1640
+ "name": "session_usage",
1641
+ "columns": {
1642
+ "id": {
1643
+ "name": "id",
1644
+ "type": "text",
1645
+ "primaryKey": true,
1646
+ "notNull": true,
1647
+ "autoincrement": false
1648
+ },
1649
+ "session_id": {
1650
+ "name": "session_id",
1651
+ "type": "text",
1652
+ "primaryKey": false,
1653
+ "notNull": true,
1654
+ "autoincrement": false
1655
+ },
1656
+ "project_id": {
1657
+ "name": "project_id",
1658
+ "type": "text",
1659
+ "primaryKey": false,
1660
+ "notNull": true,
1661
+ "autoincrement": false
1662
+ },
1663
+ "worktree_id": {
1664
+ "name": "worktree_id",
1665
+ "type": "text",
1666
+ "primaryKey": false,
1667
+ "notNull": true,
1668
+ "autoincrement": false,
1669
+ "default": "''"
1670
+ },
1671
+ "agent_config_id": {
1672
+ "name": "agent_config_id",
1673
+ "type": "text",
1674
+ "primaryKey": false,
1675
+ "notNull": false,
1676
+ "autoincrement": false
1677
+ },
1678
+ "tokens": {
1679
+ "name": "tokens",
1680
+ "type": "integer",
1681
+ "primaryKey": false,
1682
+ "notNull": true,
1683
+ "autoincrement": false,
1684
+ "default": 0
1685
+ },
1686
+ "turn": {
1687
+ "name": "turn",
1688
+ "type": "integer",
1689
+ "primaryKey": false,
1690
+ "notNull": true,
1691
+ "autoincrement": false,
1692
+ "default": 0
1693
+ },
1694
+ "cost": {
1695
+ "name": "cost",
1696
+ "type": "real",
1697
+ "primaryKey": false,
1698
+ "notNull": false,
1699
+ "autoincrement": false
1700
+ },
1701
+ "currency": {
1702
+ "name": "currency",
1703
+ "type": "text",
1704
+ "primaryKey": false,
1705
+ "notNull": false,
1706
+ "autoincrement": false
1707
+ },
1708
+ "created_at": {
1709
+ "name": "created_at",
1710
+ "type": "integer",
1711
+ "primaryKey": false,
1712
+ "notNull": true,
1713
+ "autoincrement": false,
1714
+ "default": "(unixepoch('subsec') * 1000)"
1715
+ },
1716
+ "updated_at": {
1717
+ "name": "updated_at",
1718
+ "type": "integer",
1719
+ "primaryKey": false,
1720
+ "notNull": true,
1721
+ "autoincrement": false,
1722
+ "default": "(unixepoch('subsec') * 1000)"
1723
+ }
1724
+ },
1725
+ "indexes": {
1726
+ "session_usage_project_at": {
1727
+ "name": "session_usage_project_at",
1728
+ "columns": [
1729
+ "project_id",
1730
+ "created_at"
1731
+ ],
1732
+ "isUnique": false
1733
+ },
1734
+ "session_usage_worktree_at": {
1735
+ "name": "session_usage_worktree_at",
1736
+ "columns": [
1737
+ "worktree_id",
1738
+ "created_at"
1739
+ ],
1740
+ "isUnique": false
1741
+ }
1742
+ },
1743
+ "foreignKeys": {},
1744
+ "compositePrimaryKeys": {},
1745
+ "uniqueConstraints": {},
1746
+ "checkConstraints": {
1747
+ "session_usage_tokens": {
1748
+ "name": "session_usage_tokens",
1749
+ "value": "\"session_usage\".\"tokens\" >= 0"
1750
+ }
1751
+ }
1752
+ },
1753
+ "task": {
1754
+ "name": "task",
1755
+ "columns": {
1756
+ "id": {
1757
+ "name": "id",
1758
+ "type": "text",
1759
+ "primaryKey": true,
1760
+ "notNull": true,
1761
+ "autoincrement": false
1762
+ },
1763
+ "workspace_id": {
1764
+ "name": "workspace_id",
1765
+ "type": "text",
1766
+ "primaryKey": false,
1767
+ "notNull": true,
1768
+ "autoincrement": false
1769
+ },
1770
+ "project_id": {
1771
+ "name": "project_id",
1772
+ "type": "text",
1773
+ "primaryKey": false,
1774
+ "notNull": true,
1775
+ "autoincrement": false
1776
+ },
1777
+ "title": {
1778
+ "name": "title",
1779
+ "type": "text",
1780
+ "primaryKey": false,
1781
+ "notNull": true,
1782
+ "autoincrement": false
1783
+ },
1784
+ "body": {
1785
+ "name": "body",
1786
+ "type": "text",
1787
+ "primaryKey": false,
1788
+ "notNull": true,
1789
+ "autoincrement": false,
1790
+ "default": "''"
1791
+ },
1792
+ "status": {
1793
+ "name": "status",
1794
+ "type": "text",
1795
+ "primaryKey": false,
1796
+ "notNull": true,
1797
+ "autoincrement": false,
1798
+ "default": "'open'"
1799
+ },
1800
+ "created_by": {
1801
+ "name": "created_by",
1802
+ "type": "text",
1803
+ "primaryKey": false,
1804
+ "notNull": true,
1805
+ "autoincrement": false,
1806
+ "default": "'human'"
1807
+ },
1808
+ "created_by_session": {
1809
+ "name": "created_by_session",
1810
+ "type": "text",
1811
+ "primaryKey": false,
1812
+ "notNull": false,
1813
+ "autoincrement": false
1814
+ },
1815
+ "worktree_id": {
1816
+ "name": "worktree_id",
1817
+ "type": "text",
1818
+ "primaryKey": false,
1819
+ "notNull": false,
1820
+ "autoincrement": false
1821
+ },
1822
+ "position": {
1823
+ "name": "position",
1824
+ "type": "integer",
1825
+ "primaryKey": false,
1826
+ "notNull": true,
1827
+ "autoincrement": false,
1828
+ "default": 0
1829
+ },
1830
+ "links": {
1831
+ "name": "links",
1832
+ "type": "text",
1833
+ "primaryKey": false,
1834
+ "notNull": true,
1835
+ "autoincrement": false,
1836
+ "default": "'[]'"
1837
+ },
1838
+ "reason": {
1839
+ "name": "reason",
1840
+ "type": "text",
1841
+ "primaryKey": false,
1842
+ "notNull": false,
1843
+ "autoincrement": false
1844
+ },
1845
+ "attempts": {
1846
+ "name": "attempts",
1847
+ "type": "integer",
1848
+ "primaryKey": false,
1849
+ "notNull": true,
1850
+ "autoincrement": false,
1851
+ "default": 0
1852
+ },
1853
+ "bounces": {
1854
+ "name": "bounces",
1855
+ "type": "integer",
1856
+ "primaryKey": false,
1857
+ "notNull": true,
1858
+ "autoincrement": false,
1859
+ "default": 0
1860
+ },
1861
+ "autonomy": {
1862
+ "name": "autonomy",
1863
+ "type": "text",
1864
+ "primaryKey": false,
1865
+ "notNull": true,
1866
+ "autoincrement": false,
1867
+ "default": "'inherit'"
1868
+ },
1869
+ "prepared_prompt": {
1870
+ "name": "prepared_prompt",
1871
+ "type": "text",
1872
+ "primaryKey": false,
1873
+ "notNull": false,
1874
+ "autoincrement": false
1875
+ },
1876
+ "prepared_role": {
1877
+ "name": "prepared_role",
1878
+ "type": "text",
1879
+ "primaryKey": false,
1880
+ "notNull": false,
1881
+ "autoincrement": false
1882
+ },
1883
+ "blocked_reason": {
1884
+ "name": "blocked_reason",
1885
+ "type": "text",
1886
+ "primaryKey": false,
1887
+ "notNull": false,
1888
+ "autoincrement": false
1889
+ },
1890
+ "notified_at": {
1891
+ "name": "notified_at",
1892
+ "type": "integer",
1893
+ "primaryKey": false,
1894
+ "notNull": false,
1895
+ "autoincrement": false
1896
+ },
1897
+ "external_source": {
1898
+ "name": "external_source",
1899
+ "type": "text",
1900
+ "primaryKey": false,
1901
+ "notNull": false,
1902
+ "autoincrement": false
1903
+ },
1904
+ "external_id": {
1905
+ "name": "external_id",
1906
+ "type": "text",
1907
+ "primaryKey": false,
1908
+ "notNull": false,
1909
+ "autoincrement": false
1910
+ },
1911
+ "external_state": {
1912
+ "name": "external_state",
1913
+ "type": "text",
1914
+ "primaryKey": false,
1915
+ "notNull": false,
1916
+ "autoincrement": false
1917
+ },
1918
+ "external_assignee": {
1919
+ "name": "external_assignee",
1920
+ "type": "text",
1921
+ "primaryKey": false,
1922
+ "notNull": false,
1923
+ "autoincrement": false
1924
+ },
1925
+ "external_body_hash": {
1926
+ "name": "external_body_hash",
1927
+ "type": "text",
1928
+ "primaryKey": false,
1929
+ "notNull": false,
1930
+ "autoincrement": false
1931
+ },
1932
+ "external_marks": {
1933
+ "name": "external_marks",
1934
+ "type": "text",
1935
+ "primaryKey": false,
1936
+ "notNull": true,
1937
+ "autoincrement": false,
1938
+ "default": "'[]'"
1939
+ },
1940
+ "status_changed_at": {
1941
+ "name": "status_changed_at",
1942
+ "type": "integer",
1943
+ "primaryKey": false,
1944
+ "notNull": true,
1945
+ "autoincrement": false,
1946
+ "default": "0"
1947
+ },
1948
+ "closed_at": {
1949
+ "name": "closed_at",
1950
+ "type": "integer",
1951
+ "primaryKey": false,
1952
+ "notNull": false,
1953
+ "autoincrement": false
1954
+ },
1955
+ "created_at": {
1956
+ "name": "created_at",
1957
+ "type": "integer",
1958
+ "primaryKey": false,
1959
+ "notNull": true,
1960
+ "autoincrement": false,
1961
+ "default": "(unixepoch('subsec') * 1000)"
1962
+ },
1963
+ "updated_at": {
1964
+ "name": "updated_at",
1965
+ "type": "integer",
1966
+ "primaryKey": false,
1967
+ "notNull": true,
1968
+ "autoincrement": false,
1969
+ "default": "(unixepoch('subsec') * 1000)"
1970
+ }
1971
+ },
1972
+ "indexes": {
1973
+ "task_by_workspace": {
1974
+ "name": "task_by_workspace",
1975
+ "columns": [
1976
+ "workspace_id",
1977
+ "status"
1978
+ ],
1979
+ "isUnique": false
1980
+ },
1981
+ "task_by_position": {
1982
+ "name": "task_by_position",
1983
+ "columns": [
1984
+ "workspace_id",
1985
+ "status",
1986
+ "position"
1987
+ ],
1988
+ "isUnique": false
1989
+ },
1990
+ "task_by_project": {
1991
+ "name": "task_by_project",
1992
+ "columns": [
1993
+ "project_id"
1994
+ ],
1995
+ "isUnique": false
1996
+ },
1997
+ "task_external_in_workspace": {
1998
+ "name": "task_external_in_workspace",
1999
+ "columns": [
2000
+ "workspace_id",
2001
+ "external_source",
2002
+ "external_id"
2003
+ ],
2004
+ "isUnique": true
2005
+ }
2006
+ },
2007
+ "foreignKeys": {
2008
+ "task_workspace_id_workspace_id_fk": {
2009
+ "name": "task_workspace_id_workspace_id_fk",
2010
+ "tableFrom": "task",
2011
+ "tableTo": "workspace",
2012
+ "columnsFrom": [
2013
+ "workspace_id"
2014
+ ],
2015
+ "columnsTo": [
2016
+ "id"
2017
+ ],
2018
+ "onDelete": "restrict",
2019
+ "onUpdate": "no action"
2020
+ },
2021
+ "task_project_id_project_id_fk": {
2022
+ "name": "task_project_id_project_id_fk",
2023
+ "tableFrom": "task",
2024
+ "tableTo": "project",
2025
+ "columnsFrom": [
2026
+ "project_id"
2027
+ ],
2028
+ "columnsTo": [
2029
+ "id"
2030
+ ],
2031
+ "onDelete": "restrict",
2032
+ "onUpdate": "no action"
2033
+ },
2034
+ "task_worktree_id_worktree_id_fk": {
2035
+ "name": "task_worktree_id_worktree_id_fk",
2036
+ "tableFrom": "task",
2037
+ "tableTo": "worktree",
2038
+ "columnsFrom": [
2039
+ "worktree_id"
2040
+ ],
2041
+ "columnsTo": [
2042
+ "id"
2043
+ ],
2044
+ "onDelete": "set null",
2045
+ "onUpdate": "no action"
2046
+ }
2047
+ },
2048
+ "compositePrimaryKeys": {},
2049
+ "uniqueConstraints": {},
2050
+ "checkConstraints": {
2051
+ "task_status": {
2052
+ "name": "task_status",
2053
+ "value": "\"task\".\"status\" IN ('proposed', 'backlog', 'open', 'in_progress', 'review', 'testing', 'ready_to_merge', 'done', 'dropped')"
2054
+ },
2055
+ "task_created_by": {
2056
+ "name": "task_created_by",
2057
+ "value": "\"task\".\"created_by\" IN ('human', 'agent')"
2058
+ },
2059
+ "task_autonomy": {
2060
+ "name": "task_autonomy",
2061
+ "value": "\"task\".\"autonomy\" IN ('inherit', 'off')"
2062
+ },
2063
+ "task_attempts_not_negative": {
2064
+ "name": "task_attempts_not_negative",
2065
+ "value": "\"task\".\"attempts\" >= 0"
2066
+ },
2067
+ "task_bounces_not_negative": {
2068
+ "name": "task_bounces_not_negative",
2069
+ "value": "\"task\".\"bounces\" >= 0"
2070
+ },
2071
+ "task_prepared_pair": {
2072
+ "name": "task_prepared_pair",
2073
+ "value": "(\"task\".\"prepared_prompt\" IS NULL AND \"task\".\"prepared_role\" IS NULL)\n OR (\"task\".\"prepared_prompt\" IS NOT NULL AND \"task\".\"prepared_role\" IS NOT NULL)"
2074
+ },
2075
+ "task_agent_provenance": {
2076
+ "name": "task_agent_provenance",
2077
+ "value": "(\"task\".\"created_by\" = 'agent' AND \"task\".\"created_by_session\" IS NOT NULL)\n OR (\"task\".\"created_by\" = 'human' AND \"task\".\"created_by_session\" IS NULL)"
2078
+ },
2079
+ "task_closed_at": {
2080
+ "name": "task_closed_at",
2081
+ "value": "(\"task\".\"status\" IN ('done', 'dropped') AND \"task\".\"closed_at\" IS NOT NULL)\n OR (\"task\".\"status\" NOT IN ('done', 'dropped') AND \"task\".\"closed_at\" IS NULL)"
2082
+ }
2083
+ }
2084
+ },
2085
+ "task_comment": {
2086
+ "name": "task_comment",
2087
+ "columns": {
2088
+ "id": {
2089
+ "name": "id",
2090
+ "type": "text",
2091
+ "primaryKey": true,
2092
+ "notNull": true,
2093
+ "autoincrement": false
2094
+ },
2095
+ "task_id": {
2096
+ "name": "task_id",
2097
+ "type": "text",
2098
+ "primaryKey": false,
2099
+ "notNull": true,
2100
+ "autoincrement": false
2101
+ },
2102
+ "body": {
2103
+ "name": "body",
2104
+ "type": "text",
2105
+ "primaryKey": false,
2106
+ "notNull": true,
2107
+ "autoincrement": false
2108
+ },
2109
+ "created_by": {
2110
+ "name": "created_by",
2111
+ "type": "text",
2112
+ "primaryKey": false,
2113
+ "notNull": true,
2114
+ "autoincrement": false,
2115
+ "default": "'human'"
2116
+ },
2117
+ "created_by_session": {
2118
+ "name": "created_by_session",
2119
+ "type": "text",
2120
+ "primaryKey": false,
2121
+ "notNull": false,
2122
+ "autoincrement": false
2123
+ },
2124
+ "created_at": {
2125
+ "name": "created_at",
2126
+ "type": "integer",
2127
+ "primaryKey": false,
2128
+ "notNull": true,
2129
+ "autoincrement": false,
2130
+ "default": "(unixepoch('subsec') * 1000)"
2131
+ },
2132
+ "updated_at": {
2133
+ "name": "updated_at",
2134
+ "type": "integer",
2135
+ "primaryKey": false,
2136
+ "notNull": true,
2137
+ "autoincrement": false,
2138
+ "default": "(unixepoch('subsec') * 1000)"
2139
+ }
2140
+ },
2141
+ "indexes": {
2142
+ "task_comment_by_task": {
2143
+ "name": "task_comment_by_task",
2144
+ "columns": [
2145
+ "task_id",
2146
+ "created_at"
2147
+ ],
2148
+ "isUnique": false
2149
+ }
2150
+ },
2151
+ "foreignKeys": {
2152
+ "task_comment_task_id_task_id_fk": {
2153
+ "name": "task_comment_task_id_task_id_fk",
2154
+ "tableFrom": "task_comment",
2155
+ "tableTo": "task",
2156
+ "columnsFrom": [
2157
+ "task_id"
2158
+ ],
2159
+ "columnsTo": [
2160
+ "id"
2161
+ ],
2162
+ "onDelete": "cascade",
2163
+ "onUpdate": "no action"
2164
+ }
2165
+ },
2166
+ "compositePrimaryKeys": {},
2167
+ "uniqueConstraints": {},
2168
+ "checkConstraints": {
2169
+ "task_comment_created_by": {
2170
+ "name": "task_comment_created_by",
2171
+ "value": "\"task_comment\".\"created_by\" IN ('human', 'agent')"
2172
+ },
2173
+ "task_comment_provenance": {
2174
+ "name": "task_comment_provenance",
2175
+ "value": "(\"task_comment\".\"created_by\" = 'agent' AND \"task_comment\".\"created_by_session\" IS NOT NULL)\n OR (\"task_comment\".\"created_by\" = 'human' AND \"task_comment\".\"created_by_session\" IS NULL)"
2176
+ }
2177
+ }
2178
+ },
2179
+ "task_finding": {
2180
+ "name": "task_finding",
2181
+ "columns": {
2182
+ "id": {
2183
+ "name": "id",
2184
+ "type": "text",
2185
+ "primaryKey": true,
2186
+ "notNull": true,
2187
+ "autoincrement": false
2188
+ },
2189
+ "task_id": {
2190
+ "name": "task_id",
2191
+ "type": "text",
2192
+ "primaryKey": false,
2193
+ "notNull": true,
2194
+ "autoincrement": false
2195
+ },
2196
+ "found_by_session": {
2197
+ "name": "found_by_session",
2198
+ "type": "text",
2199
+ "primaryKey": false,
2200
+ "notNull": true,
2201
+ "autoincrement": false
2202
+ },
2203
+ "role": {
2204
+ "name": "role",
2205
+ "type": "text",
2206
+ "primaryKey": false,
2207
+ "notNull": true,
2208
+ "autoincrement": false
2209
+ },
2210
+ "bucket": {
2211
+ "name": "bucket",
2212
+ "type": "text",
2213
+ "primaryKey": false,
2214
+ "notNull": true,
2215
+ "autoincrement": false
2216
+ },
2217
+ "title": {
2218
+ "name": "title",
2219
+ "type": "text",
2220
+ "primaryKey": false,
2221
+ "notNull": true,
2222
+ "autoincrement": false
2223
+ },
2224
+ "detail": {
2225
+ "name": "detail",
2226
+ "type": "text",
2227
+ "primaryKey": false,
2228
+ "notNull": true,
2229
+ "autoincrement": false,
2230
+ "default": "''"
2231
+ },
2232
+ "command": {
2233
+ "name": "command",
2234
+ "type": "text",
2235
+ "primaryKey": false,
2236
+ "notNull": false,
2237
+ "autoincrement": false
2238
+ },
2239
+ "expected": {
2240
+ "name": "expected",
2241
+ "type": "text",
2242
+ "primaryKey": false,
2243
+ "notNull": false,
2244
+ "autoincrement": false
2245
+ },
2246
+ "verification": {
2247
+ "name": "verification",
2248
+ "type": "text",
2249
+ "primaryKey": false,
2250
+ "notNull": true,
2251
+ "autoincrement": false,
2252
+ "default": "'pending'"
2253
+ },
2254
+ "output": {
2255
+ "name": "output",
2256
+ "type": "text",
2257
+ "primaryKey": false,
2258
+ "notNull": false,
2259
+ "autoincrement": false
2260
+ },
2261
+ "created_at": {
2262
+ "name": "created_at",
2263
+ "type": "integer",
2264
+ "primaryKey": false,
2265
+ "notNull": true,
2266
+ "autoincrement": false,
2267
+ "default": "(unixepoch('subsec') * 1000)"
2268
+ },
2269
+ "updated_at": {
2270
+ "name": "updated_at",
2271
+ "type": "integer",
2272
+ "primaryKey": false,
2273
+ "notNull": true,
2274
+ "autoincrement": false,
2275
+ "default": "(unixepoch('subsec') * 1000)"
2276
+ }
2277
+ },
2278
+ "indexes": {
2279
+ "task_finding_by_task": {
2280
+ "name": "task_finding_by_task",
2281
+ "columns": [
2282
+ "task_id",
2283
+ "created_at"
2284
+ ],
2285
+ "isUnique": false
2286
+ }
2287
+ },
2288
+ "foreignKeys": {
2289
+ "task_finding_task_id_task_id_fk": {
2290
+ "name": "task_finding_task_id_task_id_fk",
2291
+ "tableFrom": "task_finding",
2292
+ "tableTo": "task",
2293
+ "columnsFrom": [
2294
+ "task_id"
2295
+ ],
2296
+ "columnsTo": [
2297
+ "id"
2298
+ ],
2299
+ "onDelete": "cascade",
2300
+ "onUpdate": "no action"
2301
+ }
2302
+ },
2303
+ "compositePrimaryKeys": {},
2304
+ "uniqueConstraints": {},
2305
+ "checkConstraints": {
2306
+ "task_finding_bucket": {
2307
+ "name": "task_finding_bucket",
2308
+ "value": "\"task_finding\".\"bucket\" IN ('blocks', 'notes')"
2309
+ },
2310
+ "task_finding_verification": {
2311
+ "name": "task_finding_verification",
2312
+ "value": "\"task_finding\".\"verification\" IN ('pending', 'reproduced', 'refuted', 'skipped')"
2313
+ },
2314
+ "task_finding_reproduction": {
2315
+ "name": "task_finding_reproduction",
2316
+ "value": "(\"task_finding\".\"bucket\" = 'blocks' AND \"task_finding\".\"command\" IS NOT NULL)\n OR (\"task_finding\".\"bucket\" = 'notes' AND \"task_finding\".\"command\" IS NULL)"
2317
+ }
2318
+ }
2319
+ },
2320
+ "task_review": {
2321
+ "name": "task_review",
2322
+ "columns": {
2323
+ "id": {
2324
+ "name": "id",
2325
+ "type": "text",
2326
+ "primaryKey": true,
2327
+ "notNull": true,
2328
+ "autoincrement": false
2329
+ },
2330
+ "task_id": {
2331
+ "name": "task_id",
2332
+ "type": "text",
2333
+ "primaryKey": false,
2334
+ "notNull": true,
2335
+ "autoincrement": false
2336
+ },
2337
+ "by_session": {
2338
+ "name": "by_session",
2339
+ "type": "text",
2340
+ "primaryKey": false,
2341
+ "notNull": true,
2342
+ "autoincrement": false
2343
+ },
2344
+ "role": {
2345
+ "name": "role",
2346
+ "type": "text",
2347
+ "primaryKey": false,
2348
+ "notNull": true,
2349
+ "autoincrement": false
2350
+ },
2351
+ "blocks": {
2352
+ "name": "blocks",
2353
+ "type": "integer",
2354
+ "primaryKey": false,
2355
+ "notNull": true,
2356
+ "autoincrement": false,
2357
+ "default": 0
2358
+ },
2359
+ "notes": {
2360
+ "name": "notes",
2361
+ "type": "integer",
2362
+ "primaryKey": false,
2363
+ "notNull": true,
2364
+ "autoincrement": false,
2365
+ "default": 0
2366
+ },
2367
+ "created_at": {
2368
+ "name": "created_at",
2369
+ "type": "integer",
2370
+ "primaryKey": false,
2371
+ "notNull": true,
2372
+ "autoincrement": false,
2373
+ "default": "(unixepoch('subsec') * 1000)"
2374
+ },
2375
+ "updated_at": {
2376
+ "name": "updated_at",
2377
+ "type": "integer",
2378
+ "primaryKey": false,
2379
+ "notNull": true,
2380
+ "autoincrement": false,
2381
+ "default": "(unixepoch('subsec') * 1000)"
2382
+ }
2383
+ },
2384
+ "indexes": {
2385
+ "task_review_by_session": {
2386
+ "name": "task_review_by_session",
2387
+ "columns": [
2388
+ "by_session",
2389
+ "created_at"
2390
+ ],
2391
+ "isUnique": false
2392
+ }
2393
+ },
2394
+ "foreignKeys": {
2395
+ "task_review_task_id_task_id_fk": {
2396
+ "name": "task_review_task_id_task_id_fk",
2397
+ "tableFrom": "task_review",
2398
+ "tableTo": "task",
2399
+ "columnsFrom": [
2400
+ "task_id"
2401
+ ],
2402
+ "columnsTo": [
2403
+ "id"
2404
+ ],
2405
+ "onDelete": "cascade",
2406
+ "onUpdate": "no action"
2407
+ }
2408
+ },
2409
+ "compositePrimaryKeys": {},
2410
+ "uniqueConstraints": {},
2411
+ "checkConstraints": {
2412
+ "task_review_counts_not_negative": {
2413
+ "name": "task_review_counts_not_negative",
2414
+ "value": "\"task_review\".\"blocks\" >= 0 AND \"task_review\".\"notes\" >= 0"
2415
+ }
2416
+ }
2417
+ },
2418
+ "workspace": {
2419
+ "name": "workspace",
2420
+ "columns": {
2421
+ "id": {
2422
+ "name": "id",
2423
+ "type": "text",
2424
+ "primaryKey": true,
2425
+ "notNull": true,
2426
+ "autoincrement": false
2427
+ },
2428
+ "name": {
2429
+ "name": "name",
2430
+ "type": "text",
2431
+ "primaryKey": false,
2432
+ "notNull": true,
2433
+ "autoincrement": false
2434
+ },
2435
+ "default_lumem_mode": {
2436
+ "name": "default_lumem_mode",
2437
+ "type": "text",
2438
+ "primaryKey": false,
2439
+ "notNull": true,
2440
+ "autoincrement": false,
2441
+ "default": "'ask'"
2442
+ },
2443
+ "budget_cost_per_task": {
2444
+ "name": "budget_cost_per_task",
2445
+ "type": "real",
2446
+ "primaryKey": false,
2447
+ "notNull": false,
2448
+ "autoincrement": false
2449
+ },
2450
+ "budget_cost_per_day": {
2451
+ "name": "budget_cost_per_day",
2452
+ "type": "real",
2453
+ "primaryKey": false,
2454
+ "notNull": false,
2455
+ "autoincrement": false
2456
+ },
2457
+ "budget_turns_per_session": {
2458
+ "name": "budget_turns_per_session",
2459
+ "type": "integer",
2460
+ "primaryKey": false,
2461
+ "notNull": false,
2462
+ "autoincrement": false
2463
+ },
2464
+ "autonomy": {
2465
+ "name": "autonomy",
2466
+ "type": "text",
2467
+ "primaryKey": false,
2468
+ "notNull": true,
2469
+ "autoincrement": false,
2470
+ "default": "'manual'"
2471
+ },
2472
+ "autonomy_max_parallel": {
2473
+ "name": "autonomy_max_parallel",
2474
+ "type": "integer",
2475
+ "primaryKey": false,
2476
+ "notNull": true,
2477
+ "autoincrement": false,
2478
+ "default": 2
2479
+ },
2480
+ "merged_always_removes": {
2481
+ "name": "merged_always_removes",
2482
+ "type": "integer",
2483
+ "primaryKey": false,
2484
+ "notNull": true,
2485
+ "autoincrement": false,
2486
+ "default": false
2487
+ },
2488
+ "created_at": {
2489
+ "name": "created_at",
2490
+ "type": "integer",
2491
+ "primaryKey": false,
2492
+ "notNull": true,
2493
+ "autoincrement": false,
2494
+ "default": "(unixepoch('subsec') * 1000)"
2495
+ },
2496
+ "updated_at": {
2497
+ "name": "updated_at",
2498
+ "type": "integer",
2499
+ "primaryKey": false,
2500
+ "notNull": true,
2501
+ "autoincrement": false,
2502
+ "default": "(unixepoch('subsec') * 1000)"
2503
+ }
2504
+ },
2505
+ "indexes": {
2506
+ "workspace_name_unique": {
2507
+ "name": "workspace_name_unique",
2508
+ "columns": [
2509
+ "name"
2510
+ ],
2511
+ "isUnique": true
2512
+ }
2513
+ },
2514
+ "foreignKeys": {},
2515
+ "compositePrimaryKeys": {},
2516
+ "uniqueConstraints": {},
2517
+ "checkConstraints": {
2518
+ "workspace_default_lumem_mode": {
2519
+ "name": "workspace_default_lumem_mode",
2520
+ "value": "\"workspace\".\"default_lumem_mode\" IN ('ask', 'auto')"
2521
+ },
2522
+ "workspace_autonomy": {
2523
+ "name": "workspace_autonomy",
2524
+ "value": "\"workspace\".\"autonomy\" IN ('manual', 'assistido', 'autonomo')"
2525
+ },
2526
+ "workspace_autonomy_max_parallel": {
2527
+ "name": "workspace_autonomy_max_parallel",
2528
+ "value": "\"workspace\".\"autonomy_max_parallel\" >= 0"
2529
+ },
2530
+ "workspace_budget_not_negative": {
2531
+ "name": "workspace_budget_not_negative",
2532
+ "value": "(\"workspace\".\"budget_cost_per_task\" IS NULL OR \"workspace\".\"budget_cost_per_task\" >= 0)\n AND (\"workspace\".\"budget_cost_per_day\" IS NULL OR \"workspace\".\"budget_cost_per_day\" >= 0)\n AND (\"workspace\".\"budget_turns_per_session\" IS NULL OR \"workspace\".\"budget_turns_per_session\" >= 0)"
2533
+ }
2534
+ }
2535
+ },
2536
+ "worktree": {
2537
+ "name": "worktree",
2538
+ "columns": {
2539
+ "id": {
2540
+ "name": "id",
2541
+ "type": "text",
2542
+ "primaryKey": true,
2543
+ "notNull": true,
2544
+ "autoincrement": false
2545
+ },
2546
+ "project_id": {
2547
+ "name": "project_id",
2548
+ "type": "text",
2549
+ "primaryKey": false,
2550
+ "notNull": true,
2551
+ "autoincrement": false
2552
+ },
2553
+ "name": {
2554
+ "name": "name",
2555
+ "type": "text",
2556
+ "primaryKey": false,
2557
+ "notNull": true,
2558
+ "autoincrement": false
2559
+ },
2560
+ "branch": {
2561
+ "name": "branch",
2562
+ "type": "text",
2563
+ "primaryKey": false,
2564
+ "notNull": true,
2565
+ "autoincrement": false
2566
+ },
2567
+ "path": {
2568
+ "name": "path",
2569
+ "type": "text",
2570
+ "primaryKey": false,
2571
+ "notNull": true,
2572
+ "autoincrement": false
2573
+ },
2574
+ "state": {
2575
+ "name": "state",
2576
+ "type": "text",
2577
+ "primaryKey": false,
2578
+ "notNull": true,
2579
+ "autoincrement": false,
2580
+ "default": "'active'"
2581
+ },
2582
+ "created_at": {
2583
+ "name": "created_at",
2584
+ "type": "integer",
2585
+ "primaryKey": false,
2586
+ "notNull": true,
2587
+ "autoincrement": false,
2588
+ "default": "(unixepoch('subsec') * 1000)"
2589
+ },
2590
+ "updated_at": {
2591
+ "name": "updated_at",
2592
+ "type": "integer",
2593
+ "primaryKey": false,
2594
+ "notNull": true,
2595
+ "autoincrement": false,
2596
+ "default": "(unixepoch('subsec') * 1000)"
2597
+ }
2598
+ },
2599
+ "indexes": {
2600
+ "worktree_name_per_project": {
2601
+ "name": "worktree_name_per_project",
2602
+ "columns": [
2603
+ "project_id",
2604
+ "name"
2605
+ ],
2606
+ "isUnique": true
2607
+ }
2608
+ },
2609
+ "foreignKeys": {
2610
+ "worktree_project_id_project_id_fk": {
2611
+ "name": "worktree_project_id_project_id_fk",
2612
+ "tableFrom": "worktree",
2613
+ "tableTo": "project",
2614
+ "columnsFrom": [
2615
+ "project_id"
2616
+ ],
2617
+ "columnsTo": [
2618
+ "id"
2619
+ ],
2620
+ "onDelete": "restrict",
2621
+ "onUpdate": "no action"
2622
+ }
2623
+ },
2624
+ "compositePrimaryKeys": {},
2625
+ "uniqueConstraints": {},
2626
+ "checkConstraints": {
2627
+ "worktree_state": {
2628
+ "name": "worktree_state",
2629
+ "value": "\"worktree\".\"state\" IN ('active', 'missing')"
2630
+ }
2631
+ }
2632
+ }
2633
+ },
2634
+ "views": {},
2635
+ "enums": {},
2636
+ "_meta": {
2637
+ "schemas": {},
2638
+ "tables": {},
2639
+ "columns": {}
2640
+ },
2641
+ "internal": {
2642
+ "indexes": {}
2643
+ }
2644
+ }