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