@vinihcrosa/lumem-os 0.1.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 (55) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +107 -0
  3. package/bin/lumem.mjs +4605 -0
  4. package/bin/postinstall.mjs +55 -0
  5. package/dist/server/main.mjs +95446 -0
  6. package/dist/web/assets/codemirror-setup-Csmyc9rQ.js +18 -0
  7. package/dist/web/assets/core-rofTMs1b.js +12 -0
  8. package/dist/web/assets/css-CLj8gQPS.js +1 -0
  9. package/dist/web/assets/diff-D97Zzqfu.js +1 -0
  10. package/dist/web/assets/docker-BcOcwvcX.js +1 -0
  11. package/dist/web/assets/engine-javascript-DBd1bXLz.js +141 -0
  12. package/dist/web/assets/html-pp8916En.js +1 -0
  13. package/dist/web/assets/index-BlWx0v0O.js +101 -0
  14. package/dist/web/assets/index-jS7lSqBc.css +32 -0
  15. package/dist/web/assets/inter-latin-wght-normal-Dx4kXJAl.woff2 +0 -0
  16. package/dist/web/assets/javascript-wDzz0qaB.js +1 -0
  17. package/dist/web/assets/jetbrains-mono-latin-400-normal-V6pRDFza.woff2 +0 -0
  18. package/dist/web/assets/json-Cp-IABpG.js +1 -0
  19. package/dist/web/assets/jsx-g9-lgVsj.js +1 -0
  20. package/dist/web/assets/make-CHLpvVh8.js +1 -0
  21. package/dist/web/assets/markdown-Cvjx9yec.js +1 -0
  22. package/dist/web/assets/python-B6aJPvgy.js +1 -0
  23. package/dist/web/assets/shellscript-Yzrsuije.js +1 -0
  24. package/dist/web/assets/sql-CRqJ_cUM.js +1 -0
  25. package/dist/web/assets/toml-vGWfd6FD.js +1 -0
  26. package/dist/web/assets/tsx-COt5Ahok.js +1 -0
  27. package/dist/web/assets/typescript-BPQ3VLAy.js +1 -0
  28. package/dist/web/assets/yaml-Buea-lGh.js +1 -0
  29. package/dist/web/index.html +13 -0
  30. package/drizzle/0000_initial.sql +68 -0
  31. package/drizzle/0001_adorable_joshua_kane.sql +71 -0
  32. package/drizzle/0002_striped_trish_tilby.sql +1 -0
  33. package/drizzle/0003_memoria_do_workspace.sql +127 -0
  34. package/drizzle/0004_memoria_no_nucleo.sql +1 -0
  35. package/drizzle/0005_playbooks.sql +21 -0
  36. package/drizzle/0006_consumo_por_turno.sql +15 -0
  37. package/drizzle/0007_project_origin_and_management.sql +2 -0
  38. package/drizzle/0008_sessao_de_script.sql +40 -0
  39. package/drizzle/0009_porta_por_checkout.sql +13 -0
  40. package/drizzle/0010_confianca_no_scripts.sql +1 -0
  41. package/drizzle/0011_fase_de_teste.sql +40 -0
  42. package/drizzle/meta/0000_snapshot.json +450 -0
  43. package/drizzle/meta/0001_snapshot.json +515 -0
  44. package/drizzle/meta/0002_snapshot.json +522 -0
  45. package/drizzle/meta/0003_snapshot.json +1292 -0
  46. package/drizzle/meta/0004_snapshot.json +1300 -0
  47. package/drizzle/meta/0005_snapshot.json +1445 -0
  48. package/drizzle/meta/0006_snapshot.json +1544 -0
  49. package/drizzle/meta/0007_snapshot.json +1559 -0
  50. package/drizzle/meta/0008_snapshot.json +1570 -0
  51. package/drizzle/meta/0009_snapshot.json +1649 -0
  52. package/drizzle/meta/0010_snapshot.json +1656 -0
  53. package/drizzle/meta/0011_snapshot.json +1656 -0
  54. package/drizzle/meta/_journal.json +90 -0
  55. package/package.json +47 -0
@@ -0,0 +1,1544 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "e5cd4054-1484-48ab-b92c-f2529a1f7e65",
5
+ "prevId": "af841a19-e84b-4764-88fe-334170be0230",
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
+ "memory_access": {
198
+ "name": "memory_access",
199
+ "columns": {
200
+ "id": {
201
+ "name": "id",
202
+ "type": "text",
203
+ "primaryKey": true,
204
+ "notNull": true,
205
+ "autoincrement": false
206
+ },
207
+ "workspace_id": {
208
+ "name": "workspace_id",
209
+ "type": "text",
210
+ "primaryKey": false,
211
+ "notNull": false,
212
+ "autoincrement": false
213
+ },
214
+ "from_project_id": {
215
+ "name": "from_project_id",
216
+ "type": "text",
217
+ "primaryKey": false,
218
+ "notNull": false,
219
+ "autoincrement": false
220
+ },
221
+ "target_project_id": {
222
+ "name": "target_project_id",
223
+ "type": "text",
224
+ "primaryKey": false,
225
+ "notNull": false,
226
+ "autoincrement": false
227
+ },
228
+ "kind": {
229
+ "name": "kind",
230
+ "type": "text",
231
+ "primaryKey": false,
232
+ "notNull": true,
233
+ "autoincrement": false
234
+ },
235
+ "target": {
236
+ "name": "target",
237
+ "type": "text",
238
+ "primaryKey": false,
239
+ "notNull": true,
240
+ "autoincrement": false
241
+ },
242
+ "decision": {
243
+ "name": "decision",
244
+ "type": "text",
245
+ "primaryKey": false,
246
+ "notNull": true,
247
+ "autoincrement": false
248
+ },
249
+ "reason": {
250
+ "name": "reason",
251
+ "type": "text",
252
+ "primaryKey": false,
253
+ "notNull": false,
254
+ "autoincrement": false
255
+ },
256
+ "actor": {
257
+ "name": "actor",
258
+ "type": "text",
259
+ "primaryKey": false,
260
+ "notNull": true,
261
+ "autoincrement": false
262
+ },
263
+ "created_at": {
264
+ "name": "created_at",
265
+ "type": "integer",
266
+ "primaryKey": false,
267
+ "notNull": true,
268
+ "autoincrement": false,
269
+ "default": "(unixepoch('subsec') * 1000)"
270
+ },
271
+ "updated_at": {
272
+ "name": "updated_at",
273
+ "type": "integer",
274
+ "primaryKey": false,
275
+ "notNull": true,
276
+ "autoincrement": false,
277
+ "default": "(unixepoch('subsec') * 1000)"
278
+ }
279
+ },
280
+ "indexes": {},
281
+ "foreignKeys": {},
282
+ "compositePrimaryKeys": {},
283
+ "uniqueConstraints": {},
284
+ "checkConstraints": {
285
+ "memory_access_kind": {
286
+ "name": "memory_access_kind",
287
+ "value": "\"memory_access\".\"kind\" IN ('memory', 'repository')"
288
+ },
289
+ "memory_access_decision": {
290
+ "name": "memory_access_decision",
291
+ "value": "\"memory_access\".\"decision\" IN ('allowed', 'denied')"
292
+ }
293
+ }
294
+ },
295
+ "memory_decision": {
296
+ "name": "memory_decision",
297
+ "columns": {
298
+ "id": {
299
+ "name": "id",
300
+ "type": "text",
301
+ "primaryKey": true,
302
+ "notNull": true,
303
+ "autoincrement": false
304
+ },
305
+ "idempotency_key": {
306
+ "name": "idempotency_key",
307
+ "type": "text",
308
+ "primaryKey": false,
309
+ "notNull": true,
310
+ "autoincrement": false
311
+ },
312
+ "path": {
313
+ "name": "path",
314
+ "type": "text",
315
+ "primaryKey": false,
316
+ "notNull": true,
317
+ "autoincrement": false
318
+ },
319
+ "operation": {
320
+ "name": "operation",
321
+ "type": "text",
322
+ "primaryKey": false,
323
+ "notNull": true,
324
+ "autoincrement": false
325
+ },
326
+ "outcome": {
327
+ "name": "outcome",
328
+ "type": "text",
329
+ "primaryKey": false,
330
+ "notNull": true,
331
+ "autoincrement": false
332
+ },
333
+ "actor": {
334
+ "name": "actor",
335
+ "type": "text",
336
+ "primaryKey": false,
337
+ "notNull": true,
338
+ "autoincrement": false
339
+ },
340
+ "confidence": {
341
+ "name": "confidence",
342
+ "type": "text",
343
+ "primaryKey": false,
344
+ "notNull": true,
345
+ "autoincrement": false
346
+ },
347
+ "candidate_hash": {
348
+ "name": "candidate_hash",
349
+ "type": "text",
350
+ "primaryKey": false,
351
+ "notNull": true,
352
+ "autoincrement": false
353
+ },
354
+ "rule_trace": {
355
+ "name": "rule_trace",
356
+ "type": "text",
357
+ "primaryKey": false,
358
+ "notNull": true,
359
+ "autoincrement": false,
360
+ "default": "'[]'"
361
+ },
362
+ "source_sessions": {
363
+ "name": "source_sessions",
364
+ "type": "text",
365
+ "primaryKey": false,
366
+ "notNull": true,
367
+ "autoincrement": false,
368
+ "default": "'[]'"
369
+ },
370
+ "reason": {
371
+ "name": "reason",
372
+ "type": "text",
373
+ "primaryKey": false,
374
+ "notNull": false,
375
+ "autoincrement": false
376
+ },
377
+ "commit_sha": {
378
+ "name": "commit_sha",
379
+ "type": "text",
380
+ "primaryKey": false,
381
+ "notNull": false,
382
+ "autoincrement": false
383
+ },
384
+ "created_at": {
385
+ "name": "created_at",
386
+ "type": "integer",
387
+ "primaryKey": false,
388
+ "notNull": true,
389
+ "autoincrement": false,
390
+ "default": "(unixepoch('subsec') * 1000)"
391
+ },
392
+ "updated_at": {
393
+ "name": "updated_at",
394
+ "type": "integer",
395
+ "primaryKey": false,
396
+ "notNull": true,
397
+ "autoincrement": false,
398
+ "default": "(unixepoch('subsec') * 1000)"
399
+ }
400
+ },
401
+ "indexes": {
402
+ "memory_decision_idempotency_key_unique": {
403
+ "name": "memory_decision_idempotency_key_unique",
404
+ "columns": [
405
+ "idempotency_key"
406
+ ],
407
+ "isUnique": true
408
+ }
409
+ },
410
+ "foreignKeys": {},
411
+ "compositePrimaryKeys": {},
412
+ "uniqueConstraints": {},
413
+ "checkConstraints": {
414
+ "memory_decision_operation": {
415
+ "name": "memory_decision_operation",
416
+ "value": "\"memory_decision\".\"operation\" IN ('add', 'update', 'delete')"
417
+ },
418
+ "memory_decision_outcome": {
419
+ "name": "memory_decision_outcome",
420
+ "value": "\"memory_decision\".\"outcome\" IN ('applied', 'noop', 'rejected')"
421
+ }
422
+ }
423
+ },
424
+ "memory_entry": {
425
+ "name": "memory_entry",
426
+ "columns": {
427
+ "id": {
428
+ "name": "id",
429
+ "type": "text",
430
+ "primaryKey": true,
431
+ "notNull": true,
432
+ "autoincrement": false
433
+ },
434
+ "path": {
435
+ "name": "path",
436
+ "type": "text",
437
+ "primaryKey": false,
438
+ "notNull": true,
439
+ "autoincrement": false
440
+ },
441
+ "type": {
442
+ "name": "type",
443
+ "type": "text",
444
+ "primaryKey": false,
445
+ "notNull": true,
446
+ "autoincrement": false
447
+ },
448
+ "scope": {
449
+ "name": "scope",
450
+ "type": "text",
451
+ "primaryKey": false,
452
+ "notNull": true,
453
+ "autoincrement": false
454
+ },
455
+ "slug": {
456
+ "name": "slug",
457
+ "type": "text",
458
+ "primaryKey": false,
459
+ "notNull": true,
460
+ "autoincrement": false
461
+ },
462
+ "workspace_id": {
463
+ "name": "workspace_id",
464
+ "type": "text",
465
+ "primaryKey": false,
466
+ "notNull": true,
467
+ "autoincrement": false,
468
+ "default": "''"
469
+ },
470
+ "project_id": {
471
+ "name": "project_id",
472
+ "type": "text",
473
+ "primaryKey": false,
474
+ "notNull": true,
475
+ "autoincrement": false,
476
+ "default": "''"
477
+ },
478
+ "name": {
479
+ "name": "name",
480
+ "type": "text",
481
+ "primaryKey": false,
482
+ "notNull": true,
483
+ "autoincrement": false
484
+ },
485
+ "description": {
486
+ "name": "description",
487
+ "type": "text",
488
+ "primaryKey": false,
489
+ "notNull": true,
490
+ "autoincrement": false
491
+ },
492
+ "source_actor": {
493
+ "name": "source_actor",
494
+ "type": "text",
495
+ "primaryKey": false,
496
+ "notNull": true,
497
+ "autoincrement": false
498
+ },
499
+ "confidence": {
500
+ "name": "confidence",
501
+ "type": "text",
502
+ "primaryKey": false,
503
+ "notNull": true,
504
+ "autoincrement": false
505
+ },
506
+ "pinned": {
507
+ "name": "pinned",
508
+ "type": "integer",
509
+ "primaryKey": false,
510
+ "notNull": true,
511
+ "autoincrement": false,
512
+ "default": false
513
+ },
514
+ "content_hash": {
515
+ "name": "content_hash",
516
+ "type": "text",
517
+ "primaryKey": false,
518
+ "notNull": true,
519
+ "autoincrement": false
520
+ },
521
+ "created_at": {
522
+ "name": "created_at",
523
+ "type": "integer",
524
+ "primaryKey": false,
525
+ "notNull": true,
526
+ "autoincrement": false,
527
+ "default": "(unixepoch('subsec') * 1000)"
528
+ },
529
+ "updated_at": {
530
+ "name": "updated_at",
531
+ "type": "integer",
532
+ "primaryKey": false,
533
+ "notNull": true,
534
+ "autoincrement": false,
535
+ "default": "(unixepoch('subsec') * 1000)"
536
+ }
537
+ },
538
+ "indexes": {
539
+ "memory_entry_path_unique": {
540
+ "name": "memory_entry_path_unique",
541
+ "columns": [
542
+ "path"
543
+ ],
544
+ "isUnique": true
545
+ },
546
+ "memory_entry_identity": {
547
+ "name": "memory_entry_identity",
548
+ "columns": [
549
+ "scope",
550
+ "workspace_id",
551
+ "project_id",
552
+ "type",
553
+ "slug"
554
+ ],
555
+ "isUnique": true
556
+ }
557
+ },
558
+ "foreignKeys": {},
559
+ "compositePrimaryKeys": {},
560
+ "uniqueConstraints": {},
561
+ "checkConstraints": {
562
+ "memory_entry_type": {
563
+ "name": "memory_entry_type",
564
+ "value": "\"memory_entry\".\"type\" IN ('user', 'feedback', 'project', 'domain', 'process', 'contract', 'reference')"
565
+ },
566
+ "memory_entry_scope": {
567
+ "name": "memory_entry_scope",
568
+ "value": "\"memory_entry\".\"scope\" IN ('global', 'workspace', 'project')"
569
+ }
570
+ }
571
+ },
572
+ "memory_proposal": {
573
+ "name": "memory_proposal",
574
+ "columns": {
575
+ "id": {
576
+ "name": "id",
577
+ "type": "text",
578
+ "primaryKey": true,
579
+ "notNull": true,
580
+ "autoincrement": false
581
+ },
582
+ "path": {
583
+ "name": "path",
584
+ "type": "text",
585
+ "primaryKey": false,
586
+ "notNull": true,
587
+ "autoincrement": false
588
+ },
589
+ "type": {
590
+ "name": "type",
591
+ "type": "text",
592
+ "primaryKey": false,
593
+ "notNull": true,
594
+ "autoincrement": false
595
+ },
596
+ "scope": {
597
+ "name": "scope",
598
+ "type": "text",
599
+ "primaryKey": false,
600
+ "notNull": true,
601
+ "autoincrement": false
602
+ },
603
+ "slug": {
604
+ "name": "slug",
605
+ "type": "text",
606
+ "primaryKey": false,
607
+ "notNull": true,
608
+ "autoincrement": false
609
+ },
610
+ "workspace_id": {
611
+ "name": "workspace_id",
612
+ "type": "text",
613
+ "primaryKey": false,
614
+ "notNull": false,
615
+ "autoincrement": false
616
+ },
617
+ "project_id": {
618
+ "name": "project_id",
619
+ "type": "text",
620
+ "primaryKey": false,
621
+ "notNull": false,
622
+ "autoincrement": false
623
+ },
624
+ "name": {
625
+ "name": "name",
626
+ "type": "text",
627
+ "primaryKey": false,
628
+ "notNull": true,
629
+ "autoincrement": false
630
+ },
631
+ "description": {
632
+ "name": "description",
633
+ "type": "text",
634
+ "primaryKey": false,
635
+ "notNull": true,
636
+ "autoincrement": false
637
+ },
638
+ "body": {
639
+ "name": "body",
640
+ "type": "text",
641
+ "primaryKey": false,
642
+ "notNull": true,
643
+ "autoincrement": false,
644
+ "default": "''"
645
+ },
646
+ "actor": {
647
+ "name": "actor",
648
+ "type": "text",
649
+ "primaryKey": false,
650
+ "notNull": true,
651
+ "autoincrement": false
652
+ },
653
+ "from_project_id": {
654
+ "name": "from_project_id",
655
+ "type": "text",
656
+ "primaryKey": false,
657
+ "notNull": false,
658
+ "autoincrement": false
659
+ },
660
+ "session_id": {
661
+ "name": "session_id",
662
+ "type": "text",
663
+ "primaryKey": false,
664
+ "notNull": false,
665
+ "autoincrement": false
666
+ },
667
+ "confidence": {
668
+ "name": "confidence",
669
+ "type": "text",
670
+ "primaryKey": false,
671
+ "notNull": true,
672
+ "autoincrement": false
673
+ },
674
+ "evidence": {
675
+ "name": "evidence",
676
+ "type": "text",
677
+ "primaryKey": false,
678
+ "notNull": false,
679
+ "autoincrement": false
680
+ },
681
+ "status": {
682
+ "name": "status",
683
+ "type": "text",
684
+ "primaryKey": false,
685
+ "notNull": true,
686
+ "autoincrement": false,
687
+ "default": "'pending'"
688
+ },
689
+ "resolved_at": {
690
+ "name": "resolved_at",
691
+ "type": "integer",
692
+ "primaryKey": false,
693
+ "notNull": false,
694
+ "autoincrement": false
695
+ },
696
+ "resolution_note": {
697
+ "name": "resolution_note",
698
+ "type": "text",
699
+ "primaryKey": false,
700
+ "notNull": false,
701
+ "autoincrement": false
702
+ },
703
+ "created_at": {
704
+ "name": "created_at",
705
+ "type": "integer",
706
+ "primaryKey": false,
707
+ "notNull": true,
708
+ "autoincrement": false,
709
+ "default": "(unixepoch('subsec') * 1000)"
710
+ },
711
+ "updated_at": {
712
+ "name": "updated_at",
713
+ "type": "integer",
714
+ "primaryKey": false,
715
+ "notNull": true,
716
+ "autoincrement": false,
717
+ "default": "(unixepoch('subsec') * 1000)"
718
+ }
719
+ },
720
+ "indexes": {},
721
+ "foreignKeys": {},
722
+ "compositePrimaryKeys": {},
723
+ "uniqueConstraints": {},
724
+ "checkConstraints": {
725
+ "memory_proposal_status": {
726
+ "name": "memory_proposal_status",
727
+ "value": "\"memory_proposal\".\"status\" IN ('pending', 'approved', 'rejected')"
728
+ },
729
+ "memory_proposal_type": {
730
+ "name": "memory_proposal_type",
731
+ "value": "\"memory_proposal\".\"type\" IN ('user', 'feedback', 'project', 'domain', 'process', 'contract', 'reference')"
732
+ },
733
+ "memory_proposal_scope": {
734
+ "name": "memory_proposal_scope",
735
+ "value": "\"memory_proposal\".\"scope\" IN ('global', 'workspace', 'project')"
736
+ },
737
+ "memory_proposal_actor": {
738
+ "name": "memory_proposal_actor",
739
+ "value": "\"memory_proposal\".\"actor\" IN ('human', 'agent', 'distiller', 'auto_research', 'import')"
740
+ },
741
+ "memory_proposal_confidence": {
742
+ "name": "memory_proposal_confidence",
743
+ "value": "\"memory_proposal\".\"confidence\" IN ('low', 'medium', 'high')"
744
+ }
745
+ }
746
+ },
747
+ "memory_signal": {
748
+ "name": "memory_signal",
749
+ "columns": {
750
+ "path": {
751
+ "name": "path",
752
+ "type": "text",
753
+ "primaryKey": true,
754
+ "notNull": true,
755
+ "autoincrement": false
756
+ },
757
+ "recall_count": {
758
+ "name": "recall_count",
759
+ "type": "integer",
760
+ "primaryKey": false,
761
+ "notNull": true,
762
+ "autoincrement": false,
763
+ "default": 0
764
+ },
765
+ "last_recalled_at": {
766
+ "name": "last_recalled_at",
767
+ "type": "integer",
768
+ "primaryKey": false,
769
+ "notNull": false,
770
+ "autoincrement": false
771
+ },
772
+ "best_score": {
773
+ "name": "best_score",
774
+ "type": "real",
775
+ "primaryKey": false,
776
+ "notNull": true,
777
+ "autoincrement": false,
778
+ "default": 0
779
+ },
780
+ "created_at": {
781
+ "name": "created_at",
782
+ "type": "integer",
783
+ "primaryKey": false,
784
+ "notNull": true,
785
+ "autoincrement": false,
786
+ "default": "(unixepoch('subsec') * 1000)"
787
+ },
788
+ "updated_at": {
789
+ "name": "updated_at",
790
+ "type": "integer",
791
+ "primaryKey": false,
792
+ "notNull": true,
793
+ "autoincrement": false,
794
+ "default": "(unixepoch('subsec') * 1000)"
795
+ }
796
+ },
797
+ "indexes": {},
798
+ "foreignKeys": {},
799
+ "compositePrimaryKeys": {},
800
+ "uniqueConstraints": {},
801
+ "checkConstraints": {}
802
+ },
803
+ "memory_usage": {
804
+ "name": "memory_usage",
805
+ "columns": {
806
+ "id": {
807
+ "name": "id",
808
+ "type": "text",
809
+ "primaryKey": true,
810
+ "notNull": true,
811
+ "autoincrement": false
812
+ },
813
+ "kind": {
814
+ "name": "kind",
815
+ "type": "text",
816
+ "primaryKey": false,
817
+ "notNull": true,
818
+ "autoincrement": false
819
+ },
820
+ "session_id": {
821
+ "name": "session_id",
822
+ "type": "text",
823
+ "primaryKey": false,
824
+ "notNull": false,
825
+ "autoincrement": false
826
+ },
827
+ "workspace_id": {
828
+ "name": "workspace_id",
829
+ "type": "text",
830
+ "primaryKey": false,
831
+ "notNull": false,
832
+ "autoincrement": false
833
+ },
834
+ "project_id": {
835
+ "name": "project_id",
836
+ "type": "text",
837
+ "primaryKey": false,
838
+ "notNull": false,
839
+ "autoincrement": false
840
+ },
841
+ "amount": {
842
+ "name": "amount",
843
+ "type": "integer",
844
+ "primaryKey": false,
845
+ "notNull": true,
846
+ "autoincrement": false,
847
+ "default": 0
848
+ },
849
+ "duration_ms": {
850
+ "name": "duration_ms",
851
+ "type": "integer",
852
+ "primaryKey": false,
853
+ "notNull": true,
854
+ "autoincrement": false,
855
+ "default": 0
856
+ },
857
+ "created_at": {
858
+ "name": "created_at",
859
+ "type": "integer",
860
+ "primaryKey": false,
861
+ "notNull": true,
862
+ "autoincrement": false,
863
+ "default": "(unixepoch('subsec') * 1000)"
864
+ },
865
+ "updated_at": {
866
+ "name": "updated_at",
867
+ "type": "integer",
868
+ "primaryKey": false,
869
+ "notNull": true,
870
+ "autoincrement": false,
871
+ "default": "(unixepoch('subsec') * 1000)"
872
+ }
873
+ },
874
+ "indexes": {},
875
+ "foreignKeys": {},
876
+ "compositePrimaryKeys": {},
877
+ "uniqueConstraints": {},
878
+ "checkConstraints": {}
879
+ },
880
+ "playbook": {
881
+ "name": "playbook",
882
+ "columns": {
883
+ "id": {
884
+ "name": "id",
885
+ "type": "text",
886
+ "primaryKey": true,
887
+ "notNull": true,
888
+ "autoincrement": false
889
+ },
890
+ "path": {
891
+ "name": "path",
892
+ "type": "text",
893
+ "primaryKey": false,
894
+ "notNull": true,
895
+ "autoincrement": false
896
+ },
897
+ "scope": {
898
+ "name": "scope",
899
+ "type": "text",
900
+ "primaryKey": false,
901
+ "notNull": true,
902
+ "autoincrement": false
903
+ },
904
+ "slug": {
905
+ "name": "slug",
906
+ "type": "text",
907
+ "primaryKey": false,
908
+ "notNull": true,
909
+ "autoincrement": false
910
+ },
911
+ "workspace_id": {
912
+ "name": "workspace_id",
913
+ "type": "text",
914
+ "primaryKey": false,
915
+ "notNull": true,
916
+ "autoincrement": false,
917
+ "default": "''"
918
+ },
919
+ "project_id": {
920
+ "name": "project_id",
921
+ "type": "text",
922
+ "primaryKey": false,
923
+ "notNull": true,
924
+ "autoincrement": false,
925
+ "default": "''"
926
+ },
927
+ "task_class": {
928
+ "name": "task_class",
929
+ "type": "text",
930
+ "primaryKey": false,
931
+ "notNull": true,
932
+ "autoincrement": false
933
+ },
934
+ "description": {
935
+ "name": "description",
936
+ "type": "text",
937
+ "primaryKey": false,
938
+ "notNull": true,
939
+ "autoincrement": false
940
+ },
941
+ "pinned": {
942
+ "name": "pinned",
943
+ "type": "integer",
944
+ "primaryKey": false,
945
+ "notNull": true,
946
+ "autoincrement": false,
947
+ "default": false
948
+ },
949
+ "archived": {
950
+ "name": "archived",
951
+ "type": "integer",
952
+ "primaryKey": false,
953
+ "notNull": true,
954
+ "autoincrement": false,
955
+ "default": false
956
+ },
957
+ "loads": {
958
+ "name": "loads",
959
+ "type": "integer",
960
+ "primaryKey": false,
961
+ "notNull": true,
962
+ "autoincrement": false,
963
+ "default": 0
964
+ },
965
+ "last_loaded_at": {
966
+ "name": "last_loaded_at",
967
+ "type": "integer",
968
+ "primaryKey": false,
969
+ "notNull": false,
970
+ "autoincrement": false
971
+ },
972
+ "content_hash": {
973
+ "name": "content_hash",
974
+ "type": "text",
975
+ "primaryKey": false,
976
+ "notNull": true,
977
+ "autoincrement": false
978
+ },
979
+ "created_at": {
980
+ "name": "created_at",
981
+ "type": "integer",
982
+ "primaryKey": false,
983
+ "notNull": true,
984
+ "autoincrement": false,
985
+ "default": "(unixepoch('subsec') * 1000)"
986
+ },
987
+ "updated_at": {
988
+ "name": "updated_at",
989
+ "type": "integer",
990
+ "primaryKey": false,
991
+ "notNull": true,
992
+ "autoincrement": false,
993
+ "default": "(unixepoch('subsec') * 1000)"
994
+ }
995
+ },
996
+ "indexes": {
997
+ "playbook_path_unique": {
998
+ "name": "playbook_path_unique",
999
+ "columns": [
1000
+ "path"
1001
+ ],
1002
+ "isUnique": true
1003
+ },
1004
+ "playbook_identity": {
1005
+ "name": "playbook_identity",
1006
+ "columns": [
1007
+ "scope",
1008
+ "workspace_id",
1009
+ "project_id",
1010
+ "slug"
1011
+ ],
1012
+ "isUnique": true
1013
+ }
1014
+ },
1015
+ "foreignKeys": {},
1016
+ "compositePrimaryKeys": {},
1017
+ "uniqueConstraints": {},
1018
+ "checkConstraints": {
1019
+ "playbook_scope": {
1020
+ "name": "playbook_scope",
1021
+ "value": "\"playbook\".\"scope\" IN ('workspace', 'project')"
1022
+ }
1023
+ }
1024
+ },
1025
+ "project": {
1026
+ "name": "project",
1027
+ "columns": {
1028
+ "id": {
1029
+ "name": "id",
1030
+ "type": "text",
1031
+ "primaryKey": true,
1032
+ "notNull": true,
1033
+ "autoincrement": false
1034
+ },
1035
+ "workspace_id": {
1036
+ "name": "workspace_id",
1037
+ "type": "text",
1038
+ "primaryKey": false,
1039
+ "notNull": true,
1040
+ "autoincrement": false
1041
+ },
1042
+ "name": {
1043
+ "name": "name",
1044
+ "type": "text",
1045
+ "primaryKey": false,
1046
+ "notNull": true,
1047
+ "autoincrement": false
1048
+ },
1049
+ "path": {
1050
+ "name": "path",
1051
+ "type": "text",
1052
+ "primaryKey": false,
1053
+ "notNull": true,
1054
+ "autoincrement": false
1055
+ },
1056
+ "default_branch": {
1057
+ "name": "default_branch",
1058
+ "type": "text",
1059
+ "primaryKey": false,
1060
+ "notNull": true,
1061
+ "autoincrement": false
1062
+ },
1063
+ "created_at": {
1064
+ "name": "created_at",
1065
+ "type": "integer",
1066
+ "primaryKey": false,
1067
+ "notNull": true,
1068
+ "autoincrement": false,
1069
+ "default": "(unixepoch('subsec') * 1000)"
1070
+ },
1071
+ "updated_at": {
1072
+ "name": "updated_at",
1073
+ "type": "integer",
1074
+ "primaryKey": false,
1075
+ "notNull": true,
1076
+ "autoincrement": false,
1077
+ "default": "(unixepoch('subsec') * 1000)"
1078
+ }
1079
+ },
1080
+ "indexes": {
1081
+ "project_path_unique": {
1082
+ "name": "project_path_unique",
1083
+ "columns": [
1084
+ "path"
1085
+ ],
1086
+ "isUnique": true
1087
+ },
1088
+ "project_name_per_workspace": {
1089
+ "name": "project_name_per_workspace",
1090
+ "columns": [
1091
+ "workspace_id",
1092
+ "name"
1093
+ ],
1094
+ "isUnique": true
1095
+ }
1096
+ },
1097
+ "foreignKeys": {
1098
+ "project_workspace_id_workspace_id_fk": {
1099
+ "name": "project_workspace_id_workspace_id_fk",
1100
+ "tableFrom": "project",
1101
+ "tableTo": "workspace",
1102
+ "columnsFrom": [
1103
+ "workspace_id"
1104
+ ],
1105
+ "columnsTo": [
1106
+ "id"
1107
+ ],
1108
+ "onDelete": "restrict",
1109
+ "onUpdate": "no action"
1110
+ }
1111
+ },
1112
+ "compositePrimaryKeys": {},
1113
+ "uniqueConstraints": {},
1114
+ "checkConstraints": {}
1115
+ },
1116
+ "session": {
1117
+ "name": "session",
1118
+ "columns": {
1119
+ "id": {
1120
+ "name": "id",
1121
+ "type": "text",
1122
+ "primaryKey": true,
1123
+ "notNull": true,
1124
+ "autoincrement": false
1125
+ },
1126
+ "kind": {
1127
+ "name": "kind",
1128
+ "type": "text",
1129
+ "primaryKey": false,
1130
+ "notNull": true,
1131
+ "autoincrement": false
1132
+ },
1133
+ "agent_config_id": {
1134
+ "name": "agent_config_id",
1135
+ "type": "text",
1136
+ "primaryKey": false,
1137
+ "notNull": false,
1138
+ "autoincrement": false
1139
+ },
1140
+ "scope_type": {
1141
+ "name": "scope_type",
1142
+ "type": "text",
1143
+ "primaryKey": false,
1144
+ "notNull": true,
1145
+ "autoincrement": false
1146
+ },
1147
+ "scope_id": {
1148
+ "name": "scope_id",
1149
+ "type": "text",
1150
+ "primaryKey": false,
1151
+ "notNull": true,
1152
+ "autoincrement": false
1153
+ },
1154
+ "cwd": {
1155
+ "name": "cwd",
1156
+ "type": "text",
1157
+ "primaryKey": false,
1158
+ "notNull": true,
1159
+ "autoincrement": false
1160
+ },
1161
+ "command": {
1162
+ "name": "command",
1163
+ "type": "text",
1164
+ "primaryKey": false,
1165
+ "notNull": true,
1166
+ "autoincrement": false
1167
+ },
1168
+ "state": {
1169
+ "name": "state",
1170
+ "type": "text",
1171
+ "primaryKey": false,
1172
+ "notNull": true,
1173
+ "autoincrement": false,
1174
+ "default": "'running'"
1175
+ },
1176
+ "exit_code": {
1177
+ "name": "exit_code",
1178
+ "type": "integer",
1179
+ "primaryKey": false,
1180
+ "notNull": false,
1181
+ "autoincrement": false
1182
+ },
1183
+ "transport": {
1184
+ "name": "transport",
1185
+ "type": "text",
1186
+ "primaryKey": false,
1187
+ "notNull": true,
1188
+ "autoincrement": false,
1189
+ "default": "'pty'"
1190
+ },
1191
+ "acp_session_id": {
1192
+ "name": "acp_session_id",
1193
+ "type": "text",
1194
+ "primaryKey": false,
1195
+ "notNull": false,
1196
+ "autoincrement": false
1197
+ },
1198
+ "mode": {
1199
+ "name": "mode",
1200
+ "type": "text",
1201
+ "primaryKey": false,
1202
+ "notNull": false,
1203
+ "autoincrement": false
1204
+ },
1205
+ "model": {
1206
+ "name": "model",
1207
+ "type": "text",
1208
+ "primaryKey": false,
1209
+ "notNull": false,
1210
+ "autoincrement": false
1211
+ },
1212
+ "resumed_from_id": {
1213
+ "name": "resumed_from_id",
1214
+ "type": "text",
1215
+ "primaryKey": false,
1216
+ "notNull": false,
1217
+ "autoincrement": false
1218
+ },
1219
+ "created_at": {
1220
+ "name": "created_at",
1221
+ "type": "integer",
1222
+ "primaryKey": false,
1223
+ "notNull": true,
1224
+ "autoincrement": false,
1225
+ "default": "(unixepoch('subsec') * 1000)"
1226
+ },
1227
+ "updated_at": {
1228
+ "name": "updated_at",
1229
+ "type": "integer",
1230
+ "primaryKey": false,
1231
+ "notNull": true,
1232
+ "autoincrement": false,
1233
+ "default": "(unixepoch('subsec') * 1000)"
1234
+ }
1235
+ },
1236
+ "indexes": {},
1237
+ "foreignKeys": {
1238
+ "session_agent_config_id_agent_config_id_fk": {
1239
+ "name": "session_agent_config_id_agent_config_id_fk",
1240
+ "tableFrom": "session",
1241
+ "tableTo": "agent_config",
1242
+ "columnsFrom": [
1243
+ "agent_config_id"
1244
+ ],
1245
+ "columnsTo": [
1246
+ "id"
1247
+ ],
1248
+ "onDelete": "restrict",
1249
+ "onUpdate": "no action"
1250
+ }
1251
+ },
1252
+ "compositePrimaryKeys": {},
1253
+ "uniqueConstraints": {},
1254
+ "checkConstraints": {
1255
+ "session_kind": {
1256
+ "name": "session_kind",
1257
+ "value": "\"session\".\"kind\" IN ('shell', 'agent')"
1258
+ },
1259
+ "session_scope_type": {
1260
+ "name": "session_scope_type",
1261
+ "value": "\"session\".\"scope_type\" IN ('project', 'worktree')"
1262
+ },
1263
+ "session_state": {
1264
+ "name": "session_state",
1265
+ "value": "\"session\".\"state\" IN ('running', 'exited')"
1266
+ },
1267
+ "session_agent_config": {
1268
+ "name": "session_agent_config",
1269
+ "value": "(\"session\".\"kind\" = 'agent' AND \"session\".\"agent_config_id\" IS NOT NULL)\n OR (\"session\".\"kind\" = 'shell' AND \"session\".\"agent_config_id\" IS NULL)"
1270
+ },
1271
+ "session_exit_code": {
1272
+ "name": "session_exit_code",
1273
+ "value": "(\"session\".\"state\" = 'running' AND \"session\".\"exit_code\" IS NULL)\n OR (\"session\".\"state\" = 'exited')"
1274
+ },
1275
+ "session_transport": {
1276
+ "name": "session_transport",
1277
+ "value": "\"session\".\"transport\" IN ('pty', 'acp')"
1278
+ },
1279
+ "session_shell_transport": {
1280
+ "name": "session_shell_transport",
1281
+ "value": "\"session\".\"kind\" = 'agent' OR \"session\".\"transport\" = 'pty'"
1282
+ },
1283
+ "session_acp_id": {
1284
+ "name": "session_acp_id",
1285
+ "value": "(\"session\".\"transport\" = 'acp' AND \"session\".\"acp_session_id\" IS NOT NULL)\n OR (\"session\".\"transport\" = 'pty' AND \"session\".\"acp_session_id\" IS NULL)"
1286
+ }
1287
+ }
1288
+ },
1289
+ "session_usage": {
1290
+ "name": "session_usage",
1291
+ "columns": {
1292
+ "id": {
1293
+ "name": "id",
1294
+ "type": "text",
1295
+ "primaryKey": true,
1296
+ "notNull": true,
1297
+ "autoincrement": false
1298
+ },
1299
+ "session_id": {
1300
+ "name": "session_id",
1301
+ "type": "text",
1302
+ "primaryKey": false,
1303
+ "notNull": true,
1304
+ "autoincrement": false
1305
+ },
1306
+ "project_id": {
1307
+ "name": "project_id",
1308
+ "type": "text",
1309
+ "primaryKey": false,
1310
+ "notNull": true,
1311
+ "autoincrement": false
1312
+ },
1313
+ "worktree_id": {
1314
+ "name": "worktree_id",
1315
+ "type": "text",
1316
+ "primaryKey": false,
1317
+ "notNull": true,
1318
+ "autoincrement": false,
1319
+ "default": "''"
1320
+ },
1321
+ "tokens": {
1322
+ "name": "tokens",
1323
+ "type": "integer",
1324
+ "primaryKey": false,
1325
+ "notNull": true,
1326
+ "autoincrement": false,
1327
+ "default": 0
1328
+ },
1329
+ "cost": {
1330
+ "name": "cost",
1331
+ "type": "real",
1332
+ "primaryKey": false,
1333
+ "notNull": false,
1334
+ "autoincrement": false
1335
+ },
1336
+ "currency": {
1337
+ "name": "currency",
1338
+ "type": "text",
1339
+ "primaryKey": false,
1340
+ "notNull": false,
1341
+ "autoincrement": false
1342
+ },
1343
+ "created_at": {
1344
+ "name": "created_at",
1345
+ "type": "integer",
1346
+ "primaryKey": false,
1347
+ "notNull": true,
1348
+ "autoincrement": false,
1349
+ "default": "(unixepoch('subsec') * 1000)"
1350
+ },
1351
+ "updated_at": {
1352
+ "name": "updated_at",
1353
+ "type": "integer",
1354
+ "primaryKey": false,
1355
+ "notNull": true,
1356
+ "autoincrement": false,
1357
+ "default": "(unixepoch('subsec') * 1000)"
1358
+ }
1359
+ },
1360
+ "indexes": {
1361
+ "session_usage_project_at": {
1362
+ "name": "session_usage_project_at",
1363
+ "columns": [
1364
+ "project_id",
1365
+ "created_at"
1366
+ ],
1367
+ "isUnique": false
1368
+ },
1369
+ "session_usage_worktree_at": {
1370
+ "name": "session_usage_worktree_at",
1371
+ "columns": [
1372
+ "worktree_id",
1373
+ "created_at"
1374
+ ],
1375
+ "isUnique": false
1376
+ }
1377
+ },
1378
+ "foreignKeys": {},
1379
+ "compositePrimaryKeys": {},
1380
+ "uniqueConstraints": {},
1381
+ "checkConstraints": {
1382
+ "session_usage_tokens": {
1383
+ "name": "session_usage_tokens",
1384
+ "value": "\"session_usage\".\"tokens\" >= 0"
1385
+ }
1386
+ }
1387
+ },
1388
+ "workspace": {
1389
+ "name": "workspace",
1390
+ "columns": {
1391
+ "id": {
1392
+ "name": "id",
1393
+ "type": "text",
1394
+ "primaryKey": true,
1395
+ "notNull": true,
1396
+ "autoincrement": false
1397
+ },
1398
+ "name": {
1399
+ "name": "name",
1400
+ "type": "text",
1401
+ "primaryKey": false,
1402
+ "notNull": true,
1403
+ "autoincrement": false
1404
+ },
1405
+ "created_at": {
1406
+ "name": "created_at",
1407
+ "type": "integer",
1408
+ "primaryKey": false,
1409
+ "notNull": true,
1410
+ "autoincrement": false,
1411
+ "default": "(unixepoch('subsec') * 1000)"
1412
+ },
1413
+ "updated_at": {
1414
+ "name": "updated_at",
1415
+ "type": "integer",
1416
+ "primaryKey": false,
1417
+ "notNull": true,
1418
+ "autoincrement": false,
1419
+ "default": "(unixepoch('subsec') * 1000)"
1420
+ }
1421
+ },
1422
+ "indexes": {
1423
+ "workspace_name_unique": {
1424
+ "name": "workspace_name_unique",
1425
+ "columns": [
1426
+ "name"
1427
+ ],
1428
+ "isUnique": true
1429
+ }
1430
+ },
1431
+ "foreignKeys": {},
1432
+ "compositePrimaryKeys": {},
1433
+ "uniqueConstraints": {},
1434
+ "checkConstraints": {}
1435
+ },
1436
+ "worktree": {
1437
+ "name": "worktree",
1438
+ "columns": {
1439
+ "id": {
1440
+ "name": "id",
1441
+ "type": "text",
1442
+ "primaryKey": true,
1443
+ "notNull": true,
1444
+ "autoincrement": false
1445
+ },
1446
+ "project_id": {
1447
+ "name": "project_id",
1448
+ "type": "text",
1449
+ "primaryKey": false,
1450
+ "notNull": true,
1451
+ "autoincrement": false
1452
+ },
1453
+ "name": {
1454
+ "name": "name",
1455
+ "type": "text",
1456
+ "primaryKey": false,
1457
+ "notNull": true,
1458
+ "autoincrement": false
1459
+ },
1460
+ "branch": {
1461
+ "name": "branch",
1462
+ "type": "text",
1463
+ "primaryKey": false,
1464
+ "notNull": true,
1465
+ "autoincrement": false
1466
+ },
1467
+ "path": {
1468
+ "name": "path",
1469
+ "type": "text",
1470
+ "primaryKey": false,
1471
+ "notNull": true,
1472
+ "autoincrement": false
1473
+ },
1474
+ "state": {
1475
+ "name": "state",
1476
+ "type": "text",
1477
+ "primaryKey": false,
1478
+ "notNull": true,
1479
+ "autoincrement": false,
1480
+ "default": "'active'"
1481
+ },
1482
+ "created_at": {
1483
+ "name": "created_at",
1484
+ "type": "integer",
1485
+ "primaryKey": false,
1486
+ "notNull": true,
1487
+ "autoincrement": false,
1488
+ "default": "(unixepoch('subsec') * 1000)"
1489
+ },
1490
+ "updated_at": {
1491
+ "name": "updated_at",
1492
+ "type": "integer",
1493
+ "primaryKey": false,
1494
+ "notNull": true,
1495
+ "autoincrement": false,
1496
+ "default": "(unixepoch('subsec') * 1000)"
1497
+ }
1498
+ },
1499
+ "indexes": {
1500
+ "worktree_name_per_project": {
1501
+ "name": "worktree_name_per_project",
1502
+ "columns": [
1503
+ "project_id",
1504
+ "name"
1505
+ ],
1506
+ "isUnique": true
1507
+ }
1508
+ },
1509
+ "foreignKeys": {
1510
+ "worktree_project_id_project_id_fk": {
1511
+ "name": "worktree_project_id_project_id_fk",
1512
+ "tableFrom": "worktree",
1513
+ "tableTo": "project",
1514
+ "columnsFrom": [
1515
+ "project_id"
1516
+ ],
1517
+ "columnsTo": [
1518
+ "id"
1519
+ ],
1520
+ "onDelete": "restrict",
1521
+ "onUpdate": "no action"
1522
+ }
1523
+ },
1524
+ "compositePrimaryKeys": {},
1525
+ "uniqueConstraints": {},
1526
+ "checkConstraints": {
1527
+ "worktree_state": {
1528
+ "name": "worktree_state",
1529
+ "value": "\"worktree\".\"state\" IN ('active', 'missing')"
1530
+ }
1531
+ }
1532
+ }
1533
+ },
1534
+ "views": {},
1535
+ "enums": {},
1536
+ "_meta": {
1537
+ "schemas": {},
1538
+ "tables": {},
1539
+ "columns": {}
1540
+ },
1541
+ "internal": {
1542
+ "indexes": {}
1543
+ }
1544
+ }