@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,1656 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "d994429d-3c18-4ba1-b544-660d32a408f4",
5
+ "prevId": "c51fb762-0a41-49e0-96da-996eed9ebf82",
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
+ "resumed_from_id": {
1321
+ "name": "resumed_from_id",
1322
+ "type": "text",
1323
+ "primaryKey": false,
1324
+ "notNull": false,
1325
+ "autoincrement": false
1326
+ },
1327
+ "created_at": {
1328
+ "name": "created_at",
1329
+ "type": "integer",
1330
+ "primaryKey": false,
1331
+ "notNull": true,
1332
+ "autoincrement": false,
1333
+ "default": "(unixepoch('subsec') * 1000)"
1334
+ },
1335
+ "updated_at": {
1336
+ "name": "updated_at",
1337
+ "type": "integer",
1338
+ "primaryKey": false,
1339
+ "notNull": true,
1340
+ "autoincrement": false,
1341
+ "default": "(unixepoch('subsec') * 1000)"
1342
+ }
1343
+ },
1344
+ "indexes": {},
1345
+ "foreignKeys": {
1346
+ "session_agent_config_id_agent_config_id_fk": {
1347
+ "name": "session_agent_config_id_agent_config_id_fk",
1348
+ "tableFrom": "session",
1349
+ "tableTo": "agent_config",
1350
+ "columnsFrom": [
1351
+ "agent_config_id"
1352
+ ],
1353
+ "columnsTo": [
1354
+ "id"
1355
+ ],
1356
+ "onDelete": "restrict",
1357
+ "onUpdate": "no action"
1358
+ }
1359
+ },
1360
+ "compositePrimaryKeys": {},
1361
+ "uniqueConstraints": {},
1362
+ "checkConstraints": {
1363
+ "session_kind": {
1364
+ "name": "session_kind",
1365
+ "value": "\"session\".\"kind\" IN ('shell', 'agent', 'script')"
1366
+ },
1367
+ "session_scope_type": {
1368
+ "name": "session_scope_type",
1369
+ "value": "\"session\".\"scope_type\" IN ('project', 'worktree')"
1370
+ },
1371
+ "session_state": {
1372
+ "name": "session_state",
1373
+ "value": "\"session\".\"state\" IN ('running', 'exited')"
1374
+ },
1375
+ "session_agent_config": {
1376
+ "name": "session_agent_config",
1377
+ "value": "(\"session\".\"kind\" = 'agent' AND \"session\".\"agent_config_id\" IS NOT NULL)\n OR (\"session\".\"kind\" <> 'agent' AND \"session\".\"agent_config_id\" IS NULL)"
1378
+ },
1379
+ "session_script_name": {
1380
+ "name": "session_script_name",
1381
+ "value": "(\"session\".\"kind\" = 'script' AND \"session\".\"script_name\" IS NOT NULL\n AND \"session\".\"script_name\" IN ('setup', 'run', 'teardown'))\n OR (\"session\".\"kind\" <> 'script' AND \"session\".\"script_name\" IS NULL)"
1382
+ },
1383
+ "session_exit_code": {
1384
+ "name": "session_exit_code",
1385
+ "value": "(\"session\".\"state\" = 'running' AND \"session\".\"exit_code\" IS NULL)\n OR (\"session\".\"state\" = 'exited')"
1386
+ },
1387
+ "session_transport": {
1388
+ "name": "session_transport",
1389
+ "value": "\"session\".\"transport\" IN ('pty', 'acp')"
1390
+ },
1391
+ "session_shell_transport": {
1392
+ "name": "session_shell_transport",
1393
+ "value": "\"session\".\"kind\" = 'agent' OR \"session\".\"transport\" = 'pty'"
1394
+ },
1395
+ "session_acp_id": {
1396
+ "name": "session_acp_id",
1397
+ "value": "(\"session\".\"transport\" = 'acp' AND \"session\".\"acp_session_id\" IS NOT NULL)\n OR (\"session\".\"transport\" = 'pty' AND \"session\".\"acp_session_id\" IS NULL)"
1398
+ }
1399
+ }
1400
+ },
1401
+ "session_usage": {
1402
+ "name": "session_usage",
1403
+ "columns": {
1404
+ "id": {
1405
+ "name": "id",
1406
+ "type": "text",
1407
+ "primaryKey": true,
1408
+ "notNull": true,
1409
+ "autoincrement": false
1410
+ },
1411
+ "session_id": {
1412
+ "name": "session_id",
1413
+ "type": "text",
1414
+ "primaryKey": false,
1415
+ "notNull": true,
1416
+ "autoincrement": false
1417
+ },
1418
+ "project_id": {
1419
+ "name": "project_id",
1420
+ "type": "text",
1421
+ "primaryKey": false,
1422
+ "notNull": true,
1423
+ "autoincrement": false
1424
+ },
1425
+ "worktree_id": {
1426
+ "name": "worktree_id",
1427
+ "type": "text",
1428
+ "primaryKey": false,
1429
+ "notNull": true,
1430
+ "autoincrement": false,
1431
+ "default": "''"
1432
+ },
1433
+ "tokens": {
1434
+ "name": "tokens",
1435
+ "type": "integer",
1436
+ "primaryKey": false,
1437
+ "notNull": true,
1438
+ "autoincrement": false,
1439
+ "default": 0
1440
+ },
1441
+ "cost": {
1442
+ "name": "cost",
1443
+ "type": "real",
1444
+ "primaryKey": false,
1445
+ "notNull": false,
1446
+ "autoincrement": false
1447
+ },
1448
+ "currency": {
1449
+ "name": "currency",
1450
+ "type": "text",
1451
+ "primaryKey": false,
1452
+ "notNull": false,
1453
+ "autoincrement": false
1454
+ },
1455
+ "created_at": {
1456
+ "name": "created_at",
1457
+ "type": "integer",
1458
+ "primaryKey": false,
1459
+ "notNull": true,
1460
+ "autoincrement": false,
1461
+ "default": "(unixepoch('subsec') * 1000)"
1462
+ },
1463
+ "updated_at": {
1464
+ "name": "updated_at",
1465
+ "type": "integer",
1466
+ "primaryKey": false,
1467
+ "notNull": true,
1468
+ "autoincrement": false,
1469
+ "default": "(unixepoch('subsec') * 1000)"
1470
+ }
1471
+ },
1472
+ "indexes": {
1473
+ "session_usage_project_at": {
1474
+ "name": "session_usage_project_at",
1475
+ "columns": [
1476
+ "project_id",
1477
+ "created_at"
1478
+ ],
1479
+ "isUnique": false
1480
+ },
1481
+ "session_usage_worktree_at": {
1482
+ "name": "session_usage_worktree_at",
1483
+ "columns": [
1484
+ "worktree_id",
1485
+ "created_at"
1486
+ ],
1487
+ "isUnique": false
1488
+ }
1489
+ },
1490
+ "foreignKeys": {},
1491
+ "compositePrimaryKeys": {},
1492
+ "uniqueConstraints": {},
1493
+ "checkConstraints": {
1494
+ "session_usage_tokens": {
1495
+ "name": "session_usage_tokens",
1496
+ "value": "\"session_usage\".\"tokens\" >= 0"
1497
+ }
1498
+ }
1499
+ },
1500
+ "workspace": {
1501
+ "name": "workspace",
1502
+ "columns": {
1503
+ "id": {
1504
+ "name": "id",
1505
+ "type": "text",
1506
+ "primaryKey": true,
1507
+ "notNull": true,
1508
+ "autoincrement": false
1509
+ },
1510
+ "name": {
1511
+ "name": "name",
1512
+ "type": "text",
1513
+ "primaryKey": false,
1514
+ "notNull": true,
1515
+ "autoincrement": false
1516
+ },
1517
+ "created_at": {
1518
+ "name": "created_at",
1519
+ "type": "integer",
1520
+ "primaryKey": false,
1521
+ "notNull": true,
1522
+ "autoincrement": false,
1523
+ "default": "(unixepoch('subsec') * 1000)"
1524
+ },
1525
+ "updated_at": {
1526
+ "name": "updated_at",
1527
+ "type": "integer",
1528
+ "primaryKey": false,
1529
+ "notNull": true,
1530
+ "autoincrement": false,
1531
+ "default": "(unixepoch('subsec') * 1000)"
1532
+ }
1533
+ },
1534
+ "indexes": {
1535
+ "workspace_name_unique": {
1536
+ "name": "workspace_name_unique",
1537
+ "columns": [
1538
+ "name"
1539
+ ],
1540
+ "isUnique": true
1541
+ }
1542
+ },
1543
+ "foreignKeys": {},
1544
+ "compositePrimaryKeys": {},
1545
+ "uniqueConstraints": {},
1546
+ "checkConstraints": {}
1547
+ },
1548
+ "worktree": {
1549
+ "name": "worktree",
1550
+ "columns": {
1551
+ "id": {
1552
+ "name": "id",
1553
+ "type": "text",
1554
+ "primaryKey": true,
1555
+ "notNull": true,
1556
+ "autoincrement": false
1557
+ },
1558
+ "project_id": {
1559
+ "name": "project_id",
1560
+ "type": "text",
1561
+ "primaryKey": false,
1562
+ "notNull": true,
1563
+ "autoincrement": false
1564
+ },
1565
+ "name": {
1566
+ "name": "name",
1567
+ "type": "text",
1568
+ "primaryKey": false,
1569
+ "notNull": true,
1570
+ "autoincrement": false
1571
+ },
1572
+ "branch": {
1573
+ "name": "branch",
1574
+ "type": "text",
1575
+ "primaryKey": false,
1576
+ "notNull": true,
1577
+ "autoincrement": false
1578
+ },
1579
+ "path": {
1580
+ "name": "path",
1581
+ "type": "text",
1582
+ "primaryKey": false,
1583
+ "notNull": true,
1584
+ "autoincrement": false
1585
+ },
1586
+ "state": {
1587
+ "name": "state",
1588
+ "type": "text",
1589
+ "primaryKey": false,
1590
+ "notNull": true,
1591
+ "autoincrement": false,
1592
+ "default": "'active'"
1593
+ },
1594
+ "created_at": {
1595
+ "name": "created_at",
1596
+ "type": "integer",
1597
+ "primaryKey": false,
1598
+ "notNull": true,
1599
+ "autoincrement": false,
1600
+ "default": "(unixepoch('subsec') * 1000)"
1601
+ },
1602
+ "updated_at": {
1603
+ "name": "updated_at",
1604
+ "type": "integer",
1605
+ "primaryKey": false,
1606
+ "notNull": true,
1607
+ "autoincrement": false,
1608
+ "default": "(unixepoch('subsec') * 1000)"
1609
+ }
1610
+ },
1611
+ "indexes": {
1612
+ "worktree_name_per_project": {
1613
+ "name": "worktree_name_per_project",
1614
+ "columns": [
1615
+ "project_id",
1616
+ "name"
1617
+ ],
1618
+ "isUnique": true
1619
+ }
1620
+ },
1621
+ "foreignKeys": {
1622
+ "worktree_project_id_project_id_fk": {
1623
+ "name": "worktree_project_id_project_id_fk",
1624
+ "tableFrom": "worktree",
1625
+ "tableTo": "project",
1626
+ "columnsFrom": [
1627
+ "project_id"
1628
+ ],
1629
+ "columnsTo": [
1630
+ "id"
1631
+ ],
1632
+ "onDelete": "restrict",
1633
+ "onUpdate": "no action"
1634
+ }
1635
+ },
1636
+ "compositePrimaryKeys": {},
1637
+ "uniqueConstraints": {},
1638
+ "checkConstraints": {
1639
+ "worktree_state": {
1640
+ "name": "worktree_state",
1641
+ "value": "\"worktree\".\"state\" IN ('active', 'missing')"
1642
+ }
1643
+ }
1644
+ }
1645
+ },
1646
+ "views": {},
1647
+ "enums": {},
1648
+ "_meta": {
1649
+ "schemas": {},
1650
+ "tables": {},
1651
+ "columns": {}
1652
+ },
1653
+ "internal": {
1654
+ "indexes": {}
1655
+ }
1656
+ }