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,717 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "81b8aa29-0723-48a2-84a6-6a0efd251719",
5
+ "prevId": "7c8bc01d-1846-44de-bed0-f38a4d310005",
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', 'git_committed', 'git_merged', 'git_branch_deleted', 'git_pushed', 'pr_opened')"
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
+ "base_branch": {
377
+ "name": "base_branch",
378
+ "type": "text",
379
+ "primaryKey": false,
380
+ "notNull": false,
381
+ "autoincrement": false
382
+ },
383
+ "created_at": {
384
+ "name": "created_at",
385
+ "type": "integer",
386
+ "primaryKey": false,
387
+ "notNull": true,
388
+ "autoincrement": false
389
+ },
390
+ "updated_at": {
391
+ "name": "updated_at",
392
+ "type": "integer",
393
+ "primaryKey": false,
394
+ "notNull": true,
395
+ "autoincrement": false
396
+ },
397
+ "started_at": {
398
+ "name": "started_at",
399
+ "type": "integer",
400
+ "primaryKey": false,
401
+ "notNull": false,
402
+ "autoincrement": false
403
+ },
404
+ "completed_at": {
405
+ "name": "completed_at",
406
+ "type": "integer",
407
+ "primaryKey": false,
408
+ "notNull": false,
409
+ "autoincrement": false
410
+ }
411
+ },
412
+ "indexes": {
413
+ "tasks_workspace_number": {
414
+ "name": "tasks_workspace_number",
415
+ "columns": [
416
+ "workspace_id",
417
+ "number"
418
+ ],
419
+ "isUnique": true
420
+ },
421
+ "tasks_workspace_status": {
422
+ "name": "tasks_workspace_status",
423
+ "columns": [
424
+ "workspace_id",
425
+ "status"
426
+ ],
427
+ "isUnique": false
428
+ },
429
+ "tasks_assignee": {
430
+ "name": "tasks_assignee",
431
+ "columns": [
432
+ "assignee_id"
433
+ ],
434
+ "isUnique": false
435
+ },
436
+ "tasks_project": {
437
+ "name": "tasks_project",
438
+ "columns": [
439
+ "project_id"
440
+ ],
441
+ "isUnique": false
442
+ }
443
+ },
444
+ "foreignKeys": {
445
+ "tasks_workspace_id_workspaces_id_fk": {
446
+ "name": "tasks_workspace_id_workspaces_id_fk",
447
+ "tableFrom": "tasks",
448
+ "tableTo": "workspaces",
449
+ "columnsFrom": [
450
+ "workspace_id"
451
+ ],
452
+ "columnsTo": [
453
+ "id"
454
+ ],
455
+ "onDelete": "cascade",
456
+ "onUpdate": "no action"
457
+ },
458
+ "tasks_project_id_projects_id_fk": {
459
+ "name": "tasks_project_id_projects_id_fk",
460
+ "tableFrom": "tasks",
461
+ "tableTo": "projects",
462
+ "columnsFrom": [
463
+ "project_id"
464
+ ],
465
+ "columnsTo": [
466
+ "id"
467
+ ],
468
+ "onDelete": "set null",
469
+ "onUpdate": "no action"
470
+ },
471
+ "tasks_assignee_id_users_id_fk": {
472
+ "name": "tasks_assignee_id_users_id_fk",
473
+ "tableFrom": "tasks",
474
+ "tableTo": "users",
475
+ "columnsFrom": [
476
+ "assignee_id"
477
+ ],
478
+ "columnsTo": [
479
+ "id"
480
+ ],
481
+ "onDelete": "set null",
482
+ "onUpdate": "no action"
483
+ },
484
+ "tasks_creator_id_users_id_fk": {
485
+ "name": "tasks_creator_id_users_id_fk",
486
+ "tableFrom": "tasks",
487
+ "tableTo": "users",
488
+ "columnsFrom": [
489
+ "creator_id"
490
+ ],
491
+ "columnsTo": [
492
+ "id"
493
+ ],
494
+ "onDelete": "no action",
495
+ "onUpdate": "no action"
496
+ }
497
+ },
498
+ "compositePrimaryKeys": {},
499
+ "uniqueConstraints": {},
500
+ "checkConstraints": {
501
+ "tasks_type": {
502
+ "name": "tasks_type",
503
+ "value": "type IN ('bug', 'feature', 'improvement', 'maintenance', 'infra', 'refactor', 'research', 'chore')"
504
+ },
505
+ "tasks_priority": {
506
+ "name": "tasks_priority",
507
+ "value": "priority IN ('none', 'low', 'medium', 'high', 'urgent')"
508
+ },
509
+ "tasks_status": {
510
+ "name": "tasks_status",
511
+ "value": "status IN ('backlog', 'todo', 'in_progress', 'review', 'blocked', 'done', 'cancelled')"
512
+ }
513
+ }
514
+ },
515
+ "users": {
516
+ "name": "users",
517
+ "columns": {
518
+ "id": {
519
+ "name": "id",
520
+ "type": "text",
521
+ "primaryKey": true,
522
+ "notNull": true,
523
+ "autoincrement": false
524
+ },
525
+ "username": {
526
+ "name": "username",
527
+ "type": "text",
528
+ "primaryKey": false,
529
+ "notNull": true,
530
+ "autoincrement": false
531
+ },
532
+ "display_name": {
533
+ "name": "display_name",
534
+ "type": "text",
535
+ "primaryKey": false,
536
+ "notNull": true,
537
+ "autoincrement": false
538
+ },
539
+ "email": {
540
+ "name": "email",
541
+ "type": "text",
542
+ "primaryKey": false,
543
+ "notNull": false,
544
+ "autoincrement": false
545
+ },
546
+ "created_at": {
547
+ "name": "created_at",
548
+ "type": "integer",
549
+ "primaryKey": false,
550
+ "notNull": true,
551
+ "autoincrement": false
552
+ },
553
+ "updated_at": {
554
+ "name": "updated_at",
555
+ "type": "integer",
556
+ "primaryKey": false,
557
+ "notNull": true,
558
+ "autoincrement": false
559
+ }
560
+ },
561
+ "indexes": {
562
+ "users_username_unique": {
563
+ "name": "users_username_unique",
564
+ "columns": [
565
+ "username"
566
+ ],
567
+ "isUnique": true
568
+ }
569
+ },
570
+ "foreignKeys": {},
571
+ "compositePrimaryKeys": {},
572
+ "uniqueConstraints": {},
573
+ "checkConstraints": {}
574
+ },
575
+ "workspace_members": {
576
+ "name": "workspace_members",
577
+ "columns": {
578
+ "workspace_id": {
579
+ "name": "workspace_id",
580
+ "type": "text",
581
+ "primaryKey": false,
582
+ "notNull": true,
583
+ "autoincrement": false
584
+ },
585
+ "user_id": {
586
+ "name": "user_id",
587
+ "type": "text",
588
+ "primaryKey": false,
589
+ "notNull": true,
590
+ "autoincrement": false
591
+ },
592
+ "role": {
593
+ "name": "role",
594
+ "type": "text",
595
+ "primaryKey": false,
596
+ "notNull": true,
597
+ "autoincrement": false
598
+ }
599
+ },
600
+ "indexes": {},
601
+ "foreignKeys": {
602
+ "workspace_members_workspace_id_workspaces_id_fk": {
603
+ "name": "workspace_members_workspace_id_workspaces_id_fk",
604
+ "tableFrom": "workspace_members",
605
+ "tableTo": "workspaces",
606
+ "columnsFrom": [
607
+ "workspace_id"
608
+ ],
609
+ "columnsTo": [
610
+ "id"
611
+ ],
612
+ "onDelete": "cascade",
613
+ "onUpdate": "no action"
614
+ },
615
+ "workspace_members_user_id_users_id_fk": {
616
+ "name": "workspace_members_user_id_users_id_fk",
617
+ "tableFrom": "workspace_members",
618
+ "tableTo": "users",
619
+ "columnsFrom": [
620
+ "user_id"
621
+ ],
622
+ "columnsTo": [
623
+ "id"
624
+ ],
625
+ "onDelete": "cascade",
626
+ "onUpdate": "no action"
627
+ }
628
+ },
629
+ "compositePrimaryKeys": {
630
+ "workspace_members_workspace_id_user_id_pk": {
631
+ "columns": [
632
+ "workspace_id",
633
+ "user_id"
634
+ ],
635
+ "name": "workspace_members_workspace_id_user_id_pk"
636
+ }
637
+ },
638
+ "uniqueConstraints": {},
639
+ "checkConstraints": {
640
+ "workspace_members_role": {
641
+ "name": "workspace_members_role",
642
+ "value": "role IN ('owner', 'member')"
643
+ }
644
+ }
645
+ },
646
+ "workspaces": {
647
+ "name": "workspaces",
648
+ "columns": {
649
+ "id": {
650
+ "name": "id",
651
+ "type": "text",
652
+ "primaryKey": true,
653
+ "notNull": true,
654
+ "autoincrement": false
655
+ },
656
+ "name": {
657
+ "name": "name",
658
+ "type": "text",
659
+ "primaryKey": false,
660
+ "notNull": true,
661
+ "autoincrement": false
662
+ },
663
+ "slug": {
664
+ "name": "slug",
665
+ "type": "text",
666
+ "primaryKey": false,
667
+ "notNull": true,
668
+ "autoincrement": false
669
+ },
670
+ "description": {
671
+ "name": "description",
672
+ "type": "text",
673
+ "primaryKey": false,
674
+ "notNull": false,
675
+ "autoincrement": false
676
+ },
677
+ "created_at": {
678
+ "name": "created_at",
679
+ "type": "integer",
680
+ "primaryKey": false,
681
+ "notNull": true,
682
+ "autoincrement": false
683
+ },
684
+ "updated_at": {
685
+ "name": "updated_at",
686
+ "type": "integer",
687
+ "primaryKey": false,
688
+ "notNull": true,
689
+ "autoincrement": false
690
+ }
691
+ },
692
+ "indexes": {
693
+ "workspaces_slug_unique": {
694
+ "name": "workspaces_slug_unique",
695
+ "columns": [
696
+ "slug"
697
+ ],
698
+ "isUnique": true
699
+ }
700
+ },
701
+ "foreignKeys": {},
702
+ "compositePrimaryKeys": {},
703
+ "uniqueConstraints": {},
704
+ "checkConstraints": {}
705
+ }
706
+ },
707
+ "views": {},
708
+ "enums": {},
709
+ "_meta": {
710
+ "schemas": {},
711
+ "tables": {},
712
+ "columns": {}
713
+ },
714
+ "internal": {
715
+ "indexes": {}
716
+ }
717
+ }