@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,2885 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "9159230d-1021-4481-93b2-608c81df06ec",
5
+ "prevId": "c38d80e1-0ccc-4a64-b078-46aefba6fefe",
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
+ "continued_from_id": {
1696
+ "name": "continued_from_id",
1697
+ "type": "text",
1698
+ "primaryKey": false,
1699
+ "notNull": false,
1700
+ "autoincrement": false
1701
+ },
1702
+ "task_id": {
1703
+ "name": "task_id",
1704
+ "type": "text",
1705
+ "primaryKey": false,
1706
+ "notNull": false,
1707
+ "autoincrement": false
1708
+ },
1709
+ "task_role": {
1710
+ "name": "task_role",
1711
+ "type": "text",
1712
+ "primaryKey": false,
1713
+ "notNull": false,
1714
+ "autoincrement": false
1715
+ },
1716
+ "pending_prompt": {
1717
+ "name": "pending_prompt",
1718
+ "type": "text",
1719
+ "primaryKey": false,
1720
+ "notNull": false,
1721
+ "autoincrement": false
1722
+ },
1723
+ "pending_reason": {
1724
+ "name": "pending_reason",
1725
+ "type": "text",
1726
+ "primaryKey": false,
1727
+ "notNull": false,
1728
+ "autoincrement": false
1729
+ },
1730
+ "pending_detail": {
1731
+ "name": "pending_detail",
1732
+ "type": "text",
1733
+ "primaryKey": false,
1734
+ "notNull": false,
1735
+ "autoincrement": false
1736
+ },
1737
+ "created_at": {
1738
+ "name": "created_at",
1739
+ "type": "integer",
1740
+ "primaryKey": false,
1741
+ "notNull": true,
1742
+ "autoincrement": false,
1743
+ "default": "(unixepoch('subsec') * 1000)"
1744
+ },
1745
+ "updated_at": {
1746
+ "name": "updated_at",
1747
+ "type": "integer",
1748
+ "primaryKey": false,
1749
+ "notNull": true,
1750
+ "autoincrement": false,
1751
+ "default": "(unixepoch('subsec') * 1000)"
1752
+ }
1753
+ },
1754
+ "indexes": {},
1755
+ "foreignKeys": {
1756
+ "session_agent_config_id_agent_config_id_fk": {
1757
+ "name": "session_agent_config_id_agent_config_id_fk",
1758
+ "tableFrom": "session",
1759
+ "tableTo": "agent_config",
1760
+ "columnsFrom": [
1761
+ "agent_config_id"
1762
+ ],
1763
+ "columnsTo": [
1764
+ "id"
1765
+ ],
1766
+ "onDelete": "restrict",
1767
+ "onUpdate": "no action"
1768
+ },
1769
+ "session_agent_account_id_agent_account_id_fk": {
1770
+ "name": "session_agent_account_id_agent_account_id_fk",
1771
+ "tableFrom": "session",
1772
+ "tableTo": "agent_account",
1773
+ "columnsFrom": [
1774
+ "agent_account_id"
1775
+ ],
1776
+ "columnsTo": [
1777
+ "id"
1778
+ ],
1779
+ "onDelete": "restrict",
1780
+ "onUpdate": "no action"
1781
+ },
1782
+ "session_continued_from_id_session_id_fk": {
1783
+ "name": "session_continued_from_id_session_id_fk",
1784
+ "tableFrom": "session",
1785
+ "tableTo": "session",
1786
+ "columnsFrom": [
1787
+ "continued_from_id"
1788
+ ],
1789
+ "columnsTo": [
1790
+ "id"
1791
+ ],
1792
+ "onDelete": "set null",
1793
+ "onUpdate": "no action"
1794
+ },
1795
+ "session_task_id_task_id_fk": {
1796
+ "name": "session_task_id_task_id_fk",
1797
+ "tableFrom": "session",
1798
+ "tableTo": "task",
1799
+ "columnsFrom": [
1800
+ "task_id"
1801
+ ],
1802
+ "columnsTo": [
1803
+ "id"
1804
+ ],
1805
+ "onDelete": "set null",
1806
+ "onUpdate": "no action"
1807
+ }
1808
+ },
1809
+ "compositePrimaryKeys": {},
1810
+ "uniqueConstraints": {},
1811
+ "checkConstraints": {
1812
+ "session_kind": {
1813
+ "name": "session_kind",
1814
+ "value": "\"session\".\"kind\" IN ('shell', 'agent', 'script')"
1815
+ },
1816
+ "session_scope_type": {
1817
+ "name": "session_scope_type",
1818
+ "value": "\"session\".\"scope_type\" IN ('project', 'worktree')"
1819
+ },
1820
+ "session_state": {
1821
+ "name": "session_state",
1822
+ "value": "\"session\".\"state\" IN ('running', 'exited')"
1823
+ },
1824
+ "session_agent_config": {
1825
+ "name": "session_agent_config",
1826
+ "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)"
1827
+ },
1828
+ "session_script_name": {
1829
+ "name": "session_script_name",
1830
+ "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)"
1831
+ },
1832
+ "session_exit_code": {
1833
+ "name": "session_exit_code",
1834
+ "value": "(\"session\".\"state\" = 'running' AND \"session\".\"exit_code\" IS NULL)\n OR (\"session\".\"state\" = 'exited')"
1835
+ },
1836
+ "session_transport": {
1837
+ "name": "session_transport",
1838
+ "value": "\"session\".\"transport\" IN ('pty', 'acp')"
1839
+ },
1840
+ "session_shell_transport": {
1841
+ "name": "session_shell_transport",
1842
+ "value": "\"session\".\"kind\" = 'agent' OR \"session\".\"transport\" = 'pty'"
1843
+ },
1844
+ "session_acp_id": {
1845
+ "name": "session_acp_id",
1846
+ "value": "(\"session\".\"transport\" = 'acp' AND \"session\".\"acp_session_id\" IS NOT NULL)\n OR (\"session\".\"transport\" = 'pty' AND \"session\".\"acp_session_id\" IS NULL)"
1847
+ },
1848
+ "session_lumem_mode": {
1849
+ "name": "session_lumem_mode",
1850
+ "value": "\"session\".\"lumem_mode\" IN ('ask', 'auto', 'free')"
1851
+ },
1852
+ "session_pending_reason": {
1853
+ "name": "session_pending_reason",
1854
+ "value": "\"session\".\"pending_reason\" IS NULL OR \"session\".\"pending_reason\" IN ('setup_failed')"
1855
+ }
1856
+ }
1857
+ },
1858
+ "session_usage": {
1859
+ "name": "session_usage",
1860
+ "columns": {
1861
+ "id": {
1862
+ "name": "id",
1863
+ "type": "text",
1864
+ "primaryKey": true,
1865
+ "notNull": true,
1866
+ "autoincrement": false
1867
+ },
1868
+ "session_id": {
1869
+ "name": "session_id",
1870
+ "type": "text",
1871
+ "primaryKey": false,
1872
+ "notNull": true,
1873
+ "autoincrement": false
1874
+ },
1875
+ "project_id": {
1876
+ "name": "project_id",
1877
+ "type": "text",
1878
+ "primaryKey": false,
1879
+ "notNull": true,
1880
+ "autoincrement": false
1881
+ },
1882
+ "worktree_id": {
1883
+ "name": "worktree_id",
1884
+ "type": "text",
1885
+ "primaryKey": false,
1886
+ "notNull": true,
1887
+ "autoincrement": false,
1888
+ "default": "''"
1889
+ },
1890
+ "agent_config_id": {
1891
+ "name": "agent_config_id",
1892
+ "type": "text",
1893
+ "primaryKey": false,
1894
+ "notNull": false,
1895
+ "autoincrement": false
1896
+ },
1897
+ "agent_account_id": {
1898
+ "name": "agent_account_id",
1899
+ "type": "text",
1900
+ "primaryKey": false,
1901
+ "notNull": false,
1902
+ "autoincrement": false
1903
+ },
1904
+ "tokens": {
1905
+ "name": "tokens",
1906
+ "type": "integer",
1907
+ "primaryKey": false,
1908
+ "notNull": true,
1909
+ "autoincrement": false,
1910
+ "default": 0
1911
+ },
1912
+ "turn": {
1913
+ "name": "turn",
1914
+ "type": "integer",
1915
+ "primaryKey": false,
1916
+ "notNull": true,
1917
+ "autoincrement": false,
1918
+ "default": 0
1919
+ },
1920
+ "cost": {
1921
+ "name": "cost",
1922
+ "type": "real",
1923
+ "primaryKey": false,
1924
+ "notNull": false,
1925
+ "autoincrement": false
1926
+ },
1927
+ "currency": {
1928
+ "name": "currency",
1929
+ "type": "text",
1930
+ "primaryKey": false,
1931
+ "notNull": false,
1932
+ "autoincrement": false
1933
+ },
1934
+ "created_at": {
1935
+ "name": "created_at",
1936
+ "type": "integer",
1937
+ "primaryKey": false,
1938
+ "notNull": true,
1939
+ "autoincrement": false,
1940
+ "default": "(unixepoch('subsec') * 1000)"
1941
+ },
1942
+ "updated_at": {
1943
+ "name": "updated_at",
1944
+ "type": "integer",
1945
+ "primaryKey": false,
1946
+ "notNull": true,
1947
+ "autoincrement": false,
1948
+ "default": "(unixepoch('subsec') * 1000)"
1949
+ }
1950
+ },
1951
+ "indexes": {
1952
+ "session_usage_project_at": {
1953
+ "name": "session_usage_project_at",
1954
+ "columns": [
1955
+ "project_id",
1956
+ "created_at"
1957
+ ],
1958
+ "isUnique": false
1959
+ },
1960
+ "session_usage_worktree_at": {
1961
+ "name": "session_usage_worktree_at",
1962
+ "columns": [
1963
+ "worktree_id",
1964
+ "created_at"
1965
+ ],
1966
+ "isUnique": false
1967
+ }
1968
+ },
1969
+ "foreignKeys": {},
1970
+ "compositePrimaryKeys": {},
1971
+ "uniqueConstraints": {},
1972
+ "checkConstraints": {
1973
+ "session_usage_tokens": {
1974
+ "name": "session_usage_tokens",
1975
+ "value": "\"session_usage\".\"tokens\" >= 0"
1976
+ }
1977
+ }
1978
+ },
1979
+ "task": {
1980
+ "name": "task",
1981
+ "columns": {
1982
+ "id": {
1983
+ "name": "id",
1984
+ "type": "text",
1985
+ "primaryKey": true,
1986
+ "notNull": true,
1987
+ "autoincrement": false
1988
+ },
1989
+ "workspace_id": {
1990
+ "name": "workspace_id",
1991
+ "type": "text",
1992
+ "primaryKey": false,
1993
+ "notNull": true,
1994
+ "autoincrement": false
1995
+ },
1996
+ "project_id": {
1997
+ "name": "project_id",
1998
+ "type": "text",
1999
+ "primaryKey": false,
2000
+ "notNull": true,
2001
+ "autoincrement": false
2002
+ },
2003
+ "title": {
2004
+ "name": "title",
2005
+ "type": "text",
2006
+ "primaryKey": false,
2007
+ "notNull": true,
2008
+ "autoincrement": false
2009
+ },
2010
+ "body": {
2011
+ "name": "body",
2012
+ "type": "text",
2013
+ "primaryKey": false,
2014
+ "notNull": true,
2015
+ "autoincrement": false,
2016
+ "default": "''"
2017
+ },
2018
+ "status": {
2019
+ "name": "status",
2020
+ "type": "text",
2021
+ "primaryKey": false,
2022
+ "notNull": true,
2023
+ "autoincrement": false,
2024
+ "default": "'open'"
2025
+ },
2026
+ "created_by": {
2027
+ "name": "created_by",
2028
+ "type": "text",
2029
+ "primaryKey": false,
2030
+ "notNull": true,
2031
+ "autoincrement": false,
2032
+ "default": "'human'"
2033
+ },
2034
+ "created_by_session": {
2035
+ "name": "created_by_session",
2036
+ "type": "text",
2037
+ "primaryKey": false,
2038
+ "notNull": false,
2039
+ "autoincrement": false
2040
+ },
2041
+ "worktree_id": {
2042
+ "name": "worktree_id",
2043
+ "type": "text",
2044
+ "primaryKey": false,
2045
+ "notNull": false,
2046
+ "autoincrement": false
2047
+ },
2048
+ "position": {
2049
+ "name": "position",
2050
+ "type": "integer",
2051
+ "primaryKey": false,
2052
+ "notNull": true,
2053
+ "autoincrement": false,
2054
+ "default": 0
2055
+ },
2056
+ "links": {
2057
+ "name": "links",
2058
+ "type": "text",
2059
+ "primaryKey": false,
2060
+ "notNull": true,
2061
+ "autoincrement": false,
2062
+ "default": "'[]'"
2063
+ },
2064
+ "reason": {
2065
+ "name": "reason",
2066
+ "type": "text",
2067
+ "primaryKey": false,
2068
+ "notNull": false,
2069
+ "autoincrement": false
2070
+ },
2071
+ "attempts": {
2072
+ "name": "attempts",
2073
+ "type": "integer",
2074
+ "primaryKey": false,
2075
+ "notNull": true,
2076
+ "autoincrement": false,
2077
+ "default": 0
2078
+ },
2079
+ "bounces": {
2080
+ "name": "bounces",
2081
+ "type": "integer",
2082
+ "primaryKey": false,
2083
+ "notNull": true,
2084
+ "autoincrement": false,
2085
+ "default": 0
2086
+ },
2087
+ "quota_refusals": {
2088
+ "name": "quota_refusals",
2089
+ "type": "integer",
2090
+ "primaryKey": false,
2091
+ "notNull": true,
2092
+ "autoincrement": false,
2093
+ "default": 0
2094
+ },
2095
+ "paused_until": {
2096
+ "name": "paused_until",
2097
+ "type": "integer",
2098
+ "primaryKey": false,
2099
+ "notNull": false,
2100
+ "autoincrement": false
2101
+ },
2102
+ "autonomy": {
2103
+ "name": "autonomy",
2104
+ "type": "text",
2105
+ "primaryKey": false,
2106
+ "notNull": true,
2107
+ "autoincrement": false,
2108
+ "default": "'inherit'"
2109
+ },
2110
+ "prepared_prompt": {
2111
+ "name": "prepared_prompt",
2112
+ "type": "text",
2113
+ "primaryKey": false,
2114
+ "notNull": false,
2115
+ "autoincrement": false
2116
+ },
2117
+ "prepared_role": {
2118
+ "name": "prepared_role",
2119
+ "type": "text",
2120
+ "primaryKey": false,
2121
+ "notNull": false,
2122
+ "autoincrement": false
2123
+ },
2124
+ "blocked_reason": {
2125
+ "name": "blocked_reason",
2126
+ "type": "text",
2127
+ "primaryKey": false,
2128
+ "notNull": false,
2129
+ "autoincrement": false
2130
+ },
2131
+ "notified_at": {
2132
+ "name": "notified_at",
2133
+ "type": "integer",
2134
+ "primaryKey": false,
2135
+ "notNull": false,
2136
+ "autoincrement": false
2137
+ },
2138
+ "external_source": {
2139
+ "name": "external_source",
2140
+ "type": "text",
2141
+ "primaryKey": false,
2142
+ "notNull": false,
2143
+ "autoincrement": false
2144
+ },
2145
+ "external_id": {
2146
+ "name": "external_id",
2147
+ "type": "text",
2148
+ "primaryKey": false,
2149
+ "notNull": false,
2150
+ "autoincrement": false
2151
+ },
2152
+ "external_state": {
2153
+ "name": "external_state",
2154
+ "type": "text",
2155
+ "primaryKey": false,
2156
+ "notNull": false,
2157
+ "autoincrement": false
2158
+ },
2159
+ "external_assignee": {
2160
+ "name": "external_assignee",
2161
+ "type": "text",
2162
+ "primaryKey": false,
2163
+ "notNull": false,
2164
+ "autoincrement": false
2165
+ },
2166
+ "external_body_hash": {
2167
+ "name": "external_body_hash",
2168
+ "type": "text",
2169
+ "primaryKey": false,
2170
+ "notNull": false,
2171
+ "autoincrement": false
2172
+ },
2173
+ "external_marks": {
2174
+ "name": "external_marks",
2175
+ "type": "text",
2176
+ "primaryKey": false,
2177
+ "notNull": true,
2178
+ "autoincrement": false,
2179
+ "default": "'[]'"
2180
+ },
2181
+ "status_changed_at": {
2182
+ "name": "status_changed_at",
2183
+ "type": "integer",
2184
+ "primaryKey": false,
2185
+ "notNull": true,
2186
+ "autoincrement": false,
2187
+ "default": "0"
2188
+ },
2189
+ "closed_at": {
2190
+ "name": "closed_at",
2191
+ "type": "integer",
2192
+ "primaryKey": false,
2193
+ "notNull": false,
2194
+ "autoincrement": false
2195
+ },
2196
+ "created_at": {
2197
+ "name": "created_at",
2198
+ "type": "integer",
2199
+ "primaryKey": false,
2200
+ "notNull": true,
2201
+ "autoincrement": false,
2202
+ "default": "(unixepoch('subsec') * 1000)"
2203
+ },
2204
+ "updated_at": {
2205
+ "name": "updated_at",
2206
+ "type": "integer",
2207
+ "primaryKey": false,
2208
+ "notNull": true,
2209
+ "autoincrement": false,
2210
+ "default": "(unixepoch('subsec') * 1000)"
2211
+ }
2212
+ },
2213
+ "indexes": {
2214
+ "task_by_workspace": {
2215
+ "name": "task_by_workspace",
2216
+ "columns": [
2217
+ "workspace_id",
2218
+ "status"
2219
+ ],
2220
+ "isUnique": false
2221
+ },
2222
+ "task_by_position": {
2223
+ "name": "task_by_position",
2224
+ "columns": [
2225
+ "workspace_id",
2226
+ "status",
2227
+ "position"
2228
+ ],
2229
+ "isUnique": false
2230
+ },
2231
+ "task_by_project": {
2232
+ "name": "task_by_project",
2233
+ "columns": [
2234
+ "project_id"
2235
+ ],
2236
+ "isUnique": false
2237
+ },
2238
+ "task_external_in_workspace": {
2239
+ "name": "task_external_in_workspace",
2240
+ "columns": [
2241
+ "workspace_id",
2242
+ "external_source",
2243
+ "external_id"
2244
+ ],
2245
+ "isUnique": true
2246
+ }
2247
+ },
2248
+ "foreignKeys": {
2249
+ "task_workspace_id_workspace_id_fk": {
2250
+ "name": "task_workspace_id_workspace_id_fk",
2251
+ "tableFrom": "task",
2252
+ "tableTo": "workspace",
2253
+ "columnsFrom": [
2254
+ "workspace_id"
2255
+ ],
2256
+ "columnsTo": [
2257
+ "id"
2258
+ ],
2259
+ "onDelete": "restrict",
2260
+ "onUpdate": "no action"
2261
+ },
2262
+ "task_project_id_project_id_fk": {
2263
+ "name": "task_project_id_project_id_fk",
2264
+ "tableFrom": "task",
2265
+ "tableTo": "project",
2266
+ "columnsFrom": [
2267
+ "project_id"
2268
+ ],
2269
+ "columnsTo": [
2270
+ "id"
2271
+ ],
2272
+ "onDelete": "restrict",
2273
+ "onUpdate": "no action"
2274
+ },
2275
+ "task_worktree_id_worktree_id_fk": {
2276
+ "name": "task_worktree_id_worktree_id_fk",
2277
+ "tableFrom": "task",
2278
+ "tableTo": "worktree",
2279
+ "columnsFrom": [
2280
+ "worktree_id"
2281
+ ],
2282
+ "columnsTo": [
2283
+ "id"
2284
+ ],
2285
+ "onDelete": "set null",
2286
+ "onUpdate": "no action"
2287
+ }
2288
+ },
2289
+ "compositePrimaryKeys": {},
2290
+ "uniqueConstraints": {},
2291
+ "checkConstraints": {
2292
+ "task_status": {
2293
+ "name": "task_status",
2294
+ "value": "\"task\".\"status\" IN ('proposed', 'backlog', 'open', 'in_progress', 'review', 'testing', 'ready_to_merge', 'done', 'dropped')"
2295
+ },
2296
+ "task_created_by": {
2297
+ "name": "task_created_by",
2298
+ "value": "\"task\".\"created_by\" IN ('human', 'agent')"
2299
+ },
2300
+ "task_autonomy": {
2301
+ "name": "task_autonomy",
2302
+ "value": "\"task\".\"autonomy\" IN ('inherit', 'off')"
2303
+ },
2304
+ "task_attempts_not_negative": {
2305
+ "name": "task_attempts_not_negative",
2306
+ "value": "\"task\".\"attempts\" >= 0"
2307
+ },
2308
+ "task_bounces_not_negative": {
2309
+ "name": "task_bounces_not_negative",
2310
+ "value": "\"task\".\"bounces\" >= 0"
2311
+ },
2312
+ "task_prepared_pair": {
2313
+ "name": "task_prepared_pair",
2314
+ "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)"
2315
+ },
2316
+ "task_agent_provenance": {
2317
+ "name": "task_agent_provenance",
2318
+ "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)"
2319
+ },
2320
+ "task_closed_at": {
2321
+ "name": "task_closed_at",
2322
+ "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)"
2323
+ }
2324
+ }
2325
+ },
2326
+ "task_comment": {
2327
+ "name": "task_comment",
2328
+ "columns": {
2329
+ "id": {
2330
+ "name": "id",
2331
+ "type": "text",
2332
+ "primaryKey": true,
2333
+ "notNull": true,
2334
+ "autoincrement": false
2335
+ },
2336
+ "task_id": {
2337
+ "name": "task_id",
2338
+ "type": "text",
2339
+ "primaryKey": false,
2340
+ "notNull": true,
2341
+ "autoincrement": false
2342
+ },
2343
+ "body": {
2344
+ "name": "body",
2345
+ "type": "text",
2346
+ "primaryKey": false,
2347
+ "notNull": true,
2348
+ "autoincrement": false
2349
+ },
2350
+ "created_by": {
2351
+ "name": "created_by",
2352
+ "type": "text",
2353
+ "primaryKey": false,
2354
+ "notNull": true,
2355
+ "autoincrement": false,
2356
+ "default": "'human'"
2357
+ },
2358
+ "created_by_session": {
2359
+ "name": "created_by_session",
2360
+ "type": "text",
2361
+ "primaryKey": false,
2362
+ "notNull": false,
2363
+ "autoincrement": false
2364
+ },
2365
+ "created_at": {
2366
+ "name": "created_at",
2367
+ "type": "integer",
2368
+ "primaryKey": false,
2369
+ "notNull": true,
2370
+ "autoincrement": false,
2371
+ "default": "(unixepoch('subsec') * 1000)"
2372
+ },
2373
+ "updated_at": {
2374
+ "name": "updated_at",
2375
+ "type": "integer",
2376
+ "primaryKey": false,
2377
+ "notNull": true,
2378
+ "autoincrement": false,
2379
+ "default": "(unixepoch('subsec') * 1000)"
2380
+ }
2381
+ },
2382
+ "indexes": {
2383
+ "task_comment_by_task": {
2384
+ "name": "task_comment_by_task",
2385
+ "columns": [
2386
+ "task_id",
2387
+ "created_at"
2388
+ ],
2389
+ "isUnique": false
2390
+ }
2391
+ },
2392
+ "foreignKeys": {
2393
+ "task_comment_task_id_task_id_fk": {
2394
+ "name": "task_comment_task_id_task_id_fk",
2395
+ "tableFrom": "task_comment",
2396
+ "tableTo": "task",
2397
+ "columnsFrom": [
2398
+ "task_id"
2399
+ ],
2400
+ "columnsTo": [
2401
+ "id"
2402
+ ],
2403
+ "onDelete": "cascade",
2404
+ "onUpdate": "no action"
2405
+ }
2406
+ },
2407
+ "compositePrimaryKeys": {},
2408
+ "uniqueConstraints": {},
2409
+ "checkConstraints": {
2410
+ "task_comment_created_by": {
2411
+ "name": "task_comment_created_by",
2412
+ "value": "\"task_comment\".\"created_by\" IN ('human', 'agent')"
2413
+ },
2414
+ "task_comment_provenance": {
2415
+ "name": "task_comment_provenance",
2416
+ "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)"
2417
+ }
2418
+ }
2419
+ },
2420
+ "task_finding": {
2421
+ "name": "task_finding",
2422
+ "columns": {
2423
+ "id": {
2424
+ "name": "id",
2425
+ "type": "text",
2426
+ "primaryKey": true,
2427
+ "notNull": true,
2428
+ "autoincrement": false
2429
+ },
2430
+ "task_id": {
2431
+ "name": "task_id",
2432
+ "type": "text",
2433
+ "primaryKey": false,
2434
+ "notNull": true,
2435
+ "autoincrement": false
2436
+ },
2437
+ "found_by_session": {
2438
+ "name": "found_by_session",
2439
+ "type": "text",
2440
+ "primaryKey": false,
2441
+ "notNull": true,
2442
+ "autoincrement": false
2443
+ },
2444
+ "role": {
2445
+ "name": "role",
2446
+ "type": "text",
2447
+ "primaryKey": false,
2448
+ "notNull": true,
2449
+ "autoincrement": false
2450
+ },
2451
+ "bucket": {
2452
+ "name": "bucket",
2453
+ "type": "text",
2454
+ "primaryKey": false,
2455
+ "notNull": true,
2456
+ "autoincrement": false
2457
+ },
2458
+ "title": {
2459
+ "name": "title",
2460
+ "type": "text",
2461
+ "primaryKey": false,
2462
+ "notNull": true,
2463
+ "autoincrement": false
2464
+ },
2465
+ "detail": {
2466
+ "name": "detail",
2467
+ "type": "text",
2468
+ "primaryKey": false,
2469
+ "notNull": true,
2470
+ "autoincrement": false,
2471
+ "default": "''"
2472
+ },
2473
+ "command": {
2474
+ "name": "command",
2475
+ "type": "text",
2476
+ "primaryKey": false,
2477
+ "notNull": false,
2478
+ "autoincrement": false
2479
+ },
2480
+ "expected": {
2481
+ "name": "expected",
2482
+ "type": "text",
2483
+ "primaryKey": false,
2484
+ "notNull": false,
2485
+ "autoincrement": false
2486
+ },
2487
+ "verification": {
2488
+ "name": "verification",
2489
+ "type": "text",
2490
+ "primaryKey": false,
2491
+ "notNull": true,
2492
+ "autoincrement": false,
2493
+ "default": "'pending'"
2494
+ },
2495
+ "output": {
2496
+ "name": "output",
2497
+ "type": "text",
2498
+ "primaryKey": false,
2499
+ "notNull": false,
2500
+ "autoincrement": false
2501
+ },
2502
+ "created_at": {
2503
+ "name": "created_at",
2504
+ "type": "integer",
2505
+ "primaryKey": false,
2506
+ "notNull": true,
2507
+ "autoincrement": false,
2508
+ "default": "(unixepoch('subsec') * 1000)"
2509
+ },
2510
+ "updated_at": {
2511
+ "name": "updated_at",
2512
+ "type": "integer",
2513
+ "primaryKey": false,
2514
+ "notNull": true,
2515
+ "autoincrement": false,
2516
+ "default": "(unixepoch('subsec') * 1000)"
2517
+ }
2518
+ },
2519
+ "indexes": {
2520
+ "task_finding_by_task": {
2521
+ "name": "task_finding_by_task",
2522
+ "columns": [
2523
+ "task_id",
2524
+ "created_at"
2525
+ ],
2526
+ "isUnique": false
2527
+ }
2528
+ },
2529
+ "foreignKeys": {
2530
+ "task_finding_task_id_task_id_fk": {
2531
+ "name": "task_finding_task_id_task_id_fk",
2532
+ "tableFrom": "task_finding",
2533
+ "tableTo": "task",
2534
+ "columnsFrom": [
2535
+ "task_id"
2536
+ ],
2537
+ "columnsTo": [
2538
+ "id"
2539
+ ],
2540
+ "onDelete": "cascade",
2541
+ "onUpdate": "no action"
2542
+ }
2543
+ },
2544
+ "compositePrimaryKeys": {},
2545
+ "uniqueConstraints": {},
2546
+ "checkConstraints": {
2547
+ "task_finding_bucket": {
2548
+ "name": "task_finding_bucket",
2549
+ "value": "\"task_finding\".\"bucket\" IN ('blocks', 'notes')"
2550
+ },
2551
+ "task_finding_verification": {
2552
+ "name": "task_finding_verification",
2553
+ "value": "\"task_finding\".\"verification\" IN ('pending', 'reproduced', 'refuted', 'skipped')"
2554
+ },
2555
+ "task_finding_reproduction": {
2556
+ "name": "task_finding_reproduction",
2557
+ "value": "(\"task_finding\".\"bucket\" = 'blocks' AND \"task_finding\".\"command\" IS NOT NULL)\n OR (\"task_finding\".\"bucket\" = 'notes' AND \"task_finding\".\"command\" IS NULL)"
2558
+ }
2559
+ }
2560
+ },
2561
+ "task_review": {
2562
+ "name": "task_review",
2563
+ "columns": {
2564
+ "id": {
2565
+ "name": "id",
2566
+ "type": "text",
2567
+ "primaryKey": true,
2568
+ "notNull": true,
2569
+ "autoincrement": false
2570
+ },
2571
+ "task_id": {
2572
+ "name": "task_id",
2573
+ "type": "text",
2574
+ "primaryKey": false,
2575
+ "notNull": true,
2576
+ "autoincrement": false
2577
+ },
2578
+ "by_session": {
2579
+ "name": "by_session",
2580
+ "type": "text",
2581
+ "primaryKey": false,
2582
+ "notNull": true,
2583
+ "autoincrement": false
2584
+ },
2585
+ "role": {
2586
+ "name": "role",
2587
+ "type": "text",
2588
+ "primaryKey": false,
2589
+ "notNull": true,
2590
+ "autoincrement": false
2591
+ },
2592
+ "blocks": {
2593
+ "name": "blocks",
2594
+ "type": "integer",
2595
+ "primaryKey": false,
2596
+ "notNull": true,
2597
+ "autoincrement": false,
2598
+ "default": 0
2599
+ },
2600
+ "notes": {
2601
+ "name": "notes",
2602
+ "type": "integer",
2603
+ "primaryKey": false,
2604
+ "notNull": true,
2605
+ "autoincrement": false,
2606
+ "default": 0
2607
+ },
2608
+ "created_at": {
2609
+ "name": "created_at",
2610
+ "type": "integer",
2611
+ "primaryKey": false,
2612
+ "notNull": true,
2613
+ "autoincrement": false,
2614
+ "default": "(unixepoch('subsec') * 1000)"
2615
+ },
2616
+ "updated_at": {
2617
+ "name": "updated_at",
2618
+ "type": "integer",
2619
+ "primaryKey": false,
2620
+ "notNull": true,
2621
+ "autoincrement": false,
2622
+ "default": "(unixepoch('subsec') * 1000)"
2623
+ }
2624
+ },
2625
+ "indexes": {
2626
+ "task_review_by_session": {
2627
+ "name": "task_review_by_session",
2628
+ "columns": [
2629
+ "by_session",
2630
+ "created_at"
2631
+ ],
2632
+ "isUnique": false
2633
+ }
2634
+ },
2635
+ "foreignKeys": {
2636
+ "task_review_task_id_task_id_fk": {
2637
+ "name": "task_review_task_id_task_id_fk",
2638
+ "tableFrom": "task_review",
2639
+ "tableTo": "task",
2640
+ "columnsFrom": [
2641
+ "task_id"
2642
+ ],
2643
+ "columnsTo": [
2644
+ "id"
2645
+ ],
2646
+ "onDelete": "cascade",
2647
+ "onUpdate": "no action"
2648
+ }
2649
+ },
2650
+ "compositePrimaryKeys": {},
2651
+ "uniqueConstraints": {},
2652
+ "checkConstraints": {
2653
+ "task_review_counts_not_negative": {
2654
+ "name": "task_review_counts_not_negative",
2655
+ "value": "\"task_review\".\"blocks\" >= 0 AND \"task_review\".\"notes\" >= 0"
2656
+ }
2657
+ }
2658
+ },
2659
+ "workspace": {
2660
+ "name": "workspace",
2661
+ "columns": {
2662
+ "id": {
2663
+ "name": "id",
2664
+ "type": "text",
2665
+ "primaryKey": true,
2666
+ "notNull": true,
2667
+ "autoincrement": false
2668
+ },
2669
+ "name": {
2670
+ "name": "name",
2671
+ "type": "text",
2672
+ "primaryKey": false,
2673
+ "notNull": true,
2674
+ "autoincrement": false
2675
+ },
2676
+ "default_lumem_mode": {
2677
+ "name": "default_lumem_mode",
2678
+ "type": "text",
2679
+ "primaryKey": false,
2680
+ "notNull": true,
2681
+ "autoincrement": false,
2682
+ "default": "'ask'"
2683
+ },
2684
+ "budget_cost_per_task": {
2685
+ "name": "budget_cost_per_task",
2686
+ "type": "real",
2687
+ "primaryKey": false,
2688
+ "notNull": false,
2689
+ "autoincrement": false
2690
+ },
2691
+ "budget_cost_per_day": {
2692
+ "name": "budget_cost_per_day",
2693
+ "type": "real",
2694
+ "primaryKey": false,
2695
+ "notNull": false,
2696
+ "autoincrement": false
2697
+ },
2698
+ "budget_turns_per_session": {
2699
+ "name": "budget_turns_per_session",
2700
+ "type": "integer",
2701
+ "primaryKey": false,
2702
+ "notNull": false,
2703
+ "autoincrement": false
2704
+ },
2705
+ "autonomy": {
2706
+ "name": "autonomy",
2707
+ "type": "text",
2708
+ "primaryKey": false,
2709
+ "notNull": true,
2710
+ "autoincrement": false,
2711
+ "default": "'manual'"
2712
+ },
2713
+ "autonomy_max_parallel": {
2714
+ "name": "autonomy_max_parallel",
2715
+ "type": "integer",
2716
+ "primaryKey": false,
2717
+ "notNull": true,
2718
+ "autoincrement": false,
2719
+ "default": 2
2720
+ },
2721
+ "merged_always_removes": {
2722
+ "name": "merged_always_removes",
2723
+ "type": "integer",
2724
+ "primaryKey": false,
2725
+ "notNull": true,
2726
+ "autoincrement": false,
2727
+ "default": false
2728
+ },
2729
+ "created_at": {
2730
+ "name": "created_at",
2731
+ "type": "integer",
2732
+ "primaryKey": false,
2733
+ "notNull": true,
2734
+ "autoincrement": false,
2735
+ "default": "(unixepoch('subsec') * 1000)"
2736
+ },
2737
+ "updated_at": {
2738
+ "name": "updated_at",
2739
+ "type": "integer",
2740
+ "primaryKey": false,
2741
+ "notNull": true,
2742
+ "autoincrement": false,
2743
+ "default": "(unixepoch('subsec') * 1000)"
2744
+ }
2745
+ },
2746
+ "indexes": {
2747
+ "workspace_name_unique": {
2748
+ "name": "workspace_name_unique",
2749
+ "columns": [
2750
+ "name"
2751
+ ],
2752
+ "isUnique": true
2753
+ }
2754
+ },
2755
+ "foreignKeys": {},
2756
+ "compositePrimaryKeys": {},
2757
+ "uniqueConstraints": {},
2758
+ "checkConstraints": {
2759
+ "workspace_default_lumem_mode": {
2760
+ "name": "workspace_default_lumem_mode",
2761
+ "value": "\"workspace\".\"default_lumem_mode\" IN ('ask', 'auto')"
2762
+ },
2763
+ "workspace_autonomy": {
2764
+ "name": "workspace_autonomy",
2765
+ "value": "\"workspace\".\"autonomy\" IN ('manual', 'assistido', 'autonomo')"
2766
+ },
2767
+ "workspace_autonomy_max_parallel": {
2768
+ "name": "workspace_autonomy_max_parallel",
2769
+ "value": "\"workspace\".\"autonomy_max_parallel\" >= 0"
2770
+ },
2771
+ "workspace_budget_not_negative": {
2772
+ "name": "workspace_budget_not_negative",
2773
+ "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)"
2774
+ }
2775
+ }
2776
+ },
2777
+ "worktree": {
2778
+ "name": "worktree",
2779
+ "columns": {
2780
+ "id": {
2781
+ "name": "id",
2782
+ "type": "text",
2783
+ "primaryKey": true,
2784
+ "notNull": true,
2785
+ "autoincrement": false
2786
+ },
2787
+ "project_id": {
2788
+ "name": "project_id",
2789
+ "type": "text",
2790
+ "primaryKey": false,
2791
+ "notNull": true,
2792
+ "autoincrement": false
2793
+ },
2794
+ "name": {
2795
+ "name": "name",
2796
+ "type": "text",
2797
+ "primaryKey": false,
2798
+ "notNull": true,
2799
+ "autoincrement": false
2800
+ },
2801
+ "branch": {
2802
+ "name": "branch",
2803
+ "type": "text",
2804
+ "primaryKey": false,
2805
+ "notNull": true,
2806
+ "autoincrement": false
2807
+ },
2808
+ "path": {
2809
+ "name": "path",
2810
+ "type": "text",
2811
+ "primaryKey": false,
2812
+ "notNull": true,
2813
+ "autoincrement": false
2814
+ },
2815
+ "state": {
2816
+ "name": "state",
2817
+ "type": "text",
2818
+ "primaryKey": false,
2819
+ "notNull": true,
2820
+ "autoincrement": false,
2821
+ "default": "'active'"
2822
+ },
2823
+ "created_at": {
2824
+ "name": "created_at",
2825
+ "type": "integer",
2826
+ "primaryKey": false,
2827
+ "notNull": true,
2828
+ "autoincrement": false,
2829
+ "default": "(unixepoch('subsec') * 1000)"
2830
+ },
2831
+ "updated_at": {
2832
+ "name": "updated_at",
2833
+ "type": "integer",
2834
+ "primaryKey": false,
2835
+ "notNull": true,
2836
+ "autoincrement": false,
2837
+ "default": "(unixepoch('subsec') * 1000)"
2838
+ }
2839
+ },
2840
+ "indexes": {
2841
+ "worktree_name_per_project": {
2842
+ "name": "worktree_name_per_project",
2843
+ "columns": [
2844
+ "project_id",
2845
+ "name"
2846
+ ],
2847
+ "isUnique": true
2848
+ }
2849
+ },
2850
+ "foreignKeys": {
2851
+ "worktree_project_id_project_id_fk": {
2852
+ "name": "worktree_project_id_project_id_fk",
2853
+ "tableFrom": "worktree",
2854
+ "tableTo": "project",
2855
+ "columnsFrom": [
2856
+ "project_id"
2857
+ ],
2858
+ "columnsTo": [
2859
+ "id"
2860
+ ],
2861
+ "onDelete": "restrict",
2862
+ "onUpdate": "no action"
2863
+ }
2864
+ },
2865
+ "compositePrimaryKeys": {},
2866
+ "uniqueConstraints": {},
2867
+ "checkConstraints": {
2868
+ "worktree_state": {
2869
+ "name": "worktree_state",
2870
+ "value": "\"worktree\".\"state\" IN ('active', 'missing')"
2871
+ }
2872
+ }
2873
+ }
2874
+ },
2875
+ "views": {},
2876
+ "enums": {},
2877
+ "_meta": {
2878
+ "schemas": {},
2879
+ "tables": {},
2880
+ "columns": {}
2881
+ },
2882
+ "internal": {
2883
+ "indexes": {}
2884
+ }
2885
+ }