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,972 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "420a82d0-7cc8-4f37-be48-0599c96f865b",
5
+ "prevId": "25f6f621-00e0-4fc2-8cae-87d3260ec0c2",
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
+ "sync_notices": {
104
+ "name": "sync_notices",
105
+ "columns": {
106
+ "id": {
107
+ "name": "id",
108
+ "type": "text",
109
+ "primaryKey": true,
110
+ "notNull": true,
111
+ "autoincrement": false
112
+ },
113
+ "workspace_id": {
114
+ "name": "workspace_id",
115
+ "type": "text",
116
+ "primaryKey": false,
117
+ "notNull": true,
118
+ "autoincrement": false
119
+ },
120
+ "task_id": {
121
+ "name": "task_id",
122
+ "type": "text",
123
+ "primaryKey": false,
124
+ "notNull": false,
125
+ "autoincrement": false
126
+ },
127
+ "task_ref": {
128
+ "name": "task_ref",
129
+ "type": "text",
130
+ "primaryKey": false,
131
+ "notNull": true,
132
+ "autoincrement": false
133
+ },
134
+ "kind": {
135
+ "name": "kind",
136
+ "type": "text",
137
+ "primaryKey": false,
138
+ "notNull": true,
139
+ "autoincrement": false
140
+ },
141
+ "message": {
142
+ "name": "message",
143
+ "type": "text",
144
+ "primaryKey": false,
145
+ "notNull": true,
146
+ "autoincrement": false
147
+ },
148
+ "field": {
149
+ "name": "field",
150
+ "type": "text",
151
+ "primaryKey": false,
152
+ "notNull": false,
153
+ "autoincrement": false
154
+ },
155
+ "overwritten": {
156
+ "name": "overwritten",
157
+ "type": "text",
158
+ "primaryKey": false,
159
+ "notNull": false,
160
+ "autoincrement": false
161
+ },
162
+ "created_at": {
163
+ "name": "created_at",
164
+ "type": "integer",
165
+ "primaryKey": false,
166
+ "notNull": true,
167
+ "autoincrement": false
168
+ },
169
+ "dismissed_at": {
170
+ "name": "dismissed_at",
171
+ "type": "integer",
172
+ "primaryKey": false,
173
+ "notNull": false,
174
+ "autoincrement": false
175
+ }
176
+ },
177
+ "indexes": {
178
+ "sync_notices_workspace": {
179
+ "name": "sync_notices_workspace",
180
+ "columns": [
181
+ "workspace_id"
182
+ ],
183
+ "isUnique": false
184
+ }
185
+ },
186
+ "foreignKeys": {},
187
+ "compositePrimaryKeys": {},
188
+ "uniqueConstraints": {},
189
+ "checkConstraints": {}
190
+ },
191
+ "sync_outbox": {
192
+ "name": "sync_outbox",
193
+ "columns": {
194
+ "seq": {
195
+ "name": "seq",
196
+ "type": "integer",
197
+ "primaryKey": true,
198
+ "notNull": true,
199
+ "autoincrement": true
200
+ },
201
+ "op_id": {
202
+ "name": "op_id",
203
+ "type": "text",
204
+ "primaryKey": false,
205
+ "notNull": true,
206
+ "autoincrement": false
207
+ },
208
+ "workspace_id": {
209
+ "name": "workspace_id",
210
+ "type": "text",
211
+ "primaryKey": false,
212
+ "notNull": true,
213
+ "autoincrement": false
214
+ },
215
+ "type": {
216
+ "name": "type",
217
+ "type": "text",
218
+ "primaryKey": false,
219
+ "notNull": true,
220
+ "autoincrement": false
221
+ },
222
+ "task_id": {
223
+ "name": "task_id",
224
+ "type": "text",
225
+ "primaryKey": false,
226
+ "notNull": true,
227
+ "autoincrement": false
228
+ },
229
+ "payload": {
230
+ "name": "payload",
231
+ "type": "text",
232
+ "primaryKey": false,
233
+ "notNull": true,
234
+ "autoincrement": false
235
+ },
236
+ "base": {
237
+ "name": "base",
238
+ "type": "text",
239
+ "primaryKey": false,
240
+ "notNull": false,
241
+ "autoincrement": false
242
+ },
243
+ "occurred_at": {
244
+ "name": "occurred_at",
245
+ "type": "integer",
246
+ "primaryKey": false,
247
+ "notNull": true,
248
+ "autoincrement": false
249
+ },
250
+ "attempts": {
251
+ "name": "attempts",
252
+ "type": "integer",
253
+ "primaryKey": false,
254
+ "notNull": true,
255
+ "autoincrement": false,
256
+ "default": 0
257
+ },
258
+ "last_error": {
259
+ "name": "last_error",
260
+ "type": "text",
261
+ "primaryKey": false,
262
+ "notNull": false,
263
+ "autoincrement": false
264
+ }
265
+ },
266
+ "indexes": {
267
+ "sync_outbox_op_id_unique": {
268
+ "name": "sync_outbox_op_id_unique",
269
+ "columns": [
270
+ "op_id"
271
+ ],
272
+ "isUnique": true
273
+ },
274
+ "sync_outbox_workspace": {
275
+ "name": "sync_outbox_workspace",
276
+ "columns": [
277
+ "workspace_id",
278
+ "seq"
279
+ ],
280
+ "isUnique": false
281
+ }
282
+ },
283
+ "foreignKeys": {},
284
+ "compositePrimaryKeys": {},
285
+ "uniqueConstraints": {},
286
+ "checkConstraints": {}
287
+ },
288
+ "sync_pending_activity": {
289
+ "name": "sync_pending_activity",
290
+ "columns": {
291
+ "activity_id": {
292
+ "name": "activity_id",
293
+ "type": "text",
294
+ "primaryKey": true,
295
+ "notNull": true,
296
+ "autoincrement": false
297
+ },
298
+ "op_id": {
299
+ "name": "op_id",
300
+ "type": "text",
301
+ "primaryKey": false,
302
+ "notNull": true,
303
+ "autoincrement": false
304
+ }
305
+ },
306
+ "indexes": {},
307
+ "foreignKeys": {},
308
+ "compositePrimaryKeys": {},
309
+ "uniqueConstraints": {},
310
+ "checkConstraints": {}
311
+ },
312
+ "sync_state": {
313
+ "name": "sync_state",
314
+ "columns": {
315
+ "workspace_id": {
316
+ "name": "workspace_id",
317
+ "type": "text",
318
+ "primaryKey": true,
319
+ "notNull": true,
320
+ "autoincrement": false
321
+ },
322
+ "cursor": {
323
+ "name": "cursor",
324
+ "type": "integer",
325
+ "primaryKey": false,
326
+ "notNull": true,
327
+ "autoincrement": false,
328
+ "default": 0
329
+ },
330
+ "last_sync_at": {
331
+ "name": "last_sync_at",
332
+ "type": "integer",
333
+ "primaryKey": false,
334
+ "notNull": false,
335
+ "autoincrement": false
336
+ },
337
+ "last_error": {
338
+ "name": "last_error",
339
+ "type": "text",
340
+ "primaryKey": false,
341
+ "notNull": false,
342
+ "autoincrement": false
343
+ }
344
+ },
345
+ "indexes": {},
346
+ "foreignKeys": {},
347
+ "compositePrimaryKeys": {},
348
+ "uniqueConstraints": {},
349
+ "checkConstraints": {}
350
+ },
351
+ "task_activity": {
352
+ "name": "task_activity",
353
+ "columns": {
354
+ "id": {
355
+ "name": "id",
356
+ "type": "text",
357
+ "primaryKey": true,
358
+ "notNull": true,
359
+ "autoincrement": false
360
+ },
361
+ "task_id": {
362
+ "name": "task_id",
363
+ "type": "text",
364
+ "primaryKey": false,
365
+ "notNull": true,
366
+ "autoincrement": false
367
+ },
368
+ "user_id": {
369
+ "name": "user_id",
370
+ "type": "text",
371
+ "primaryKey": false,
372
+ "notNull": false,
373
+ "autoincrement": false
374
+ },
375
+ "type": {
376
+ "name": "type",
377
+ "type": "text",
378
+ "primaryKey": false,
379
+ "notNull": true,
380
+ "autoincrement": false
381
+ },
382
+ "metadata": {
383
+ "name": "metadata",
384
+ "type": "text",
385
+ "primaryKey": false,
386
+ "notNull": true,
387
+ "autoincrement": false
388
+ },
389
+ "created_at": {
390
+ "name": "created_at",
391
+ "type": "integer",
392
+ "primaryKey": false,
393
+ "notNull": true,
394
+ "autoincrement": false
395
+ }
396
+ },
397
+ "indexes": {
398
+ "task_activity_task": {
399
+ "name": "task_activity_task",
400
+ "columns": [
401
+ "task_id"
402
+ ],
403
+ "isUnique": false
404
+ }
405
+ },
406
+ "foreignKeys": {
407
+ "task_activity_task_id_tasks_id_fk": {
408
+ "name": "task_activity_task_id_tasks_id_fk",
409
+ "tableFrom": "task_activity",
410
+ "tableTo": "tasks",
411
+ "columnsFrom": [
412
+ "task_id"
413
+ ],
414
+ "columnsTo": [
415
+ "id"
416
+ ],
417
+ "onDelete": "cascade",
418
+ "onUpdate": "no action"
419
+ },
420
+ "task_activity_user_id_users_id_fk": {
421
+ "name": "task_activity_user_id_users_id_fk",
422
+ "tableFrom": "task_activity",
423
+ "tableTo": "users",
424
+ "columnsFrom": [
425
+ "user_id"
426
+ ],
427
+ "columnsTo": [
428
+ "id"
429
+ ],
430
+ "onDelete": "set null",
431
+ "onUpdate": "no action"
432
+ }
433
+ },
434
+ "compositePrimaryKeys": {},
435
+ "uniqueConstraints": {},
436
+ "checkConstraints": {
437
+ "task_activity_type": {
438
+ "name": "task_activity_type",
439
+ "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')"
440
+ }
441
+ }
442
+ },
443
+ "task_comments": {
444
+ "name": "task_comments",
445
+ "columns": {
446
+ "id": {
447
+ "name": "id",
448
+ "type": "text",
449
+ "primaryKey": true,
450
+ "notNull": true,
451
+ "autoincrement": false
452
+ },
453
+ "task_id": {
454
+ "name": "task_id",
455
+ "type": "text",
456
+ "primaryKey": false,
457
+ "notNull": true,
458
+ "autoincrement": false
459
+ },
460
+ "user_id": {
461
+ "name": "user_id",
462
+ "type": "text",
463
+ "primaryKey": false,
464
+ "notNull": true,
465
+ "autoincrement": false
466
+ },
467
+ "body": {
468
+ "name": "body",
469
+ "type": "text",
470
+ "primaryKey": false,
471
+ "notNull": true,
472
+ "autoincrement": false
473
+ },
474
+ "created_at": {
475
+ "name": "created_at",
476
+ "type": "integer",
477
+ "primaryKey": false,
478
+ "notNull": true,
479
+ "autoincrement": false
480
+ },
481
+ "updated_at": {
482
+ "name": "updated_at",
483
+ "type": "integer",
484
+ "primaryKey": false,
485
+ "notNull": true,
486
+ "autoincrement": false
487
+ }
488
+ },
489
+ "indexes": {
490
+ "task_comments_task": {
491
+ "name": "task_comments_task",
492
+ "columns": [
493
+ "task_id"
494
+ ],
495
+ "isUnique": false
496
+ }
497
+ },
498
+ "foreignKeys": {
499
+ "task_comments_task_id_tasks_id_fk": {
500
+ "name": "task_comments_task_id_tasks_id_fk",
501
+ "tableFrom": "task_comments",
502
+ "tableTo": "tasks",
503
+ "columnsFrom": [
504
+ "task_id"
505
+ ],
506
+ "columnsTo": [
507
+ "id"
508
+ ],
509
+ "onDelete": "cascade",
510
+ "onUpdate": "no action"
511
+ },
512
+ "task_comments_user_id_users_id_fk": {
513
+ "name": "task_comments_user_id_users_id_fk",
514
+ "tableFrom": "task_comments",
515
+ "tableTo": "users",
516
+ "columnsFrom": [
517
+ "user_id"
518
+ ],
519
+ "columnsTo": [
520
+ "id"
521
+ ],
522
+ "onDelete": "no action",
523
+ "onUpdate": "no action"
524
+ }
525
+ },
526
+ "compositePrimaryKeys": {},
527
+ "uniqueConstraints": {},
528
+ "checkConstraints": {}
529
+ },
530
+ "tasks": {
531
+ "name": "tasks",
532
+ "columns": {
533
+ "id": {
534
+ "name": "id",
535
+ "type": "text",
536
+ "primaryKey": true,
537
+ "notNull": true,
538
+ "autoincrement": false
539
+ },
540
+ "number": {
541
+ "name": "number",
542
+ "type": "integer",
543
+ "primaryKey": false,
544
+ "notNull": true,
545
+ "autoincrement": false
546
+ },
547
+ "workspace_id": {
548
+ "name": "workspace_id",
549
+ "type": "text",
550
+ "primaryKey": false,
551
+ "notNull": true,
552
+ "autoincrement": false
553
+ },
554
+ "project_id": {
555
+ "name": "project_id",
556
+ "type": "text",
557
+ "primaryKey": false,
558
+ "notNull": false,
559
+ "autoincrement": false
560
+ },
561
+ "title": {
562
+ "name": "title",
563
+ "type": "text",
564
+ "primaryKey": false,
565
+ "notNull": true,
566
+ "autoincrement": false
567
+ },
568
+ "description": {
569
+ "name": "description",
570
+ "type": "text",
571
+ "primaryKey": false,
572
+ "notNull": false,
573
+ "autoincrement": false
574
+ },
575
+ "type": {
576
+ "name": "type",
577
+ "type": "text",
578
+ "primaryKey": false,
579
+ "notNull": true,
580
+ "autoincrement": false
581
+ },
582
+ "priority": {
583
+ "name": "priority",
584
+ "type": "text",
585
+ "primaryKey": false,
586
+ "notNull": true,
587
+ "autoincrement": false
588
+ },
589
+ "status": {
590
+ "name": "status",
591
+ "type": "text",
592
+ "primaryKey": false,
593
+ "notNull": true,
594
+ "autoincrement": false
595
+ },
596
+ "assignee_id": {
597
+ "name": "assignee_id",
598
+ "type": "text",
599
+ "primaryKey": false,
600
+ "notNull": false,
601
+ "autoincrement": false
602
+ },
603
+ "creator_id": {
604
+ "name": "creator_id",
605
+ "type": "text",
606
+ "primaryKey": false,
607
+ "notNull": true,
608
+ "autoincrement": false
609
+ },
610
+ "requester": {
611
+ "name": "requester",
612
+ "type": "text",
613
+ "primaryKey": false,
614
+ "notNull": false,
615
+ "autoincrement": false
616
+ },
617
+ "branch": {
618
+ "name": "branch",
619
+ "type": "text",
620
+ "primaryKey": false,
621
+ "notNull": false,
622
+ "autoincrement": false
623
+ },
624
+ "base_branch": {
625
+ "name": "base_branch",
626
+ "type": "text",
627
+ "primaryKey": false,
628
+ "notNull": false,
629
+ "autoincrement": false
630
+ },
631
+ "branch_start": {
632
+ "name": "branch_start",
633
+ "type": "text",
634
+ "primaryKey": false,
635
+ "notNull": false,
636
+ "autoincrement": false
637
+ },
638
+ "created_at": {
639
+ "name": "created_at",
640
+ "type": "integer",
641
+ "primaryKey": false,
642
+ "notNull": true,
643
+ "autoincrement": false
644
+ },
645
+ "updated_at": {
646
+ "name": "updated_at",
647
+ "type": "integer",
648
+ "primaryKey": false,
649
+ "notNull": true,
650
+ "autoincrement": false
651
+ },
652
+ "started_at": {
653
+ "name": "started_at",
654
+ "type": "integer",
655
+ "primaryKey": false,
656
+ "notNull": false,
657
+ "autoincrement": false
658
+ },
659
+ "completed_at": {
660
+ "name": "completed_at",
661
+ "type": "integer",
662
+ "primaryKey": false,
663
+ "notNull": false,
664
+ "autoincrement": false
665
+ }
666
+ },
667
+ "indexes": {
668
+ "tasks_workspace_number": {
669
+ "name": "tasks_workspace_number",
670
+ "columns": [
671
+ "workspace_id",
672
+ "number"
673
+ ],
674
+ "isUnique": true
675
+ },
676
+ "tasks_workspace_status": {
677
+ "name": "tasks_workspace_status",
678
+ "columns": [
679
+ "workspace_id",
680
+ "status"
681
+ ],
682
+ "isUnique": false
683
+ },
684
+ "tasks_assignee": {
685
+ "name": "tasks_assignee",
686
+ "columns": [
687
+ "assignee_id"
688
+ ],
689
+ "isUnique": false
690
+ },
691
+ "tasks_project": {
692
+ "name": "tasks_project",
693
+ "columns": [
694
+ "project_id"
695
+ ],
696
+ "isUnique": false
697
+ }
698
+ },
699
+ "foreignKeys": {
700
+ "tasks_workspace_id_workspaces_id_fk": {
701
+ "name": "tasks_workspace_id_workspaces_id_fk",
702
+ "tableFrom": "tasks",
703
+ "tableTo": "workspaces",
704
+ "columnsFrom": [
705
+ "workspace_id"
706
+ ],
707
+ "columnsTo": [
708
+ "id"
709
+ ],
710
+ "onDelete": "cascade",
711
+ "onUpdate": "no action"
712
+ },
713
+ "tasks_project_id_projects_id_fk": {
714
+ "name": "tasks_project_id_projects_id_fk",
715
+ "tableFrom": "tasks",
716
+ "tableTo": "projects",
717
+ "columnsFrom": [
718
+ "project_id"
719
+ ],
720
+ "columnsTo": [
721
+ "id"
722
+ ],
723
+ "onDelete": "set null",
724
+ "onUpdate": "no action"
725
+ },
726
+ "tasks_assignee_id_users_id_fk": {
727
+ "name": "tasks_assignee_id_users_id_fk",
728
+ "tableFrom": "tasks",
729
+ "tableTo": "users",
730
+ "columnsFrom": [
731
+ "assignee_id"
732
+ ],
733
+ "columnsTo": [
734
+ "id"
735
+ ],
736
+ "onDelete": "set null",
737
+ "onUpdate": "no action"
738
+ },
739
+ "tasks_creator_id_users_id_fk": {
740
+ "name": "tasks_creator_id_users_id_fk",
741
+ "tableFrom": "tasks",
742
+ "tableTo": "users",
743
+ "columnsFrom": [
744
+ "creator_id"
745
+ ],
746
+ "columnsTo": [
747
+ "id"
748
+ ],
749
+ "onDelete": "no action",
750
+ "onUpdate": "no action"
751
+ }
752
+ },
753
+ "compositePrimaryKeys": {},
754
+ "uniqueConstraints": {},
755
+ "checkConstraints": {
756
+ "tasks_type": {
757
+ "name": "tasks_type",
758
+ "value": "type IN ('bug', 'feature', 'improvement', 'maintenance', 'infra', 'refactor', 'research', 'chore')"
759
+ },
760
+ "tasks_priority": {
761
+ "name": "tasks_priority",
762
+ "value": "priority IN ('none', 'low', 'medium', 'high', 'urgent')"
763
+ },
764
+ "tasks_status": {
765
+ "name": "tasks_status",
766
+ "value": "status IN ('backlog', 'todo', 'in_progress', 'review', 'blocked', 'done', 'cancelled')"
767
+ }
768
+ }
769
+ },
770
+ "users": {
771
+ "name": "users",
772
+ "columns": {
773
+ "id": {
774
+ "name": "id",
775
+ "type": "text",
776
+ "primaryKey": true,
777
+ "notNull": true,
778
+ "autoincrement": false
779
+ },
780
+ "username": {
781
+ "name": "username",
782
+ "type": "text",
783
+ "primaryKey": false,
784
+ "notNull": true,
785
+ "autoincrement": false
786
+ },
787
+ "display_name": {
788
+ "name": "display_name",
789
+ "type": "text",
790
+ "primaryKey": false,
791
+ "notNull": true,
792
+ "autoincrement": false
793
+ },
794
+ "email": {
795
+ "name": "email",
796
+ "type": "text",
797
+ "primaryKey": false,
798
+ "notNull": false,
799
+ "autoincrement": false
800
+ },
801
+ "created_at": {
802
+ "name": "created_at",
803
+ "type": "integer",
804
+ "primaryKey": false,
805
+ "notNull": true,
806
+ "autoincrement": false
807
+ },
808
+ "updated_at": {
809
+ "name": "updated_at",
810
+ "type": "integer",
811
+ "primaryKey": false,
812
+ "notNull": true,
813
+ "autoincrement": false
814
+ }
815
+ },
816
+ "indexes": {
817
+ "users_username_unique": {
818
+ "name": "users_username_unique",
819
+ "columns": [
820
+ "username"
821
+ ],
822
+ "isUnique": true
823
+ }
824
+ },
825
+ "foreignKeys": {},
826
+ "compositePrimaryKeys": {},
827
+ "uniqueConstraints": {},
828
+ "checkConstraints": {}
829
+ },
830
+ "workspace_members": {
831
+ "name": "workspace_members",
832
+ "columns": {
833
+ "workspace_id": {
834
+ "name": "workspace_id",
835
+ "type": "text",
836
+ "primaryKey": false,
837
+ "notNull": true,
838
+ "autoincrement": false
839
+ },
840
+ "user_id": {
841
+ "name": "user_id",
842
+ "type": "text",
843
+ "primaryKey": false,
844
+ "notNull": true,
845
+ "autoincrement": false
846
+ },
847
+ "role": {
848
+ "name": "role",
849
+ "type": "text",
850
+ "primaryKey": false,
851
+ "notNull": true,
852
+ "autoincrement": false
853
+ }
854
+ },
855
+ "indexes": {},
856
+ "foreignKeys": {
857
+ "workspace_members_workspace_id_workspaces_id_fk": {
858
+ "name": "workspace_members_workspace_id_workspaces_id_fk",
859
+ "tableFrom": "workspace_members",
860
+ "tableTo": "workspaces",
861
+ "columnsFrom": [
862
+ "workspace_id"
863
+ ],
864
+ "columnsTo": [
865
+ "id"
866
+ ],
867
+ "onDelete": "cascade",
868
+ "onUpdate": "no action"
869
+ },
870
+ "workspace_members_user_id_users_id_fk": {
871
+ "name": "workspace_members_user_id_users_id_fk",
872
+ "tableFrom": "workspace_members",
873
+ "tableTo": "users",
874
+ "columnsFrom": [
875
+ "user_id"
876
+ ],
877
+ "columnsTo": [
878
+ "id"
879
+ ],
880
+ "onDelete": "cascade",
881
+ "onUpdate": "no action"
882
+ }
883
+ },
884
+ "compositePrimaryKeys": {
885
+ "workspace_members_workspace_id_user_id_pk": {
886
+ "columns": [
887
+ "workspace_id",
888
+ "user_id"
889
+ ],
890
+ "name": "workspace_members_workspace_id_user_id_pk"
891
+ }
892
+ },
893
+ "uniqueConstraints": {},
894
+ "checkConstraints": {
895
+ "workspace_members_role": {
896
+ "name": "workspace_members_role",
897
+ "value": "role IN ('owner', 'member')"
898
+ }
899
+ }
900
+ },
901
+ "workspaces": {
902
+ "name": "workspaces",
903
+ "columns": {
904
+ "id": {
905
+ "name": "id",
906
+ "type": "text",
907
+ "primaryKey": true,
908
+ "notNull": true,
909
+ "autoincrement": false
910
+ },
911
+ "name": {
912
+ "name": "name",
913
+ "type": "text",
914
+ "primaryKey": false,
915
+ "notNull": true,
916
+ "autoincrement": false
917
+ },
918
+ "slug": {
919
+ "name": "slug",
920
+ "type": "text",
921
+ "primaryKey": false,
922
+ "notNull": true,
923
+ "autoincrement": false
924
+ },
925
+ "description": {
926
+ "name": "description",
927
+ "type": "text",
928
+ "primaryKey": false,
929
+ "notNull": false,
930
+ "autoincrement": false
931
+ },
932
+ "created_at": {
933
+ "name": "created_at",
934
+ "type": "integer",
935
+ "primaryKey": false,
936
+ "notNull": true,
937
+ "autoincrement": false
938
+ },
939
+ "updated_at": {
940
+ "name": "updated_at",
941
+ "type": "integer",
942
+ "primaryKey": false,
943
+ "notNull": true,
944
+ "autoincrement": false
945
+ }
946
+ },
947
+ "indexes": {
948
+ "workspaces_slug_unique": {
949
+ "name": "workspaces_slug_unique",
950
+ "columns": [
951
+ "slug"
952
+ ],
953
+ "isUnique": true
954
+ }
955
+ },
956
+ "foreignKeys": {},
957
+ "compositePrimaryKeys": {},
958
+ "uniqueConstraints": {},
959
+ "checkConstraints": {}
960
+ }
961
+ },
962
+ "views": {},
963
+ "enums": {},
964
+ "_meta": {
965
+ "schemas": {},
966
+ "tables": {},
967
+ "columns": {}
968
+ },
969
+ "internal": {
970
+ "indexes": {}
971
+ }
972
+ }