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