praxo-cli 0.0.0-stage → 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 (82) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +159 -2
  3. package/dist/app.js +75 -0
  4. package/dist/bin.js +21 -0
  5. package/dist/cli/commands/ai.command.js +189 -0
  6. package/dist/cli/commands/cmd.command.js +265 -0
  7. package/dist/cli/commands/completion.command.js +334 -0
  8. package/dist/cli/commands/config.command.js +27 -0
  9. package/dist/cli/commands/decision.command.js +287 -0
  10. package/dist/cli/commands/doctor.command.js +45 -0
  11. package/dist/cli/commands/project.command.js +24 -0
  12. package/dist/cli/commands/search.command.js +59 -0
  13. package/dist/cli/commands/sync.command.js +122 -0
  14. package/dist/cli/commands/transfer.command.js +148 -0
  15. package/dist/cli/index.js +156 -0
  16. package/dist/cli/output.js +133 -0
  17. package/dist/cli/prompts.js +68 -0
  18. package/dist/features/ai/client.js +238 -0
  19. package/dist/features/ai/output.js +7 -0
  20. package/dist/features/ai/providers.js +52 -0
  21. package/dist/features/ai/schemas.js +43 -0
  22. package/dist/features/ai/service.js +183 -0
  23. package/dist/features/commands/executor.js +54 -0
  24. package/dist/features/commands/repository.js +61 -0
  25. package/dist/features/commands/safety.js +154 -0
  26. package/dist/features/commands/service.js +254 -0
  27. package/dist/features/commands/template.js +153 -0
  28. package/dist/features/decisions/repository.js +53 -0
  29. package/dist/features/decisions/service.js +209 -0
  30. package/dist/features/decisions/stats.js +84 -0
  31. package/dist/features/decisions/status.js +7 -0
  32. package/dist/features/projects/repository.js +51 -0
  33. package/dist/features/projects/service.js +74 -0
  34. package/dist/features/sync/git.js +207 -0
  35. package/dist/features/sync/merge.js +194 -0
  36. package/dist/features/sync/repository.js +151 -0
  37. package/dist/features/sync/sanitizer.js +21 -0
  38. package/dist/features/sync/service.js +199 -0
  39. package/dist/features/sync/snapshot.js +230 -0
  40. package/dist/infrastructure/credentials/store.js +105 -0
  41. package/dist/infrastructure/database/client.js +41 -0
  42. package/dist/infrastructure/database/migrate.js +102 -0
  43. package/dist/infrastructure/database/schema.js +138 -0
  44. package/dist/infrastructure/git/detector.js +48 -0
  45. package/dist/shared/clipboard.js +19 -0
  46. package/dist/shared/config.js +163 -0
  47. package/dist/shared/doctor.js +47 -0
  48. package/dist/shared/errors.js +19 -0
  49. package/dist/shared/global-search.js +51 -0
  50. package/dist/shared/input.js +37 -0
  51. package/dist/shared/links.js +48 -0
  52. package/dist/shared/paths.js +14 -0
  53. package/dist/shared/query.js +10 -0
  54. package/dist/shared/redaction.js +54 -0
  55. package/dist/shared/search.js +39 -0
  56. package/dist/shared/sync-metadata.js +7 -0
  57. package/dist/shared/tags.js +91 -0
  58. package/dist/shared/transfer/archive.js +197 -0
  59. package/dist/shared/transfer/markdown.js +53 -0
  60. package/dist/shared/transfer/service.js +278 -0
  61. package/dist/tui/Workspace.js +121 -0
  62. package/dist/tui/components/AiPanel.js +200 -0
  63. package/dist/tui/components/Catalog.js +47 -0
  64. package/dist/tui/components/Confirm.js +28 -0
  65. package/dist/tui/components/Form.js +113 -0
  66. package/dist/tui/components/HelpModal.js +44 -0
  67. package/dist/tui/components/Inspection.js +28 -0
  68. package/dist/tui/components/KeyHints.js +7 -0
  69. package/dist/tui/components/SearchInput.js +31 -0
  70. package/dist/tui/components/SyncPanel.js +93 -0
  71. package/dist/tui/index.js +18 -0
  72. package/dist/tui/screens/Commands.js +383 -0
  73. package/dist/tui/screens/DecisionForms.js +117 -0
  74. package/dist/tui/screens/Decisions.js +260 -0
  75. package/dist/tui/screens/Lookup.js +96 -0
  76. package/dist/tui/theme.js +47 -0
  77. package/drizzle/0000_initial.sql +105 -0
  78. package/drizzle/0001_v11_sync.sql +117 -0
  79. package/drizzle/meta/0000_snapshot.json +735 -0
  80. package/drizzle/meta/0001_snapshot.json +867 -0
  81. package/drizzle/meta/_journal.json +20 -0
  82. package/package.json +77 -4
@@ -0,0 +1,867 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "tables": {
5
+ "command_usages": {
6
+ "name": "command_usages",
7
+ "columns": {
8
+ "id": {
9
+ "name": "id",
10
+ "type": "text",
11
+ "primaryKey": true,
12
+ "notNull": true,
13
+ "autoincrement": false
14
+ },
15
+ "commandId": {
16
+ "name": "commandId",
17
+ "type": "text",
18
+ "primaryKey": false,
19
+ "notNull": true,
20
+ "autoincrement": false
21
+ },
22
+ "kind": {
23
+ "name": "kind",
24
+ "type": "text",
25
+ "primaryKey": false,
26
+ "notNull": true,
27
+ "autoincrement": false
28
+ },
29
+ "usedAt": {
30
+ "name": "usedAt",
31
+ "type": "text",
32
+ "primaryKey": false,
33
+ "notNull": true,
34
+ "autoincrement": false
35
+ },
36
+ "outcome": {
37
+ "name": "outcome",
38
+ "type": "text",
39
+ "primaryKey": false,
40
+ "notNull": true,
41
+ "autoincrement": false
42
+ },
43
+ "exitCode": {
44
+ "name": "exitCode",
45
+ "type": "integer",
46
+ "primaryKey": false,
47
+ "notNull": false,
48
+ "autoincrement": false
49
+ }
50
+ },
51
+ "indexes": {
52
+ "usage_command_date": {
53
+ "name": "usage_command_date",
54
+ "columns": ["commandId", "usedAt"],
55
+ "isUnique": false
56
+ },
57
+ "usage_kind_date": {
58
+ "name": "usage_kind_date",
59
+ "columns": ["kind", "usedAt"],
60
+ "isUnique": false
61
+ }
62
+ },
63
+ "foreignKeys": {
64
+ "command_usages_commandId_commands_id_fk": {
65
+ "name": "command_usages_commandId_commands_id_fk",
66
+ "tableFrom": "command_usages",
67
+ "tableTo": "commands",
68
+ "columnsFrom": ["commandId"],
69
+ "columnsTo": ["id"],
70
+ "onDelete": "cascade",
71
+ "onUpdate": "no action"
72
+ }
73
+ },
74
+ "compositePrimaryKeys": {},
75
+ "uniqueConstraints": {},
76
+ "checkConstraints": {
77
+ "usage_kind": {
78
+ "name": "usage_kind",
79
+ "value": "\"command_usages\".\"kind\" in ('copy', 'run')"
80
+ },
81
+ "usage_outcome": {
82
+ "name": "usage_outcome",
83
+ "value": "\"command_usages\".\"outcome\" in ('success', 'failed', 'interrupted')"
84
+ },
85
+ "copy_outcome": {
86
+ "name": "copy_outcome",
87
+ "value": "\"command_usages\".\"kind\" != 'copy' or (\"command_usages\".\"outcome\" = 'success' and \"command_usages\".\"exitCode\" is null)"
88
+ }
89
+ }
90
+ },
91
+ "commands": {
92
+ "name": "commands",
93
+ "columns": {
94
+ "id": {
95
+ "name": "id",
96
+ "type": "text",
97
+ "primaryKey": true,
98
+ "notNull": true,
99
+ "autoincrement": false
100
+ },
101
+ "name": {
102
+ "name": "name",
103
+ "type": "text",
104
+ "primaryKey": false,
105
+ "notNull": true,
106
+ "autoincrement": false
107
+ },
108
+ "template": {
109
+ "name": "template",
110
+ "type": "text",
111
+ "primaryKey": false,
112
+ "notNull": true,
113
+ "autoincrement": false
114
+ },
115
+ "note": {
116
+ "name": "note",
117
+ "type": "text",
118
+ "primaryKey": false,
119
+ "notNull": true,
120
+ "autoincrement": false,
121
+ "default": "''"
122
+ },
123
+ "type": {
124
+ "name": "type",
125
+ "type": "text",
126
+ "primaryKey": false,
127
+ "notNull": true,
128
+ "autoincrement": false,
129
+ "default": "'custom'"
130
+ },
131
+ "tier": {
132
+ "name": "tier",
133
+ "type": "text",
134
+ "primaryKey": false,
135
+ "notNull": true,
136
+ "autoincrement": false,
137
+ "default": "'normal'"
138
+ },
139
+ "sos": {
140
+ "name": "sos",
141
+ "type": "integer",
142
+ "primaryKey": false,
143
+ "notNull": true,
144
+ "autoincrement": false,
145
+ "default": false
146
+ },
147
+ "danger": {
148
+ "name": "danger",
149
+ "type": "integer",
150
+ "primaryKey": false,
151
+ "notNull": true,
152
+ "autoincrement": false,
153
+ "default": false
154
+ },
155
+ "projectId": {
156
+ "name": "projectId",
157
+ "type": "text",
158
+ "primaryKey": false,
159
+ "notNull": false,
160
+ "autoincrement": false
161
+ },
162
+ "createdAt": {
163
+ "name": "createdAt",
164
+ "type": "text",
165
+ "primaryKey": false,
166
+ "notNull": true,
167
+ "autoincrement": false
168
+ },
169
+ "updatedAt": {
170
+ "name": "updatedAt",
171
+ "type": "text",
172
+ "primaryKey": false,
173
+ "notNull": true,
174
+ "autoincrement": false
175
+ },
176
+ "deletedAt": {
177
+ "name": "deletedAt",
178
+ "type": "text",
179
+ "primaryKey": false,
180
+ "notNull": false,
181
+ "autoincrement": false
182
+ },
183
+ "revision": {
184
+ "name": "revision",
185
+ "type": "integer",
186
+ "primaryKey": false,
187
+ "notNull": true,
188
+ "autoincrement": false,
189
+ "default": 0
190
+ },
191
+ "deviceId": {
192
+ "name": "deviceId",
193
+ "type": "text",
194
+ "primaryKey": false,
195
+ "notNull": false,
196
+ "autoincrement": false
197
+ }
198
+ },
199
+ "indexes": {
200
+ "commands_project_tier": {
201
+ "name": "commands_project_tier",
202
+ "columns": ["projectId", "tier"],
203
+ "isUnique": false
204
+ }
205
+ },
206
+ "foreignKeys": {
207
+ "commands_projectId_projects_id_fk": {
208
+ "name": "commands_projectId_projects_id_fk",
209
+ "tableFrom": "commands",
210
+ "tableTo": "projects",
211
+ "columnsFrom": ["projectId"],
212
+ "columnsTo": ["id"],
213
+ "onDelete": "set null",
214
+ "onUpdate": "no action"
215
+ }
216
+ },
217
+ "compositePrimaryKeys": {},
218
+ "uniqueConstraints": {},
219
+ "checkConstraints": {
220
+ "command_tier": {
221
+ "name": "command_tier",
222
+ "value": "\"commands\".\"tier\" in ('hot', 'normal')"
223
+ },
224
+ "command_flags": {
225
+ "name": "command_flags",
226
+ "value": "\"commands\".\"sos\" in (0, 1) and \"commands\".\"danger\" in (0, 1)"
227
+ }
228
+ }
229
+ },
230
+ "decision_reviews": {
231
+ "name": "decision_reviews",
232
+ "columns": {
233
+ "id": {
234
+ "name": "id",
235
+ "type": "text",
236
+ "primaryKey": true,
237
+ "notNull": true,
238
+ "autoincrement": false
239
+ },
240
+ "decisionId": {
241
+ "name": "decisionId",
242
+ "type": "text",
243
+ "primaryKey": false,
244
+ "notNull": true,
245
+ "autoincrement": false
246
+ },
247
+ "reviewedAt": {
248
+ "name": "reviewedAt",
249
+ "type": "text",
250
+ "primaryKey": false,
251
+ "notNull": true,
252
+ "autoincrement": false
253
+ },
254
+ "result": {
255
+ "name": "result",
256
+ "type": "text",
257
+ "primaryKey": false,
258
+ "notNull": true,
259
+ "autoincrement": false
260
+ },
261
+ "rating": {
262
+ "name": "rating",
263
+ "type": "text",
264
+ "primaryKey": false,
265
+ "notNull": true,
266
+ "autoincrement": false
267
+ },
268
+ "lesson": {
269
+ "name": "lesson",
270
+ "type": "text",
271
+ "primaryKey": false,
272
+ "notNull": true,
273
+ "autoincrement": false
274
+ },
275
+ "snapshot": {
276
+ "name": "snapshot",
277
+ "type": "text",
278
+ "primaryKey": false,
279
+ "notNull": true,
280
+ "autoincrement": false
281
+ },
282
+ "deletedAt": {
283
+ "name": "deletedAt",
284
+ "type": "text",
285
+ "primaryKey": false,
286
+ "notNull": false,
287
+ "autoincrement": false
288
+ },
289
+ "revision": {
290
+ "name": "revision",
291
+ "type": "integer",
292
+ "primaryKey": false,
293
+ "notNull": true,
294
+ "autoincrement": false,
295
+ "default": 0
296
+ },
297
+ "deviceId": {
298
+ "name": "deviceId",
299
+ "type": "text",
300
+ "primaryKey": false,
301
+ "notNull": false,
302
+ "autoincrement": false
303
+ }
304
+ },
305
+ "indexes": {
306
+ "reviews_decision_date": {
307
+ "name": "reviews_decision_date",
308
+ "columns": ["decisionId", "reviewedAt", "id"],
309
+ "isUnique": false
310
+ }
311
+ },
312
+ "foreignKeys": {
313
+ "decision_reviews_decisionId_decisions_id_fk": {
314
+ "name": "decision_reviews_decisionId_decisions_id_fk",
315
+ "tableFrom": "decision_reviews",
316
+ "tableTo": "decisions",
317
+ "columnsFrom": ["decisionId"],
318
+ "columnsTo": ["id"],
319
+ "onDelete": "cascade",
320
+ "onUpdate": "no action"
321
+ }
322
+ },
323
+ "compositePrimaryKeys": {},
324
+ "uniqueConstraints": {},
325
+ "checkConstraints": {
326
+ "review_rating": {
327
+ "name": "review_rating",
328
+ "value": "\"decision_reviews\".\"rating\" in ('accurate', 'partial', 'failed')"
329
+ }
330
+ }
331
+ },
332
+ "decisions": {
333
+ "name": "decisions",
334
+ "columns": {
335
+ "id": {
336
+ "name": "id",
337
+ "type": "text",
338
+ "primaryKey": true,
339
+ "notNull": true,
340
+ "autoincrement": false
341
+ },
342
+ "title": {
343
+ "name": "title",
344
+ "type": "text",
345
+ "primaryKey": false,
346
+ "notNull": true,
347
+ "autoincrement": false
348
+ },
349
+ "content": {
350
+ "name": "content",
351
+ "type": "text",
352
+ "primaryKey": false,
353
+ "notNull": true,
354
+ "autoincrement": false,
355
+ "default": "''"
356
+ },
357
+ "reason": {
358
+ "name": "reason",
359
+ "type": "text",
360
+ "primaryKey": false,
361
+ "notNull": true,
362
+ "autoincrement": false,
363
+ "default": "''"
364
+ },
365
+ "alternatives": {
366
+ "name": "alternatives",
367
+ "type": "text",
368
+ "primaryKey": false,
369
+ "notNull": true,
370
+ "autoincrement": false,
371
+ "default": "''"
372
+ },
373
+ "expected": {
374
+ "name": "expected",
375
+ "type": "text",
376
+ "primaryKey": false,
377
+ "notNull": true,
378
+ "autoincrement": false,
379
+ "default": "''"
380
+ },
381
+ "aiNote": {
382
+ "name": "aiNote",
383
+ "type": "text",
384
+ "primaryKey": false,
385
+ "notNull": false,
386
+ "autoincrement": false
387
+ },
388
+ "domain": {
389
+ "name": "domain",
390
+ "type": "text",
391
+ "primaryKey": false,
392
+ "notNull": true,
393
+ "autoincrement": false,
394
+ "default": "'architecture'"
395
+ },
396
+ "confidence": {
397
+ "name": "confidence",
398
+ "type": "integer",
399
+ "primaryKey": false,
400
+ "notNull": false,
401
+ "autoincrement": false
402
+ },
403
+ "reviewAt": {
404
+ "name": "reviewAt",
405
+ "type": "text",
406
+ "primaryKey": false,
407
+ "notNull": true,
408
+ "autoincrement": false
409
+ },
410
+ "projectId": {
411
+ "name": "projectId",
412
+ "type": "text",
413
+ "primaryKey": false,
414
+ "notNull": false,
415
+ "autoincrement": false
416
+ },
417
+ "createdAt": {
418
+ "name": "createdAt",
419
+ "type": "text",
420
+ "primaryKey": false,
421
+ "notNull": true,
422
+ "autoincrement": false
423
+ },
424
+ "updatedAt": {
425
+ "name": "updatedAt",
426
+ "type": "text",
427
+ "primaryKey": false,
428
+ "notNull": true,
429
+ "autoincrement": false
430
+ },
431
+ "deletedAt": {
432
+ "name": "deletedAt",
433
+ "type": "text",
434
+ "primaryKey": false,
435
+ "notNull": false,
436
+ "autoincrement": false
437
+ },
438
+ "revision": {
439
+ "name": "revision",
440
+ "type": "integer",
441
+ "primaryKey": false,
442
+ "notNull": true,
443
+ "autoincrement": false,
444
+ "default": 0
445
+ },
446
+ "deviceId": {
447
+ "name": "deviceId",
448
+ "type": "text",
449
+ "primaryKey": false,
450
+ "notNull": false,
451
+ "autoincrement": false
452
+ }
453
+ },
454
+ "indexes": {
455
+ "decisions_project_review": {
456
+ "name": "decisions_project_review",
457
+ "columns": ["projectId", "reviewAt"],
458
+ "isUnique": false
459
+ }
460
+ },
461
+ "foreignKeys": {
462
+ "decisions_projectId_projects_id_fk": {
463
+ "name": "decisions_projectId_projects_id_fk",
464
+ "tableFrom": "decisions",
465
+ "tableTo": "projects",
466
+ "columnsFrom": ["projectId"],
467
+ "columnsTo": ["id"],
468
+ "onDelete": "set null",
469
+ "onUpdate": "no action"
470
+ }
471
+ },
472
+ "compositePrimaryKeys": {},
473
+ "uniqueConstraints": {},
474
+ "checkConstraints": {
475
+ "decision_confidence": {
476
+ "name": "decision_confidence",
477
+ "value": "\"decisions\".\"confidence\" is null or (typeof(\"decisions\".\"confidence\") = 'integer' and \"decisions\".\"confidence\" between 0 and 100)"
478
+ }
479
+ }
480
+ },
481
+ "entity_links": {
482
+ "name": "entity_links",
483
+ "columns": {
484
+ "commandId": {
485
+ "name": "commandId",
486
+ "type": "text",
487
+ "primaryKey": false,
488
+ "notNull": true,
489
+ "autoincrement": false
490
+ },
491
+ "decisionId": {
492
+ "name": "decisionId",
493
+ "type": "text",
494
+ "primaryKey": false,
495
+ "notNull": true,
496
+ "autoincrement": false
497
+ },
498
+ "deletedAt": {
499
+ "name": "deletedAt",
500
+ "type": "text",
501
+ "primaryKey": false,
502
+ "notNull": false,
503
+ "autoincrement": false
504
+ },
505
+ "updatedAt": {
506
+ "name": "updatedAt",
507
+ "type": "text",
508
+ "primaryKey": false,
509
+ "notNull": false,
510
+ "autoincrement": false
511
+ }
512
+ },
513
+ "indexes": {
514
+ "entity_links_decision": {
515
+ "name": "entity_links_decision",
516
+ "columns": ["decisionId"],
517
+ "isUnique": false
518
+ }
519
+ },
520
+ "foreignKeys": {
521
+ "entity_links_commandId_commands_id_fk": {
522
+ "name": "entity_links_commandId_commands_id_fk",
523
+ "tableFrom": "entity_links",
524
+ "tableTo": "commands",
525
+ "columnsFrom": ["commandId"],
526
+ "columnsTo": ["id"],
527
+ "onDelete": "cascade",
528
+ "onUpdate": "no action"
529
+ },
530
+ "entity_links_decisionId_decisions_id_fk": {
531
+ "name": "entity_links_decisionId_decisions_id_fk",
532
+ "tableFrom": "entity_links",
533
+ "tableTo": "decisions",
534
+ "columnsFrom": ["decisionId"],
535
+ "columnsTo": ["id"],
536
+ "onDelete": "cascade",
537
+ "onUpdate": "no action"
538
+ }
539
+ },
540
+ "compositePrimaryKeys": {
541
+ "entity_links_commandId_decisionId_pk": {
542
+ "columns": ["commandId", "decisionId"],
543
+ "name": "entity_links_commandId_decisionId_pk"
544
+ }
545
+ },
546
+ "uniqueConstraints": {},
547
+ "checkConstraints": {}
548
+ },
549
+ "entity_tags": {
550
+ "name": "entity_tags",
551
+ "columns": {
552
+ "tagId": {
553
+ "name": "tagId",
554
+ "type": "text",
555
+ "primaryKey": false,
556
+ "notNull": true,
557
+ "autoincrement": false
558
+ },
559
+ "commandId": {
560
+ "name": "commandId",
561
+ "type": "text",
562
+ "primaryKey": false,
563
+ "notNull": false,
564
+ "autoincrement": false
565
+ },
566
+ "decisionId": {
567
+ "name": "decisionId",
568
+ "type": "text",
569
+ "primaryKey": false,
570
+ "notNull": false,
571
+ "autoincrement": false
572
+ },
573
+ "deletedAt": {
574
+ "name": "deletedAt",
575
+ "type": "text",
576
+ "primaryKey": false,
577
+ "notNull": false,
578
+ "autoincrement": false
579
+ },
580
+ "updatedAt": {
581
+ "name": "updatedAt",
582
+ "type": "text",
583
+ "primaryKey": false,
584
+ "notNull": false,
585
+ "autoincrement": false
586
+ }
587
+ },
588
+ "indexes": {
589
+ "entity_tags_command": {
590
+ "name": "entity_tags_command",
591
+ "columns": ["commandId", "tagId"],
592
+ "isUnique": true
593
+ },
594
+ "entity_tags_decision": {
595
+ "name": "entity_tags_decision",
596
+ "columns": ["decisionId", "tagId"],
597
+ "isUnique": true
598
+ },
599
+ "entity_tags_tag": {
600
+ "name": "entity_tags_tag",
601
+ "columns": ["tagId"],
602
+ "isUnique": false
603
+ }
604
+ },
605
+ "foreignKeys": {
606
+ "entity_tags_tagId_tags_id_fk": {
607
+ "name": "entity_tags_tagId_tags_id_fk",
608
+ "tableFrom": "entity_tags",
609
+ "tableTo": "tags",
610
+ "columnsFrom": ["tagId"],
611
+ "columnsTo": ["id"],
612
+ "onDelete": "cascade",
613
+ "onUpdate": "no action"
614
+ },
615
+ "entity_tags_commandId_commands_id_fk": {
616
+ "name": "entity_tags_commandId_commands_id_fk",
617
+ "tableFrom": "entity_tags",
618
+ "tableTo": "commands",
619
+ "columnsFrom": ["commandId"],
620
+ "columnsTo": ["id"],
621
+ "onDelete": "cascade",
622
+ "onUpdate": "no action"
623
+ },
624
+ "entity_tags_decisionId_decisions_id_fk": {
625
+ "name": "entity_tags_decisionId_decisions_id_fk",
626
+ "tableFrom": "entity_tags",
627
+ "tableTo": "decisions",
628
+ "columnsFrom": ["decisionId"],
629
+ "columnsTo": ["id"],
630
+ "onDelete": "cascade",
631
+ "onUpdate": "no action"
632
+ }
633
+ },
634
+ "compositePrimaryKeys": {},
635
+ "uniqueConstraints": {},
636
+ "checkConstraints": {
637
+ "entity_tags_owner": {
638
+ "name": "entity_tags_owner",
639
+ "value": "(\"entity_tags\".\"commandId\" is null) != (\"entity_tags\".\"decisionId\" is null)"
640
+ }
641
+ }
642
+ },
643
+ "project_local_bindings": {
644
+ "name": "project_local_bindings",
645
+ "columns": {
646
+ "projectId": {
647
+ "name": "projectId",
648
+ "type": "text",
649
+ "primaryKey": true,
650
+ "notNull": true,
651
+ "autoincrement": false
652
+ },
653
+ "root": {
654
+ "name": "root",
655
+ "type": "text",
656
+ "primaryKey": false,
657
+ "notNull": true,
658
+ "autoincrement": false
659
+ },
660
+ "aliases": {
661
+ "name": "aliases",
662
+ "type": "text",
663
+ "primaryKey": false,
664
+ "notNull": true,
665
+ "autoincrement": false,
666
+ "default": "'[]'"
667
+ }
668
+ },
669
+ "indexes": {
670
+ "project_local_bindings_root": {
671
+ "name": "project_local_bindings_root",
672
+ "columns": ["root"],
673
+ "isUnique": true
674
+ }
675
+ },
676
+ "foreignKeys": {
677
+ "project_local_bindings_projectId_projects_id_fk": {
678
+ "name": "project_local_bindings_projectId_projects_id_fk",
679
+ "tableFrom": "project_local_bindings",
680
+ "tableTo": "projects",
681
+ "columnsFrom": ["projectId"],
682
+ "columnsTo": ["id"],
683
+ "onDelete": "cascade",
684
+ "onUpdate": "no action"
685
+ }
686
+ },
687
+ "compositePrimaryKeys": {},
688
+ "uniqueConstraints": {},
689
+ "checkConstraints": {}
690
+ },
691
+ "projects": {
692
+ "name": "projects",
693
+ "columns": {
694
+ "id": {
695
+ "name": "id",
696
+ "type": "text",
697
+ "primaryKey": true,
698
+ "notNull": true,
699
+ "autoincrement": false
700
+ },
701
+ "name": {
702
+ "name": "name",
703
+ "type": "text",
704
+ "primaryKey": false,
705
+ "notNull": true,
706
+ "autoincrement": false
707
+ },
708
+ "remote": {
709
+ "name": "remote",
710
+ "type": "text",
711
+ "primaryKey": false,
712
+ "notNull": false,
713
+ "autoincrement": false
714
+ },
715
+ "createdAt": {
716
+ "name": "createdAt",
717
+ "type": "text",
718
+ "primaryKey": false,
719
+ "notNull": true,
720
+ "autoincrement": false
721
+ },
722
+ "updatedAt": {
723
+ "name": "updatedAt",
724
+ "type": "text",
725
+ "primaryKey": false,
726
+ "notNull": true,
727
+ "autoincrement": false
728
+ },
729
+ "deletedAt": {
730
+ "name": "deletedAt",
731
+ "type": "text",
732
+ "primaryKey": false,
733
+ "notNull": false,
734
+ "autoincrement": false
735
+ },
736
+ "revision": {
737
+ "name": "revision",
738
+ "type": "integer",
739
+ "primaryKey": false,
740
+ "notNull": true,
741
+ "autoincrement": false,
742
+ "default": 0
743
+ },
744
+ "deviceId": {
745
+ "name": "deviceId",
746
+ "type": "text",
747
+ "primaryKey": false,
748
+ "notNull": false,
749
+ "autoincrement": false
750
+ }
751
+ },
752
+ "indexes": {
753
+ "projects_remote": {
754
+ "name": "projects_remote",
755
+ "columns": ["remote"],
756
+ "isUnique": true,
757
+ "where": "\"projects\".\"remote\" is not null and \"projects\".\"deletedAt\" is null"
758
+ }
759
+ },
760
+ "foreignKeys": {},
761
+ "compositePrimaryKeys": {},
762
+ "uniqueConstraints": {},
763
+ "checkConstraints": {}
764
+ },
765
+ "sync_state": {
766
+ "name": "sync_state",
767
+ "columns": {
768
+ "key": {
769
+ "name": "key",
770
+ "type": "text",
771
+ "primaryKey": true,
772
+ "notNull": true,
773
+ "autoincrement": false
774
+ },
775
+ "value": {
776
+ "name": "value",
777
+ "type": "text",
778
+ "primaryKey": false,
779
+ "notNull": true,
780
+ "autoincrement": false
781
+ }
782
+ },
783
+ "indexes": {},
784
+ "foreignKeys": {},
785
+ "compositePrimaryKeys": {},
786
+ "uniqueConstraints": {},
787
+ "checkConstraints": {}
788
+ },
789
+ "tags": {
790
+ "name": "tags",
791
+ "columns": {
792
+ "id": {
793
+ "name": "id",
794
+ "type": "text",
795
+ "primaryKey": true,
796
+ "notNull": true,
797
+ "autoincrement": false
798
+ },
799
+ "name": {
800
+ "name": "name",
801
+ "type": "text",
802
+ "primaryKey": false,
803
+ "notNull": true,
804
+ "autoincrement": false
805
+ },
806
+ "normalized": {
807
+ "name": "normalized",
808
+ "type": "text",
809
+ "primaryKey": false,
810
+ "notNull": true,
811
+ "autoincrement": false
812
+ },
813
+ "updatedAt": {
814
+ "name": "updatedAt",
815
+ "type": "text",
816
+ "primaryKey": false,
817
+ "notNull": false,
818
+ "autoincrement": false
819
+ },
820
+ "deletedAt": {
821
+ "name": "deletedAt",
822
+ "type": "text",
823
+ "primaryKey": false,
824
+ "notNull": false,
825
+ "autoincrement": false
826
+ },
827
+ "revision": {
828
+ "name": "revision",
829
+ "type": "integer",
830
+ "primaryKey": false,
831
+ "notNull": true,
832
+ "autoincrement": false,
833
+ "default": 0
834
+ },
835
+ "deviceId": {
836
+ "name": "deviceId",
837
+ "type": "text",
838
+ "primaryKey": false,
839
+ "notNull": false,
840
+ "autoincrement": false
841
+ }
842
+ },
843
+ "indexes": {
844
+ "tags_normalized_unique": {
845
+ "name": "tags_normalized_unique",
846
+ "columns": ["normalized"],
847
+ "isUnique": true
848
+ }
849
+ },
850
+ "foreignKeys": {},
851
+ "compositePrimaryKeys": {},
852
+ "uniqueConstraints": {},
853
+ "checkConstraints": {}
854
+ }
855
+ },
856
+ "views": {},
857
+ "enums": {},
858
+ "_meta": {
859
+ "tables": {},
860
+ "columns": {}
861
+ },
862
+ "internal": {
863
+ "indexes": {}
864
+ },
865
+ "id": "31522e47-47ff-40f5-9d00-1d6c9fec6a81",
866
+ "prevId": "dc898479-d708-46b0-be40-7166c8345ba4"
867
+ }