soja-cli 1.4.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 (189) hide show
  1. package/LICENSE +18 -0
  2. package/README.md +117 -0
  3. package/dist/application/chat.js +1 -0
  4. package/dist/application/filters.js +27 -0
  5. package/dist/application/import.js +1 -0
  6. package/dist/application/ports.js +1 -0
  7. package/dist/application/repository-root.js +18 -0
  8. package/dist/application/services/backup-service.js +93 -0
  9. package/dist/application/services/folder-service.js +116 -0
  10. package/dist/application/services/git-workflow-service.js +593 -0
  11. package/dist/application/services/index.js +24 -0
  12. package/dist/application/services/project-service.js +129 -0
  13. package/dist/application/services/session-service.js +52 -0
  14. package/dist/application/services/task-service.js +350 -0
  15. package/dist/application/services/update-service.js +60 -0
  16. package/dist/application/services/workspace-service.js +81 -0
  17. package/dist/application/timeline.js +83 -0
  18. package/dist/application/types.js +1 -0
  19. package/dist/application/validation.js +30 -0
  20. package/dist/bootstrap.js +91 -0
  21. package/dist/cli/commands/access.js +60 -0
  22. package/dist/cli/commands/account.js +203 -0
  23. package/dist/cli/commands/args.js +27 -0
  24. package/dist/cli/commands/backup.js +70 -0
  25. package/dist/cli/commands/chat.js +133 -0
  26. package/dist/cli/commands/dev.js +59 -0
  27. package/dist/cli/commands/folders.js +59 -0
  28. package/dist/cli/commands/git-ops.js +200 -0
  29. package/dist/cli/commands/import.js +48 -0
  30. package/dist/cli/commands/info.js +82 -0
  31. package/dist/cli/commands/project.js +108 -0
  32. package/dist/cli/commands/start.js +34 -0
  33. package/dist/cli/commands/sync.js +43 -0
  34. package/dist/cli/commands/task.js +309 -0
  35. package/dist/cli/commands/tui.js +43 -0
  36. package/dist/cli/commands/update.js +20 -0
  37. package/dist/cli/commands/workspace.js +55 -0
  38. package/dist/cli/index.js +103 -0
  39. package/dist/cli/output.js +56 -0
  40. package/dist/cli/prompt.js +28 -0
  41. package/dist/cli/runtime.js +43 -0
  42. package/dist/config/config.js +103 -0
  43. package/dist/config/credentials.js +68 -0
  44. package/dist/config/paths.js +18 -0
  45. package/dist/config/server.js +21 -0
  46. package/dist/config/version.js +7 -0
  47. package/dist/data/local/activity.js +33 -0
  48. package/dist/data/local/clock.js +1 -0
  49. package/dist/data/local/comments.js +27 -0
  50. package/dist/data/local/index.js +48 -0
  51. package/dist/data/local/projects.js +53 -0
  52. package/dist/data/local/tasks.js +104 -0
  53. package/dist/data/local/users.js +38 -0
  54. package/dist/data/local/workspaces.js +55 -0
  55. package/dist/data/remote/api-client.js +103 -0
  56. package/dist/data/remote/live.js +93 -0
  57. package/dist/data/repositories.js +1 -0
  58. package/dist/data/sync/chat.js +242 -0
  59. package/dist/data/sync/engine.js +459 -0
  60. package/dist/data/sync/importer.js +156 -0
  61. package/dist/data/sync/index.js +109 -0
  62. package/dist/data/sync/services.js +263 -0
  63. package/dist/data/sync/store.js +200 -0
  64. package/dist/database/client.js +76 -0
  65. package/dist/database/migrate.js +27 -0
  66. package/dist/database/migrations/0000_init.sql +100 -0
  67. package/dist/database/migrations/0001_git-operations.sql +19 -0
  68. package/dist/database/migrations/0002_merge-detection.sql +19 -0
  69. package/dist/database/migrations/0003_sync-replica.sql +40 -0
  70. package/dist/database/migrations/0004_chat-replica.sql +52 -0
  71. package/dist/database/migrations/0005_pr-events.sql +18 -0
  72. package/dist/database/migrations/0006_archive.sql +20 -0
  73. package/dist/database/migrations/meta/0000_snapshot.json +710 -0
  74. package/dist/database/migrations/meta/0001_snapshot.json +717 -0
  75. package/dist/database/migrations/meta/0002_snapshot.json +724 -0
  76. package/dist/database/migrations/meta/0003_snapshot.json +972 -0
  77. package/dist/database/migrations/meta/0004_snapshot.json +1168 -0
  78. package/dist/database/migrations/meta/0005_snapshot.json +1168 -0
  79. package/dist/database/migrations/meta/0006_snapshot.json +1183 -0
  80. package/dist/database/migrations/meta/_journal.json +55 -0
  81. package/dist/database/schema.js +170 -0
  82. package/dist/dev/seed.js +84 -0
  83. package/dist/domain/activity.js +22 -0
  84. package/dist/domain/chat.js +21 -0
  85. package/dist/domain/entities.js +1 -0
  86. package/dist/domain/errors.js +23 -0
  87. package/dist/domain/naming.js +33 -0
  88. package/dist/domain/task.js +140 -0
  89. package/dist/domain/workflow.js +23 -0
  90. package/dist/git/cli-git.js +363 -0
  91. package/dist/git/console.js +37 -0
  92. package/dist/git/diagnose.js +145 -0
  93. package/dist/git/merge-evidence.js +23 -0
  94. package/dist/git/releases.js +95 -0
  95. package/dist/git/types.js +16 -0
  96. package/dist/ui/App.js +71 -0
  97. package/dist/ui/Shell.js +211 -0
  98. package/dist/ui/app-state.js +213 -0
  99. package/dist/ui/branding/CompactLogo.js +8 -0
  100. package/dist/ui/branding/Logo.js +22 -0
  101. package/dist/ui/branding/Splash.js +21 -0
  102. package/dist/ui/branding/brand.js +23 -0
  103. package/dist/ui/chrome/Sidebar.js +50 -0
  104. package/dist/ui/chrome/StatusBar.js +26 -0
  105. package/dist/ui/chrome/Toast.js +11 -0
  106. package/dist/ui/chrome/TopBar.js +10 -0
  107. package/dist/ui/chrome/context.js +33 -0
  108. package/dist/ui/components/ConsoleLines.js +16 -0
  109. package/dist/ui/components/EmptyState.js +8 -0
  110. package/dist/ui/components/Labels.js +25 -0
  111. package/dist/ui/components/PullRequestLabel.js +27 -0
  112. package/dist/ui/components/TaskTable.js +41 -0
  113. package/dist/ui/components/TextField.js +11 -0
  114. package/dist/ui/components/TextInput.js +29 -0
  115. package/dist/ui/components/task-columns.js +27 -0
  116. package/dist/ui/copy.js +23 -0
  117. package/dist/ui/hooks/use-commands.js +58 -0
  118. package/dist/ui/hooks/use-flows.js +254 -0
  119. package/dist/ui/hooks/use-layout.js +36 -0
  120. package/dist/ui/hooks/use-list.js +28 -0
  121. package/dist/ui/hooks/use-measure.js +22 -0
  122. package/dist/ui/hooks/use-query.js +29 -0
  123. package/dist/ui/hooks/use-task-actions.js +450 -0
  124. package/dist/ui/hooks/use-terminal-size.js +19 -0
  125. package/dist/ui/input/KeyProvider.js +101 -0
  126. package/dist/ui/input/dispatcher.js +26 -0
  127. package/dist/ui/input/list-navigation.js +38 -0
  128. package/dist/ui/input/mouse.js +78 -0
  129. package/dist/ui/input/text-editing.js +62 -0
  130. package/dist/ui/kit/Badge.js +8 -0
  131. package/dist/ui/kit/Button.js +13 -0
  132. package/dist/ui/kit/Clickable.js +14 -0
  133. package/dist/ui/kit/Gauge.js +9 -0
  134. package/dist/ui/kit/Keycap.js +7 -0
  135. package/dist/ui/kit/Panel.js +30 -0
  136. package/dist/ui/kit/ScrollBar.js +14 -0
  137. package/dist/ui/kit/Spinner.js +9 -0
  138. package/dist/ui/kit/Tabs.js +12 -0
  139. package/dist/ui/mascot/AgentScene.js +30 -0
  140. package/dist/ui/mascot/Mascot.js +26 -0
  141. package/dist/ui/mascot/ansi.js +25 -0
  142. package/dist/ui/mascot/engine.js +146 -0
  143. package/dist/ui/mascot/index.js +6 -0
  144. package/dist/ui/mascot/palette.js +18 -0
  145. package/dist/ui/mascot/scenes/bugHunt.js +115 -0
  146. package/dist/ui/mascot/scenes/celebrate.js +76 -0
  147. package/dist/ui/mascot/scenes/cleaning.js +156 -0
  148. package/dist/ui/mascot/scenes/clockIn.js +105 -0
  149. package/dist/ui/mascot/scenes/deadline.js +125 -0
  150. package/dist/ui/mascot/scenes/empty.js +149 -0
  151. package/dist/ui/mascot/scenes/fire.js +138 -0
  152. package/dist/ui/mascot/scenes/index.js +25 -0
  153. package/dist/ui/mascot/scenes/planning.js +73 -0
  154. package/dist/ui/mascot/scenes/resting.js +90 -0
  155. package/dist/ui/mascot/scenes/syncing.js +116 -0
  156. package/dist/ui/mascot/scenes/working.js +193 -0
  157. package/dist/ui/mascot/selection.js +32 -0
  158. package/dist/ui/mascot/states.js +25 -0
  159. package/dist/ui/navigation/routes.js +17 -0
  160. package/dist/ui/overlays/CommitOverlay.js +93 -0
  161. package/dist/ui/overlays/ConfirmOverlay.js +42 -0
  162. package/dist/ui/overlays/GitLogOverlay.js +22 -0
  163. package/dist/ui/overlays/GitRunOverlay.js +94 -0
  164. package/dist/ui/overlays/NewTaskOverlay.js +117 -0
  165. package/dist/ui/overlays/OverlayFrame.js +35 -0
  166. package/dist/ui/overlays/PickerOverlay.js +72 -0
  167. package/dist/ui/overlays/PromptOverlay.js +51 -0
  168. package/dist/ui/overlays/SearchOverlay.js +49 -0
  169. package/dist/ui/overlays/options.js +29 -0
  170. package/dist/ui/overlays/types.js +1 -0
  171. package/dist/ui/screens/AccessScreen.js +91 -0
  172. package/dist/ui/screens/ChatScreen.js +450 -0
  173. package/dist/ui/screens/HelpScreen.js +99 -0
  174. package/dist/ui/screens/ProjectsScreen.js +66 -0
  175. package/dist/ui/screens/ScreenFrame.js +14 -0
  176. package/dist/ui/screens/SetupScreen.js +79 -0
  177. package/dist/ui/screens/TaskListScreen.js +152 -0
  178. package/dist/ui/screens/TaskScreen.js +193 -0
  179. package/dist/ui/screens/WelcomeScreen.js +254 -0
  180. package/dist/ui/screens/WorkspacesScreen.js +64 -0
  181. package/dist/ui/theme/detect.js +59 -0
  182. package/dist/ui/theme/theme.js +135 -0
  183. package/dist/utils/editor.js +37 -0
  184. package/dist/utils/errors.js +23 -0
  185. package/dist/utils/text.js +60 -0
  186. package/dist/utils/time.js +25 -0
  187. package/docs/NPM_PUBLISH.md +35 -0
  188. package/docs/PRIVACY.md +38 -0
  189. package/package.json +74 -0
@@ -0,0 +1,710 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "7c8bc01d-1846-44de-bed0-f38a4d310005",
5
+ "prevId": "00000000-0000-0000-0000-000000000000",
6
+ "tables": {
7
+ "projects": {
8
+ "name": "projects",
9
+ "columns": {
10
+ "id": {
11
+ "name": "id",
12
+ "type": "text",
13
+ "primaryKey": true,
14
+ "notNull": true,
15
+ "autoincrement": false
16
+ },
17
+ "workspace_id": {
18
+ "name": "workspace_id",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true,
22
+ "autoincrement": false
23
+ },
24
+ "name": {
25
+ "name": "name",
26
+ "type": "text",
27
+ "primaryKey": false,
28
+ "notNull": true,
29
+ "autoincrement": false
30
+ },
31
+ "key": {
32
+ "name": "key",
33
+ "type": "text",
34
+ "primaryKey": false,
35
+ "notNull": true,
36
+ "autoincrement": false
37
+ },
38
+ "description": {
39
+ "name": "description",
40
+ "type": "text",
41
+ "primaryKey": false,
42
+ "notNull": false,
43
+ "autoincrement": false
44
+ },
45
+ "repository_url": {
46
+ "name": "repository_url",
47
+ "type": "text",
48
+ "primaryKey": false,
49
+ "notNull": false,
50
+ "autoincrement": false
51
+ },
52
+ "repository_path": {
53
+ "name": "repository_path",
54
+ "type": "text",
55
+ "primaryKey": false,
56
+ "notNull": false,
57
+ "autoincrement": false
58
+ },
59
+ "created_at": {
60
+ "name": "created_at",
61
+ "type": "integer",
62
+ "primaryKey": false,
63
+ "notNull": true,
64
+ "autoincrement": false
65
+ },
66
+ "updated_at": {
67
+ "name": "updated_at",
68
+ "type": "integer",
69
+ "primaryKey": false,
70
+ "notNull": true,
71
+ "autoincrement": false
72
+ }
73
+ },
74
+ "indexes": {
75
+ "projects_workspace_key": {
76
+ "name": "projects_workspace_key",
77
+ "columns": [
78
+ "workspace_id",
79
+ "key"
80
+ ],
81
+ "isUnique": true
82
+ }
83
+ },
84
+ "foreignKeys": {
85
+ "projects_workspace_id_workspaces_id_fk": {
86
+ "name": "projects_workspace_id_workspaces_id_fk",
87
+ "tableFrom": "projects",
88
+ "tableTo": "workspaces",
89
+ "columnsFrom": [
90
+ "workspace_id"
91
+ ],
92
+ "columnsTo": [
93
+ "id"
94
+ ],
95
+ "onDelete": "cascade",
96
+ "onUpdate": "no action"
97
+ }
98
+ },
99
+ "compositePrimaryKeys": {},
100
+ "uniqueConstraints": {},
101
+ "checkConstraints": {}
102
+ },
103
+ "task_activity": {
104
+ "name": "task_activity",
105
+ "columns": {
106
+ "id": {
107
+ "name": "id",
108
+ "type": "text",
109
+ "primaryKey": true,
110
+ "notNull": true,
111
+ "autoincrement": false
112
+ },
113
+ "task_id": {
114
+ "name": "task_id",
115
+ "type": "text",
116
+ "primaryKey": false,
117
+ "notNull": true,
118
+ "autoincrement": false
119
+ },
120
+ "user_id": {
121
+ "name": "user_id",
122
+ "type": "text",
123
+ "primaryKey": false,
124
+ "notNull": false,
125
+ "autoincrement": false
126
+ },
127
+ "type": {
128
+ "name": "type",
129
+ "type": "text",
130
+ "primaryKey": false,
131
+ "notNull": true,
132
+ "autoincrement": false
133
+ },
134
+ "metadata": {
135
+ "name": "metadata",
136
+ "type": "text",
137
+ "primaryKey": false,
138
+ "notNull": true,
139
+ "autoincrement": false
140
+ },
141
+ "created_at": {
142
+ "name": "created_at",
143
+ "type": "integer",
144
+ "primaryKey": false,
145
+ "notNull": true,
146
+ "autoincrement": false
147
+ }
148
+ },
149
+ "indexes": {
150
+ "task_activity_task": {
151
+ "name": "task_activity_task",
152
+ "columns": [
153
+ "task_id"
154
+ ],
155
+ "isUnique": false
156
+ }
157
+ },
158
+ "foreignKeys": {
159
+ "task_activity_task_id_tasks_id_fk": {
160
+ "name": "task_activity_task_id_tasks_id_fk",
161
+ "tableFrom": "task_activity",
162
+ "tableTo": "tasks",
163
+ "columnsFrom": [
164
+ "task_id"
165
+ ],
166
+ "columnsTo": [
167
+ "id"
168
+ ],
169
+ "onDelete": "cascade",
170
+ "onUpdate": "no action"
171
+ },
172
+ "task_activity_user_id_users_id_fk": {
173
+ "name": "task_activity_user_id_users_id_fk",
174
+ "tableFrom": "task_activity",
175
+ "tableTo": "users",
176
+ "columnsFrom": [
177
+ "user_id"
178
+ ],
179
+ "columnsTo": [
180
+ "id"
181
+ ],
182
+ "onDelete": "set null",
183
+ "onUpdate": "no action"
184
+ }
185
+ },
186
+ "compositePrimaryKeys": {},
187
+ "uniqueConstraints": {},
188
+ "checkConstraints": {
189
+ "task_activity_type": {
190
+ "name": "task_activity_type",
191
+ "value": "type IN ('task_created', 'task_updated', 'status_changed', 'assigned', 'unassigned', 'priority_changed', 'project_changed', 'comment_added', 'task_completed', 'task_reopened')"
192
+ }
193
+ }
194
+ },
195
+ "task_comments": {
196
+ "name": "task_comments",
197
+ "columns": {
198
+ "id": {
199
+ "name": "id",
200
+ "type": "text",
201
+ "primaryKey": true,
202
+ "notNull": true,
203
+ "autoincrement": false
204
+ },
205
+ "task_id": {
206
+ "name": "task_id",
207
+ "type": "text",
208
+ "primaryKey": false,
209
+ "notNull": true,
210
+ "autoincrement": false
211
+ },
212
+ "user_id": {
213
+ "name": "user_id",
214
+ "type": "text",
215
+ "primaryKey": false,
216
+ "notNull": true,
217
+ "autoincrement": false
218
+ },
219
+ "body": {
220
+ "name": "body",
221
+ "type": "text",
222
+ "primaryKey": false,
223
+ "notNull": true,
224
+ "autoincrement": false
225
+ },
226
+ "created_at": {
227
+ "name": "created_at",
228
+ "type": "integer",
229
+ "primaryKey": false,
230
+ "notNull": true,
231
+ "autoincrement": false
232
+ },
233
+ "updated_at": {
234
+ "name": "updated_at",
235
+ "type": "integer",
236
+ "primaryKey": false,
237
+ "notNull": true,
238
+ "autoincrement": false
239
+ }
240
+ },
241
+ "indexes": {
242
+ "task_comments_task": {
243
+ "name": "task_comments_task",
244
+ "columns": [
245
+ "task_id"
246
+ ],
247
+ "isUnique": false
248
+ }
249
+ },
250
+ "foreignKeys": {
251
+ "task_comments_task_id_tasks_id_fk": {
252
+ "name": "task_comments_task_id_tasks_id_fk",
253
+ "tableFrom": "task_comments",
254
+ "tableTo": "tasks",
255
+ "columnsFrom": [
256
+ "task_id"
257
+ ],
258
+ "columnsTo": [
259
+ "id"
260
+ ],
261
+ "onDelete": "cascade",
262
+ "onUpdate": "no action"
263
+ },
264
+ "task_comments_user_id_users_id_fk": {
265
+ "name": "task_comments_user_id_users_id_fk",
266
+ "tableFrom": "task_comments",
267
+ "tableTo": "users",
268
+ "columnsFrom": [
269
+ "user_id"
270
+ ],
271
+ "columnsTo": [
272
+ "id"
273
+ ],
274
+ "onDelete": "no action",
275
+ "onUpdate": "no action"
276
+ }
277
+ },
278
+ "compositePrimaryKeys": {},
279
+ "uniqueConstraints": {},
280
+ "checkConstraints": {}
281
+ },
282
+ "tasks": {
283
+ "name": "tasks",
284
+ "columns": {
285
+ "id": {
286
+ "name": "id",
287
+ "type": "text",
288
+ "primaryKey": true,
289
+ "notNull": true,
290
+ "autoincrement": false
291
+ },
292
+ "number": {
293
+ "name": "number",
294
+ "type": "integer",
295
+ "primaryKey": false,
296
+ "notNull": true,
297
+ "autoincrement": false
298
+ },
299
+ "workspace_id": {
300
+ "name": "workspace_id",
301
+ "type": "text",
302
+ "primaryKey": false,
303
+ "notNull": true,
304
+ "autoincrement": false
305
+ },
306
+ "project_id": {
307
+ "name": "project_id",
308
+ "type": "text",
309
+ "primaryKey": false,
310
+ "notNull": false,
311
+ "autoincrement": false
312
+ },
313
+ "title": {
314
+ "name": "title",
315
+ "type": "text",
316
+ "primaryKey": false,
317
+ "notNull": true,
318
+ "autoincrement": false
319
+ },
320
+ "description": {
321
+ "name": "description",
322
+ "type": "text",
323
+ "primaryKey": false,
324
+ "notNull": false,
325
+ "autoincrement": false
326
+ },
327
+ "type": {
328
+ "name": "type",
329
+ "type": "text",
330
+ "primaryKey": false,
331
+ "notNull": true,
332
+ "autoincrement": false
333
+ },
334
+ "priority": {
335
+ "name": "priority",
336
+ "type": "text",
337
+ "primaryKey": false,
338
+ "notNull": true,
339
+ "autoincrement": false
340
+ },
341
+ "status": {
342
+ "name": "status",
343
+ "type": "text",
344
+ "primaryKey": false,
345
+ "notNull": true,
346
+ "autoincrement": false
347
+ },
348
+ "assignee_id": {
349
+ "name": "assignee_id",
350
+ "type": "text",
351
+ "primaryKey": false,
352
+ "notNull": false,
353
+ "autoincrement": false
354
+ },
355
+ "creator_id": {
356
+ "name": "creator_id",
357
+ "type": "text",
358
+ "primaryKey": false,
359
+ "notNull": true,
360
+ "autoincrement": false
361
+ },
362
+ "requester": {
363
+ "name": "requester",
364
+ "type": "text",
365
+ "primaryKey": false,
366
+ "notNull": false,
367
+ "autoincrement": false
368
+ },
369
+ "branch": {
370
+ "name": "branch",
371
+ "type": "text",
372
+ "primaryKey": false,
373
+ "notNull": false,
374
+ "autoincrement": false
375
+ },
376
+ "created_at": {
377
+ "name": "created_at",
378
+ "type": "integer",
379
+ "primaryKey": false,
380
+ "notNull": true,
381
+ "autoincrement": false
382
+ },
383
+ "updated_at": {
384
+ "name": "updated_at",
385
+ "type": "integer",
386
+ "primaryKey": false,
387
+ "notNull": true,
388
+ "autoincrement": false
389
+ },
390
+ "started_at": {
391
+ "name": "started_at",
392
+ "type": "integer",
393
+ "primaryKey": false,
394
+ "notNull": false,
395
+ "autoincrement": false
396
+ },
397
+ "completed_at": {
398
+ "name": "completed_at",
399
+ "type": "integer",
400
+ "primaryKey": false,
401
+ "notNull": false,
402
+ "autoincrement": false
403
+ }
404
+ },
405
+ "indexes": {
406
+ "tasks_workspace_number": {
407
+ "name": "tasks_workspace_number",
408
+ "columns": [
409
+ "workspace_id",
410
+ "number"
411
+ ],
412
+ "isUnique": true
413
+ },
414
+ "tasks_workspace_status": {
415
+ "name": "tasks_workspace_status",
416
+ "columns": [
417
+ "workspace_id",
418
+ "status"
419
+ ],
420
+ "isUnique": false
421
+ },
422
+ "tasks_assignee": {
423
+ "name": "tasks_assignee",
424
+ "columns": [
425
+ "assignee_id"
426
+ ],
427
+ "isUnique": false
428
+ },
429
+ "tasks_project": {
430
+ "name": "tasks_project",
431
+ "columns": [
432
+ "project_id"
433
+ ],
434
+ "isUnique": false
435
+ }
436
+ },
437
+ "foreignKeys": {
438
+ "tasks_workspace_id_workspaces_id_fk": {
439
+ "name": "tasks_workspace_id_workspaces_id_fk",
440
+ "tableFrom": "tasks",
441
+ "tableTo": "workspaces",
442
+ "columnsFrom": [
443
+ "workspace_id"
444
+ ],
445
+ "columnsTo": [
446
+ "id"
447
+ ],
448
+ "onDelete": "cascade",
449
+ "onUpdate": "no action"
450
+ },
451
+ "tasks_project_id_projects_id_fk": {
452
+ "name": "tasks_project_id_projects_id_fk",
453
+ "tableFrom": "tasks",
454
+ "tableTo": "projects",
455
+ "columnsFrom": [
456
+ "project_id"
457
+ ],
458
+ "columnsTo": [
459
+ "id"
460
+ ],
461
+ "onDelete": "set null",
462
+ "onUpdate": "no action"
463
+ },
464
+ "tasks_assignee_id_users_id_fk": {
465
+ "name": "tasks_assignee_id_users_id_fk",
466
+ "tableFrom": "tasks",
467
+ "tableTo": "users",
468
+ "columnsFrom": [
469
+ "assignee_id"
470
+ ],
471
+ "columnsTo": [
472
+ "id"
473
+ ],
474
+ "onDelete": "set null",
475
+ "onUpdate": "no action"
476
+ },
477
+ "tasks_creator_id_users_id_fk": {
478
+ "name": "tasks_creator_id_users_id_fk",
479
+ "tableFrom": "tasks",
480
+ "tableTo": "users",
481
+ "columnsFrom": [
482
+ "creator_id"
483
+ ],
484
+ "columnsTo": [
485
+ "id"
486
+ ],
487
+ "onDelete": "no action",
488
+ "onUpdate": "no action"
489
+ }
490
+ },
491
+ "compositePrimaryKeys": {},
492
+ "uniqueConstraints": {},
493
+ "checkConstraints": {
494
+ "tasks_type": {
495
+ "name": "tasks_type",
496
+ "value": "type IN ('bug', 'feature', 'improvement', 'maintenance', 'infra', 'refactor', 'research', 'chore')"
497
+ },
498
+ "tasks_priority": {
499
+ "name": "tasks_priority",
500
+ "value": "priority IN ('none', 'low', 'medium', 'high', 'urgent')"
501
+ },
502
+ "tasks_status": {
503
+ "name": "tasks_status",
504
+ "value": "status IN ('backlog', 'todo', 'in_progress', 'review', 'blocked', 'done', 'cancelled')"
505
+ }
506
+ }
507
+ },
508
+ "users": {
509
+ "name": "users",
510
+ "columns": {
511
+ "id": {
512
+ "name": "id",
513
+ "type": "text",
514
+ "primaryKey": true,
515
+ "notNull": true,
516
+ "autoincrement": false
517
+ },
518
+ "username": {
519
+ "name": "username",
520
+ "type": "text",
521
+ "primaryKey": false,
522
+ "notNull": true,
523
+ "autoincrement": false
524
+ },
525
+ "display_name": {
526
+ "name": "display_name",
527
+ "type": "text",
528
+ "primaryKey": false,
529
+ "notNull": true,
530
+ "autoincrement": false
531
+ },
532
+ "email": {
533
+ "name": "email",
534
+ "type": "text",
535
+ "primaryKey": false,
536
+ "notNull": false,
537
+ "autoincrement": false
538
+ },
539
+ "created_at": {
540
+ "name": "created_at",
541
+ "type": "integer",
542
+ "primaryKey": false,
543
+ "notNull": true,
544
+ "autoincrement": false
545
+ },
546
+ "updated_at": {
547
+ "name": "updated_at",
548
+ "type": "integer",
549
+ "primaryKey": false,
550
+ "notNull": true,
551
+ "autoincrement": false
552
+ }
553
+ },
554
+ "indexes": {
555
+ "users_username_unique": {
556
+ "name": "users_username_unique",
557
+ "columns": [
558
+ "username"
559
+ ],
560
+ "isUnique": true
561
+ }
562
+ },
563
+ "foreignKeys": {},
564
+ "compositePrimaryKeys": {},
565
+ "uniqueConstraints": {},
566
+ "checkConstraints": {}
567
+ },
568
+ "workspace_members": {
569
+ "name": "workspace_members",
570
+ "columns": {
571
+ "workspace_id": {
572
+ "name": "workspace_id",
573
+ "type": "text",
574
+ "primaryKey": false,
575
+ "notNull": true,
576
+ "autoincrement": false
577
+ },
578
+ "user_id": {
579
+ "name": "user_id",
580
+ "type": "text",
581
+ "primaryKey": false,
582
+ "notNull": true,
583
+ "autoincrement": false
584
+ },
585
+ "role": {
586
+ "name": "role",
587
+ "type": "text",
588
+ "primaryKey": false,
589
+ "notNull": true,
590
+ "autoincrement": false
591
+ }
592
+ },
593
+ "indexes": {},
594
+ "foreignKeys": {
595
+ "workspace_members_workspace_id_workspaces_id_fk": {
596
+ "name": "workspace_members_workspace_id_workspaces_id_fk",
597
+ "tableFrom": "workspace_members",
598
+ "tableTo": "workspaces",
599
+ "columnsFrom": [
600
+ "workspace_id"
601
+ ],
602
+ "columnsTo": [
603
+ "id"
604
+ ],
605
+ "onDelete": "cascade",
606
+ "onUpdate": "no action"
607
+ },
608
+ "workspace_members_user_id_users_id_fk": {
609
+ "name": "workspace_members_user_id_users_id_fk",
610
+ "tableFrom": "workspace_members",
611
+ "tableTo": "users",
612
+ "columnsFrom": [
613
+ "user_id"
614
+ ],
615
+ "columnsTo": [
616
+ "id"
617
+ ],
618
+ "onDelete": "cascade",
619
+ "onUpdate": "no action"
620
+ }
621
+ },
622
+ "compositePrimaryKeys": {
623
+ "workspace_members_workspace_id_user_id_pk": {
624
+ "columns": [
625
+ "workspace_id",
626
+ "user_id"
627
+ ],
628
+ "name": "workspace_members_workspace_id_user_id_pk"
629
+ }
630
+ },
631
+ "uniqueConstraints": {},
632
+ "checkConstraints": {
633
+ "workspace_members_role": {
634
+ "name": "workspace_members_role",
635
+ "value": "role IN ('owner', 'member')"
636
+ }
637
+ }
638
+ },
639
+ "workspaces": {
640
+ "name": "workspaces",
641
+ "columns": {
642
+ "id": {
643
+ "name": "id",
644
+ "type": "text",
645
+ "primaryKey": true,
646
+ "notNull": true,
647
+ "autoincrement": false
648
+ },
649
+ "name": {
650
+ "name": "name",
651
+ "type": "text",
652
+ "primaryKey": false,
653
+ "notNull": true,
654
+ "autoincrement": false
655
+ },
656
+ "slug": {
657
+ "name": "slug",
658
+ "type": "text",
659
+ "primaryKey": false,
660
+ "notNull": true,
661
+ "autoincrement": false
662
+ },
663
+ "description": {
664
+ "name": "description",
665
+ "type": "text",
666
+ "primaryKey": false,
667
+ "notNull": false,
668
+ "autoincrement": false
669
+ },
670
+ "created_at": {
671
+ "name": "created_at",
672
+ "type": "integer",
673
+ "primaryKey": false,
674
+ "notNull": true,
675
+ "autoincrement": false
676
+ },
677
+ "updated_at": {
678
+ "name": "updated_at",
679
+ "type": "integer",
680
+ "primaryKey": false,
681
+ "notNull": true,
682
+ "autoincrement": false
683
+ }
684
+ },
685
+ "indexes": {
686
+ "workspaces_slug_unique": {
687
+ "name": "workspaces_slug_unique",
688
+ "columns": [
689
+ "slug"
690
+ ],
691
+ "isUnique": true
692
+ }
693
+ },
694
+ "foreignKeys": {},
695
+ "compositePrimaryKeys": {},
696
+ "uniqueConstraints": {},
697
+ "checkConstraints": {}
698
+ }
699
+ },
700
+ "views": {},
701
+ "enums": {},
702
+ "_meta": {
703
+ "schemas": {},
704
+ "tables": {},
705
+ "columns": {}
706
+ },
707
+ "internal": {
708
+ "indexes": {}
709
+ }
710
+ }