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