@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,1895 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "c992e601-4e4c-45e5-a75e-0fbcbcc6f6af",
5
+ "prevId": "900e11e0-3c81-4146-b79a-4f480d3aa095",
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
+ "playbook": {
960
+ "name": "playbook",
961
+ "columns": {
962
+ "id": {
963
+ "name": "id",
964
+ "type": "text",
965
+ "primaryKey": true,
966
+ "notNull": true,
967
+ "autoincrement": false
968
+ },
969
+ "path": {
970
+ "name": "path",
971
+ "type": "text",
972
+ "primaryKey": false,
973
+ "notNull": true,
974
+ "autoincrement": false
975
+ },
976
+ "scope": {
977
+ "name": "scope",
978
+ "type": "text",
979
+ "primaryKey": false,
980
+ "notNull": true,
981
+ "autoincrement": false
982
+ },
983
+ "slug": {
984
+ "name": "slug",
985
+ "type": "text",
986
+ "primaryKey": false,
987
+ "notNull": true,
988
+ "autoincrement": false
989
+ },
990
+ "workspace_id": {
991
+ "name": "workspace_id",
992
+ "type": "text",
993
+ "primaryKey": false,
994
+ "notNull": true,
995
+ "autoincrement": false,
996
+ "default": "''"
997
+ },
998
+ "project_id": {
999
+ "name": "project_id",
1000
+ "type": "text",
1001
+ "primaryKey": false,
1002
+ "notNull": true,
1003
+ "autoincrement": false,
1004
+ "default": "''"
1005
+ },
1006
+ "task_class": {
1007
+ "name": "task_class",
1008
+ "type": "text",
1009
+ "primaryKey": false,
1010
+ "notNull": true,
1011
+ "autoincrement": false
1012
+ },
1013
+ "description": {
1014
+ "name": "description",
1015
+ "type": "text",
1016
+ "primaryKey": false,
1017
+ "notNull": true,
1018
+ "autoincrement": false
1019
+ },
1020
+ "pinned": {
1021
+ "name": "pinned",
1022
+ "type": "integer",
1023
+ "primaryKey": false,
1024
+ "notNull": true,
1025
+ "autoincrement": false,
1026
+ "default": false
1027
+ },
1028
+ "archived": {
1029
+ "name": "archived",
1030
+ "type": "integer",
1031
+ "primaryKey": false,
1032
+ "notNull": true,
1033
+ "autoincrement": false,
1034
+ "default": false
1035
+ },
1036
+ "loads": {
1037
+ "name": "loads",
1038
+ "type": "integer",
1039
+ "primaryKey": false,
1040
+ "notNull": true,
1041
+ "autoincrement": false,
1042
+ "default": 0
1043
+ },
1044
+ "last_loaded_at": {
1045
+ "name": "last_loaded_at",
1046
+ "type": "integer",
1047
+ "primaryKey": false,
1048
+ "notNull": false,
1049
+ "autoincrement": false
1050
+ },
1051
+ "content_hash": {
1052
+ "name": "content_hash",
1053
+ "type": "text",
1054
+ "primaryKey": false,
1055
+ "notNull": true,
1056
+ "autoincrement": false
1057
+ },
1058
+ "created_at": {
1059
+ "name": "created_at",
1060
+ "type": "integer",
1061
+ "primaryKey": false,
1062
+ "notNull": true,
1063
+ "autoincrement": false,
1064
+ "default": "(unixepoch('subsec') * 1000)"
1065
+ },
1066
+ "updated_at": {
1067
+ "name": "updated_at",
1068
+ "type": "integer",
1069
+ "primaryKey": false,
1070
+ "notNull": true,
1071
+ "autoincrement": false,
1072
+ "default": "(unixepoch('subsec') * 1000)"
1073
+ }
1074
+ },
1075
+ "indexes": {
1076
+ "playbook_path_unique": {
1077
+ "name": "playbook_path_unique",
1078
+ "columns": [
1079
+ "path"
1080
+ ],
1081
+ "isUnique": true
1082
+ },
1083
+ "playbook_identity": {
1084
+ "name": "playbook_identity",
1085
+ "columns": [
1086
+ "scope",
1087
+ "workspace_id",
1088
+ "project_id",
1089
+ "slug"
1090
+ ],
1091
+ "isUnique": true
1092
+ }
1093
+ },
1094
+ "foreignKeys": {},
1095
+ "compositePrimaryKeys": {},
1096
+ "uniqueConstraints": {},
1097
+ "checkConstraints": {
1098
+ "playbook_scope": {
1099
+ "name": "playbook_scope",
1100
+ "value": "\"playbook\".\"scope\" IN ('workspace', 'project')"
1101
+ }
1102
+ }
1103
+ },
1104
+ "project": {
1105
+ "name": "project",
1106
+ "columns": {
1107
+ "id": {
1108
+ "name": "id",
1109
+ "type": "text",
1110
+ "primaryKey": true,
1111
+ "notNull": true,
1112
+ "autoincrement": false
1113
+ },
1114
+ "workspace_id": {
1115
+ "name": "workspace_id",
1116
+ "type": "text",
1117
+ "primaryKey": false,
1118
+ "notNull": true,
1119
+ "autoincrement": false
1120
+ },
1121
+ "name": {
1122
+ "name": "name",
1123
+ "type": "text",
1124
+ "primaryKey": false,
1125
+ "notNull": true,
1126
+ "autoincrement": false
1127
+ },
1128
+ "path": {
1129
+ "name": "path",
1130
+ "type": "text",
1131
+ "primaryKey": false,
1132
+ "notNull": true,
1133
+ "autoincrement": false
1134
+ },
1135
+ "default_branch": {
1136
+ "name": "default_branch",
1137
+ "type": "text",
1138
+ "primaryKey": false,
1139
+ "notNull": true,
1140
+ "autoincrement": false
1141
+ },
1142
+ "remote_url": {
1143
+ "name": "remote_url",
1144
+ "type": "text",
1145
+ "primaryKey": false,
1146
+ "notNull": false,
1147
+ "autoincrement": false
1148
+ },
1149
+ "managed": {
1150
+ "name": "managed",
1151
+ "type": "integer",
1152
+ "primaryKey": false,
1153
+ "notNull": true,
1154
+ "autoincrement": false,
1155
+ "default": false
1156
+ },
1157
+ "scripts_trusted_hash": {
1158
+ "name": "scripts_trusted_hash",
1159
+ "type": "text",
1160
+ "primaryKey": false,
1161
+ "notNull": false,
1162
+ "autoincrement": false
1163
+ },
1164
+ "created_at": {
1165
+ "name": "created_at",
1166
+ "type": "integer",
1167
+ "primaryKey": false,
1168
+ "notNull": true,
1169
+ "autoincrement": false,
1170
+ "default": "(unixepoch('subsec') * 1000)"
1171
+ },
1172
+ "updated_at": {
1173
+ "name": "updated_at",
1174
+ "type": "integer",
1175
+ "primaryKey": false,
1176
+ "notNull": true,
1177
+ "autoincrement": false,
1178
+ "default": "(unixepoch('subsec') * 1000)"
1179
+ }
1180
+ },
1181
+ "indexes": {
1182
+ "project_path_unique": {
1183
+ "name": "project_path_unique",
1184
+ "columns": [
1185
+ "path"
1186
+ ],
1187
+ "isUnique": true
1188
+ },
1189
+ "project_name_per_workspace": {
1190
+ "name": "project_name_per_workspace",
1191
+ "columns": [
1192
+ "workspace_id",
1193
+ "name"
1194
+ ],
1195
+ "isUnique": true
1196
+ }
1197
+ },
1198
+ "foreignKeys": {
1199
+ "project_workspace_id_workspace_id_fk": {
1200
+ "name": "project_workspace_id_workspace_id_fk",
1201
+ "tableFrom": "project",
1202
+ "tableTo": "workspace",
1203
+ "columnsFrom": [
1204
+ "workspace_id"
1205
+ ],
1206
+ "columnsTo": [
1207
+ "id"
1208
+ ],
1209
+ "onDelete": "restrict",
1210
+ "onUpdate": "no action"
1211
+ }
1212
+ },
1213
+ "compositePrimaryKeys": {},
1214
+ "uniqueConstraints": {},
1215
+ "checkConstraints": {}
1216
+ },
1217
+ "session": {
1218
+ "name": "session",
1219
+ "columns": {
1220
+ "id": {
1221
+ "name": "id",
1222
+ "type": "text",
1223
+ "primaryKey": true,
1224
+ "notNull": true,
1225
+ "autoincrement": false
1226
+ },
1227
+ "kind": {
1228
+ "name": "kind",
1229
+ "type": "text",
1230
+ "primaryKey": false,
1231
+ "notNull": true,
1232
+ "autoincrement": false
1233
+ },
1234
+ "script_name": {
1235
+ "name": "script_name",
1236
+ "type": "text",
1237
+ "primaryKey": false,
1238
+ "notNull": false,
1239
+ "autoincrement": false
1240
+ },
1241
+ "agent_config_id": {
1242
+ "name": "agent_config_id",
1243
+ "type": "text",
1244
+ "primaryKey": false,
1245
+ "notNull": false,
1246
+ "autoincrement": false
1247
+ },
1248
+ "scope_type": {
1249
+ "name": "scope_type",
1250
+ "type": "text",
1251
+ "primaryKey": false,
1252
+ "notNull": true,
1253
+ "autoincrement": false
1254
+ },
1255
+ "scope_id": {
1256
+ "name": "scope_id",
1257
+ "type": "text",
1258
+ "primaryKey": false,
1259
+ "notNull": true,
1260
+ "autoincrement": false
1261
+ },
1262
+ "cwd": {
1263
+ "name": "cwd",
1264
+ "type": "text",
1265
+ "primaryKey": false,
1266
+ "notNull": true,
1267
+ "autoincrement": false
1268
+ },
1269
+ "command": {
1270
+ "name": "command",
1271
+ "type": "text",
1272
+ "primaryKey": false,
1273
+ "notNull": true,
1274
+ "autoincrement": false
1275
+ },
1276
+ "state": {
1277
+ "name": "state",
1278
+ "type": "text",
1279
+ "primaryKey": false,
1280
+ "notNull": true,
1281
+ "autoincrement": false,
1282
+ "default": "'running'"
1283
+ },
1284
+ "exit_code": {
1285
+ "name": "exit_code",
1286
+ "type": "integer",
1287
+ "primaryKey": false,
1288
+ "notNull": false,
1289
+ "autoincrement": false
1290
+ },
1291
+ "transport": {
1292
+ "name": "transport",
1293
+ "type": "text",
1294
+ "primaryKey": false,
1295
+ "notNull": true,
1296
+ "autoincrement": false,
1297
+ "default": "'pty'"
1298
+ },
1299
+ "acp_session_id": {
1300
+ "name": "acp_session_id",
1301
+ "type": "text",
1302
+ "primaryKey": false,
1303
+ "notNull": false,
1304
+ "autoincrement": false
1305
+ },
1306
+ "mode": {
1307
+ "name": "mode",
1308
+ "type": "text",
1309
+ "primaryKey": false,
1310
+ "notNull": false,
1311
+ "autoincrement": false
1312
+ },
1313
+ "model": {
1314
+ "name": "model",
1315
+ "type": "text",
1316
+ "primaryKey": false,
1317
+ "notNull": false,
1318
+ "autoincrement": false
1319
+ },
1320
+ "lumem_mode": {
1321
+ "name": "lumem_mode",
1322
+ "type": "text",
1323
+ "primaryKey": false,
1324
+ "notNull": true,
1325
+ "autoincrement": false,
1326
+ "default": "'ask'"
1327
+ },
1328
+ "resumed_from_id": {
1329
+ "name": "resumed_from_id",
1330
+ "type": "text",
1331
+ "primaryKey": false,
1332
+ "notNull": false,
1333
+ "autoincrement": false
1334
+ },
1335
+ "task_id": {
1336
+ "name": "task_id",
1337
+ "type": "text",
1338
+ "primaryKey": false,
1339
+ "notNull": false,
1340
+ "autoincrement": false
1341
+ },
1342
+ "created_at": {
1343
+ "name": "created_at",
1344
+ "type": "integer",
1345
+ "primaryKey": false,
1346
+ "notNull": true,
1347
+ "autoincrement": false,
1348
+ "default": "(unixepoch('subsec') * 1000)"
1349
+ },
1350
+ "updated_at": {
1351
+ "name": "updated_at",
1352
+ "type": "integer",
1353
+ "primaryKey": false,
1354
+ "notNull": true,
1355
+ "autoincrement": false,
1356
+ "default": "(unixepoch('subsec') * 1000)"
1357
+ }
1358
+ },
1359
+ "indexes": {},
1360
+ "foreignKeys": {
1361
+ "session_agent_config_id_agent_config_id_fk": {
1362
+ "name": "session_agent_config_id_agent_config_id_fk",
1363
+ "tableFrom": "session",
1364
+ "tableTo": "agent_config",
1365
+ "columnsFrom": [
1366
+ "agent_config_id"
1367
+ ],
1368
+ "columnsTo": [
1369
+ "id"
1370
+ ],
1371
+ "onDelete": "restrict",
1372
+ "onUpdate": "no action"
1373
+ },
1374
+ "session_task_id_task_id_fk": {
1375
+ "name": "session_task_id_task_id_fk",
1376
+ "tableFrom": "session",
1377
+ "tableTo": "task",
1378
+ "columnsFrom": [
1379
+ "task_id"
1380
+ ],
1381
+ "columnsTo": [
1382
+ "id"
1383
+ ],
1384
+ "onDelete": "set null",
1385
+ "onUpdate": "no action"
1386
+ }
1387
+ },
1388
+ "compositePrimaryKeys": {},
1389
+ "uniqueConstraints": {},
1390
+ "checkConstraints": {
1391
+ "session_kind": {
1392
+ "name": "session_kind",
1393
+ "value": "\"session\".\"kind\" IN ('shell', 'agent', 'script')"
1394
+ },
1395
+ "session_scope_type": {
1396
+ "name": "session_scope_type",
1397
+ "value": "\"session\".\"scope_type\" IN ('project', 'worktree')"
1398
+ },
1399
+ "session_state": {
1400
+ "name": "session_state",
1401
+ "value": "\"session\".\"state\" IN ('running', 'exited')"
1402
+ },
1403
+ "session_agent_config": {
1404
+ "name": "session_agent_config",
1405
+ "value": "(\"session\".\"kind\" = 'agent' AND \"session\".\"agent_config_id\" IS NOT NULL)\n OR (\"session\".\"kind\" <> 'agent' AND \"session\".\"agent_config_id\" IS NULL)"
1406
+ },
1407
+ "session_script_name": {
1408
+ "name": "session_script_name",
1409
+ "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)"
1410
+ },
1411
+ "session_exit_code": {
1412
+ "name": "session_exit_code",
1413
+ "value": "(\"session\".\"state\" = 'running' AND \"session\".\"exit_code\" IS NULL)\n OR (\"session\".\"state\" = 'exited')"
1414
+ },
1415
+ "session_transport": {
1416
+ "name": "session_transport",
1417
+ "value": "\"session\".\"transport\" IN ('pty', 'acp')"
1418
+ },
1419
+ "session_shell_transport": {
1420
+ "name": "session_shell_transport",
1421
+ "value": "\"session\".\"kind\" = 'agent' OR \"session\".\"transport\" = 'pty'"
1422
+ },
1423
+ "session_acp_id": {
1424
+ "name": "session_acp_id",
1425
+ "value": "(\"session\".\"transport\" = 'acp' AND \"session\".\"acp_session_id\" IS NOT NULL)\n OR (\"session\".\"transport\" = 'pty' AND \"session\".\"acp_session_id\" IS NULL)"
1426
+ },
1427
+ "session_lumem_mode": {
1428
+ "name": "session_lumem_mode",
1429
+ "value": "\"session\".\"lumem_mode\" IN ('ask', 'auto', 'free')"
1430
+ }
1431
+ }
1432
+ },
1433
+ "session_usage": {
1434
+ "name": "session_usage",
1435
+ "columns": {
1436
+ "id": {
1437
+ "name": "id",
1438
+ "type": "text",
1439
+ "primaryKey": true,
1440
+ "notNull": true,
1441
+ "autoincrement": false
1442
+ },
1443
+ "session_id": {
1444
+ "name": "session_id",
1445
+ "type": "text",
1446
+ "primaryKey": false,
1447
+ "notNull": true,
1448
+ "autoincrement": false
1449
+ },
1450
+ "project_id": {
1451
+ "name": "project_id",
1452
+ "type": "text",
1453
+ "primaryKey": false,
1454
+ "notNull": true,
1455
+ "autoincrement": false
1456
+ },
1457
+ "worktree_id": {
1458
+ "name": "worktree_id",
1459
+ "type": "text",
1460
+ "primaryKey": false,
1461
+ "notNull": true,
1462
+ "autoincrement": false,
1463
+ "default": "''"
1464
+ },
1465
+ "agent_config_id": {
1466
+ "name": "agent_config_id",
1467
+ "type": "text",
1468
+ "primaryKey": false,
1469
+ "notNull": false,
1470
+ "autoincrement": false
1471
+ },
1472
+ "tokens": {
1473
+ "name": "tokens",
1474
+ "type": "integer",
1475
+ "primaryKey": false,
1476
+ "notNull": true,
1477
+ "autoincrement": false,
1478
+ "default": 0
1479
+ },
1480
+ "cost": {
1481
+ "name": "cost",
1482
+ "type": "real",
1483
+ "primaryKey": false,
1484
+ "notNull": false,
1485
+ "autoincrement": false
1486
+ },
1487
+ "currency": {
1488
+ "name": "currency",
1489
+ "type": "text",
1490
+ "primaryKey": false,
1491
+ "notNull": false,
1492
+ "autoincrement": false
1493
+ },
1494
+ "created_at": {
1495
+ "name": "created_at",
1496
+ "type": "integer",
1497
+ "primaryKey": false,
1498
+ "notNull": true,
1499
+ "autoincrement": false,
1500
+ "default": "(unixepoch('subsec') * 1000)"
1501
+ },
1502
+ "updated_at": {
1503
+ "name": "updated_at",
1504
+ "type": "integer",
1505
+ "primaryKey": false,
1506
+ "notNull": true,
1507
+ "autoincrement": false,
1508
+ "default": "(unixepoch('subsec') * 1000)"
1509
+ }
1510
+ },
1511
+ "indexes": {
1512
+ "session_usage_project_at": {
1513
+ "name": "session_usage_project_at",
1514
+ "columns": [
1515
+ "project_id",
1516
+ "created_at"
1517
+ ],
1518
+ "isUnique": false
1519
+ },
1520
+ "session_usage_worktree_at": {
1521
+ "name": "session_usage_worktree_at",
1522
+ "columns": [
1523
+ "worktree_id",
1524
+ "created_at"
1525
+ ],
1526
+ "isUnique": false
1527
+ }
1528
+ },
1529
+ "foreignKeys": {},
1530
+ "compositePrimaryKeys": {},
1531
+ "uniqueConstraints": {},
1532
+ "checkConstraints": {
1533
+ "session_usage_tokens": {
1534
+ "name": "session_usage_tokens",
1535
+ "value": "\"session_usage\".\"tokens\" >= 0"
1536
+ }
1537
+ }
1538
+ },
1539
+ "task": {
1540
+ "name": "task",
1541
+ "columns": {
1542
+ "id": {
1543
+ "name": "id",
1544
+ "type": "text",
1545
+ "primaryKey": true,
1546
+ "notNull": true,
1547
+ "autoincrement": false
1548
+ },
1549
+ "workspace_id": {
1550
+ "name": "workspace_id",
1551
+ "type": "text",
1552
+ "primaryKey": false,
1553
+ "notNull": true,
1554
+ "autoincrement": false
1555
+ },
1556
+ "project_id": {
1557
+ "name": "project_id",
1558
+ "type": "text",
1559
+ "primaryKey": false,
1560
+ "notNull": true,
1561
+ "autoincrement": false
1562
+ },
1563
+ "title": {
1564
+ "name": "title",
1565
+ "type": "text",
1566
+ "primaryKey": false,
1567
+ "notNull": true,
1568
+ "autoincrement": false
1569
+ },
1570
+ "body": {
1571
+ "name": "body",
1572
+ "type": "text",
1573
+ "primaryKey": false,
1574
+ "notNull": true,
1575
+ "autoincrement": false,
1576
+ "default": "''"
1577
+ },
1578
+ "status": {
1579
+ "name": "status",
1580
+ "type": "text",
1581
+ "primaryKey": false,
1582
+ "notNull": true,
1583
+ "autoincrement": false,
1584
+ "default": "'open'"
1585
+ },
1586
+ "created_by": {
1587
+ "name": "created_by",
1588
+ "type": "text",
1589
+ "primaryKey": false,
1590
+ "notNull": true,
1591
+ "autoincrement": false,
1592
+ "default": "'human'"
1593
+ },
1594
+ "created_by_session": {
1595
+ "name": "created_by_session",
1596
+ "type": "text",
1597
+ "primaryKey": false,
1598
+ "notNull": false,
1599
+ "autoincrement": false
1600
+ },
1601
+ "worktree_id": {
1602
+ "name": "worktree_id",
1603
+ "type": "text",
1604
+ "primaryKey": false,
1605
+ "notNull": false,
1606
+ "autoincrement": false
1607
+ },
1608
+ "links": {
1609
+ "name": "links",
1610
+ "type": "text",
1611
+ "primaryKey": false,
1612
+ "notNull": true,
1613
+ "autoincrement": false,
1614
+ "default": "'[]'"
1615
+ },
1616
+ "reason": {
1617
+ "name": "reason",
1618
+ "type": "text",
1619
+ "primaryKey": false,
1620
+ "notNull": false,
1621
+ "autoincrement": false
1622
+ },
1623
+ "closed_at": {
1624
+ "name": "closed_at",
1625
+ "type": "integer",
1626
+ "primaryKey": false,
1627
+ "notNull": false,
1628
+ "autoincrement": false
1629
+ },
1630
+ "created_at": {
1631
+ "name": "created_at",
1632
+ "type": "integer",
1633
+ "primaryKey": false,
1634
+ "notNull": true,
1635
+ "autoincrement": false,
1636
+ "default": "(unixepoch('subsec') * 1000)"
1637
+ },
1638
+ "updated_at": {
1639
+ "name": "updated_at",
1640
+ "type": "integer",
1641
+ "primaryKey": false,
1642
+ "notNull": true,
1643
+ "autoincrement": false,
1644
+ "default": "(unixepoch('subsec') * 1000)"
1645
+ }
1646
+ },
1647
+ "indexes": {
1648
+ "task_by_workspace": {
1649
+ "name": "task_by_workspace",
1650
+ "columns": [
1651
+ "workspace_id",
1652
+ "status"
1653
+ ],
1654
+ "isUnique": false
1655
+ },
1656
+ "task_by_project": {
1657
+ "name": "task_by_project",
1658
+ "columns": [
1659
+ "project_id"
1660
+ ],
1661
+ "isUnique": false
1662
+ }
1663
+ },
1664
+ "foreignKeys": {
1665
+ "task_workspace_id_workspace_id_fk": {
1666
+ "name": "task_workspace_id_workspace_id_fk",
1667
+ "tableFrom": "task",
1668
+ "tableTo": "workspace",
1669
+ "columnsFrom": [
1670
+ "workspace_id"
1671
+ ],
1672
+ "columnsTo": [
1673
+ "id"
1674
+ ],
1675
+ "onDelete": "restrict",
1676
+ "onUpdate": "no action"
1677
+ },
1678
+ "task_project_id_project_id_fk": {
1679
+ "name": "task_project_id_project_id_fk",
1680
+ "tableFrom": "task",
1681
+ "tableTo": "project",
1682
+ "columnsFrom": [
1683
+ "project_id"
1684
+ ],
1685
+ "columnsTo": [
1686
+ "id"
1687
+ ],
1688
+ "onDelete": "restrict",
1689
+ "onUpdate": "no action"
1690
+ },
1691
+ "task_worktree_id_worktree_id_fk": {
1692
+ "name": "task_worktree_id_worktree_id_fk",
1693
+ "tableFrom": "task",
1694
+ "tableTo": "worktree",
1695
+ "columnsFrom": [
1696
+ "worktree_id"
1697
+ ],
1698
+ "columnsTo": [
1699
+ "id"
1700
+ ],
1701
+ "onDelete": "set null",
1702
+ "onUpdate": "no action"
1703
+ }
1704
+ },
1705
+ "compositePrimaryKeys": {},
1706
+ "uniqueConstraints": {},
1707
+ "checkConstraints": {
1708
+ "task_status": {
1709
+ "name": "task_status",
1710
+ "value": "\"task\".\"status\" IN ('proposed', 'backlog', 'open', 'in_progress', 'review', 'testing', 'ready_to_merge', 'done', 'dropped')"
1711
+ },
1712
+ "task_created_by": {
1713
+ "name": "task_created_by",
1714
+ "value": "\"task\".\"created_by\" IN ('human', 'agent')"
1715
+ },
1716
+ "task_agent_provenance": {
1717
+ "name": "task_agent_provenance",
1718
+ "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)"
1719
+ },
1720
+ "task_closed_at": {
1721
+ "name": "task_closed_at",
1722
+ "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)"
1723
+ }
1724
+ }
1725
+ },
1726
+ "workspace": {
1727
+ "name": "workspace",
1728
+ "columns": {
1729
+ "id": {
1730
+ "name": "id",
1731
+ "type": "text",
1732
+ "primaryKey": true,
1733
+ "notNull": true,
1734
+ "autoincrement": false
1735
+ },
1736
+ "name": {
1737
+ "name": "name",
1738
+ "type": "text",
1739
+ "primaryKey": false,
1740
+ "notNull": true,
1741
+ "autoincrement": false
1742
+ },
1743
+ "default_lumem_mode": {
1744
+ "name": "default_lumem_mode",
1745
+ "type": "text",
1746
+ "primaryKey": false,
1747
+ "notNull": true,
1748
+ "autoincrement": false,
1749
+ "default": "'ask'"
1750
+ },
1751
+ "created_at": {
1752
+ "name": "created_at",
1753
+ "type": "integer",
1754
+ "primaryKey": false,
1755
+ "notNull": true,
1756
+ "autoincrement": false,
1757
+ "default": "(unixepoch('subsec') * 1000)"
1758
+ },
1759
+ "updated_at": {
1760
+ "name": "updated_at",
1761
+ "type": "integer",
1762
+ "primaryKey": false,
1763
+ "notNull": true,
1764
+ "autoincrement": false,
1765
+ "default": "(unixepoch('subsec') * 1000)"
1766
+ }
1767
+ },
1768
+ "indexes": {
1769
+ "workspace_name_unique": {
1770
+ "name": "workspace_name_unique",
1771
+ "columns": [
1772
+ "name"
1773
+ ],
1774
+ "isUnique": true
1775
+ }
1776
+ },
1777
+ "foreignKeys": {},
1778
+ "compositePrimaryKeys": {},
1779
+ "uniqueConstraints": {},
1780
+ "checkConstraints": {
1781
+ "workspace_default_lumem_mode": {
1782
+ "name": "workspace_default_lumem_mode",
1783
+ "value": "\"workspace\".\"default_lumem_mode\" IN ('ask', 'auto')"
1784
+ }
1785
+ }
1786
+ },
1787
+ "worktree": {
1788
+ "name": "worktree",
1789
+ "columns": {
1790
+ "id": {
1791
+ "name": "id",
1792
+ "type": "text",
1793
+ "primaryKey": true,
1794
+ "notNull": true,
1795
+ "autoincrement": false
1796
+ },
1797
+ "project_id": {
1798
+ "name": "project_id",
1799
+ "type": "text",
1800
+ "primaryKey": false,
1801
+ "notNull": true,
1802
+ "autoincrement": false
1803
+ },
1804
+ "name": {
1805
+ "name": "name",
1806
+ "type": "text",
1807
+ "primaryKey": false,
1808
+ "notNull": true,
1809
+ "autoincrement": false
1810
+ },
1811
+ "branch": {
1812
+ "name": "branch",
1813
+ "type": "text",
1814
+ "primaryKey": false,
1815
+ "notNull": true,
1816
+ "autoincrement": false
1817
+ },
1818
+ "path": {
1819
+ "name": "path",
1820
+ "type": "text",
1821
+ "primaryKey": false,
1822
+ "notNull": true,
1823
+ "autoincrement": false
1824
+ },
1825
+ "state": {
1826
+ "name": "state",
1827
+ "type": "text",
1828
+ "primaryKey": false,
1829
+ "notNull": true,
1830
+ "autoincrement": false,
1831
+ "default": "'active'"
1832
+ },
1833
+ "created_at": {
1834
+ "name": "created_at",
1835
+ "type": "integer",
1836
+ "primaryKey": false,
1837
+ "notNull": true,
1838
+ "autoincrement": false,
1839
+ "default": "(unixepoch('subsec') * 1000)"
1840
+ },
1841
+ "updated_at": {
1842
+ "name": "updated_at",
1843
+ "type": "integer",
1844
+ "primaryKey": false,
1845
+ "notNull": true,
1846
+ "autoincrement": false,
1847
+ "default": "(unixepoch('subsec') * 1000)"
1848
+ }
1849
+ },
1850
+ "indexes": {
1851
+ "worktree_name_per_project": {
1852
+ "name": "worktree_name_per_project",
1853
+ "columns": [
1854
+ "project_id",
1855
+ "name"
1856
+ ],
1857
+ "isUnique": true
1858
+ }
1859
+ },
1860
+ "foreignKeys": {
1861
+ "worktree_project_id_project_id_fk": {
1862
+ "name": "worktree_project_id_project_id_fk",
1863
+ "tableFrom": "worktree",
1864
+ "tableTo": "project",
1865
+ "columnsFrom": [
1866
+ "project_id"
1867
+ ],
1868
+ "columnsTo": [
1869
+ "id"
1870
+ ],
1871
+ "onDelete": "restrict",
1872
+ "onUpdate": "no action"
1873
+ }
1874
+ },
1875
+ "compositePrimaryKeys": {},
1876
+ "uniqueConstraints": {},
1877
+ "checkConstraints": {
1878
+ "worktree_state": {
1879
+ "name": "worktree_state",
1880
+ "value": "\"worktree\".\"state\" IN ('active', 'missing')"
1881
+ }
1882
+ }
1883
+ }
1884
+ },
1885
+ "views": {},
1886
+ "enums": {},
1887
+ "_meta": {
1888
+ "schemas": {},
1889
+ "tables": {},
1890
+ "columns": {}
1891
+ },
1892
+ "internal": {
1893
+ "indexes": {}
1894
+ }
1895
+ }