hatchlight 0.0.0-stage → 0.4.1

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 (124) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +34 -2
  3. package/bin/hatchlight.js +434 -0
  4. package/package.json +32 -5
  5. package/resources/drizzle/0000_init.sql +57 -0
  6. package/resources/drizzle/0001_job_error_codes.sql +2 -0
  7. package/resources/drizzle/0002_assistant_messages.sql +10 -0
  8. package/resources/drizzle/0003_accounts.sql +56 -0
  9. package/resources/drizzle/0004_spending.sql +14 -0
  10. package/resources/drizzle/0005_account_hardening.sql +12 -0
  11. package/resources/drizzle/0006_lora_uploads.sql +8 -0
  12. package/resources/drizzle/0007_reset_notices.sql +1 -0
  13. package/resources/drizzle/0008_spending_key_source.sql +1 -0
  14. package/resources/drizzle/0009_asset_usage.sql +8 -0
  15. package/resources/drizzle/0010_agent_tokens.sql +8 -0
  16. package/resources/drizzle/0011_pending_spending.sql +1 -0
  17. package/resources/drizzle/meta/0000_snapshot.json +374 -0
  18. package/resources/drizzle/meta/0001_snapshot.json +388 -0
  19. package/resources/drizzle/meta/0002_snapshot.json +449 -0
  20. package/resources/drizzle/meta/0003_snapshot.json +814 -0
  21. package/resources/drizzle/meta/0004_snapshot.json +872 -0
  22. package/resources/drizzle/meta/0005_snapshot.json +950 -0
  23. package/resources/drizzle/meta/0006_snapshot.json +994 -0
  24. package/resources/drizzle/meta/0007_snapshot.json +1001 -0
  25. package/resources/drizzle/meta/0008_snapshot.json +1009 -0
  26. package/resources/drizzle/meta/0009_snapshot.json +1033 -0
  27. package/resources/drizzle/meta/0010_snapshot.json +1064 -0
  28. package/resources/drizzle/meta/0011_snapshot.json +1072 -0
  29. package/resources/drizzle/meta/_journal.json +90 -0
  30. package/resources/web/assets/Assistant-Dcr31LAV.js +44 -0
  31. package/resources/web/assets/Gallery-CMRGE3qD.js +11 -0
  32. package/resources/web/assets/Models-D468Wmoj.js +1 -0
  33. package/resources/web/assets/Settings-DSXHt9Y3.js +2 -0
  34. package/resources/web/assets/bricolage-grotesque-latin-500-normal-CV-uA8Lw.woff +0 -0
  35. package/resources/web/assets/bricolage-grotesque-latin-500-normal-DEDBoLFO.woff2 +0 -0
  36. package/resources/web/assets/bricolage-grotesque-latin-700-normal-DvJDmrLu.woff +0 -0
  37. package/resources/web/assets/bricolage-grotesque-latin-700-normal-gtcctNPv.woff2 +0 -0
  38. package/resources/web/assets/bricolage-grotesque-latin-800-normal-Br4b-5gk.woff +0 -0
  39. package/resources/web/assets/bricolage-grotesque-latin-800-normal-J50vIsBe.woff2 +0 -0
  40. package/resources/web/assets/bricolage-grotesque-latin-ext-500-normal-B0ZDNVGf.woff +0 -0
  41. package/resources/web/assets/bricolage-grotesque-latin-ext-500-normal-DIhLz7G7.woff2 +0 -0
  42. package/resources/web/assets/bricolage-grotesque-latin-ext-700-normal-BXpPFNFj.woff +0 -0
  43. package/resources/web/assets/bricolage-grotesque-latin-ext-700-normal-fBkt-7fi.woff2 +0 -0
  44. package/resources/web/assets/bricolage-grotesque-latin-ext-800-normal-BimIDUhy.woff2 +0 -0
  45. package/resources/web/assets/bricolage-grotesque-latin-ext-800-normal-CkoBqIJM.woff +0 -0
  46. package/resources/web/assets/bricolage-grotesque-vietnamese-500-normal-CAK5R6Iy.woff +0 -0
  47. package/resources/web/assets/bricolage-grotesque-vietnamese-500-normal-FzY9NZwK.woff2 +0 -0
  48. package/resources/web/assets/bricolage-grotesque-vietnamese-700-normal-BLYPkJbo.woff2 +0 -0
  49. package/resources/web/assets/bricolage-grotesque-vietnamese-700-normal-CHrFuVHU.woff +0 -0
  50. package/resources/web/assets/bricolage-grotesque-vietnamese-800-normal-DJ4hCX8l.woff +0 -0
  51. package/resources/web/assets/bricolage-grotesque-vietnamese-800-normal-RJtJa6zl.woff2 +0 -0
  52. package/resources/web/assets/ibm-plex-mono-cyrillic-400-normal-CJUKFyLa.woff +0 -0
  53. package/resources/web/assets/ibm-plex-mono-cyrillic-400-normal-DvQQgHTq.woff2 +0 -0
  54. package/resources/web/assets/ibm-plex-mono-cyrillic-500-normal-BtGHVI3Q.woff2 +0 -0
  55. package/resources/web/assets/ibm-plex-mono-cyrillic-500-normal-N1TV9ACq.woff +0 -0
  56. package/resources/web/assets/ibm-plex-mono-cyrillic-ext-400-normal-B3hZxag_.woff2 +0 -0
  57. package/resources/web/assets/ibm-plex-mono-cyrillic-ext-400-normal-ZyMXPjaT.woff +0 -0
  58. package/resources/web/assets/ibm-plex-mono-cyrillic-ext-500-normal-CmcxpzmF.woff2 +0 -0
  59. package/resources/web/assets/ibm-plex-mono-cyrillic-ext-500-normal-yqk7_qG0.woff +0 -0
  60. package/resources/web/assets/ibm-plex-mono-latin-400-normal-Dm_PoFIZ.woff2 +0 -0
  61. package/resources/web/assets/ibm-plex-mono-latin-400-normal-O6-GRVqx.woff +0 -0
  62. package/resources/web/assets/ibm-plex-mono-latin-500-normal-C_OblDzq.woff2 +0 -0
  63. package/resources/web/assets/ibm-plex-mono-latin-500-normal-zoSM89R3.woff +0 -0
  64. package/resources/web/assets/ibm-plex-mono-latin-ext-400-normal-DxDDqVQb.woff2 +0 -0
  65. package/resources/web/assets/ibm-plex-mono-latin-ext-400-normal-uwM7KshN.woff +0 -0
  66. package/resources/web/assets/ibm-plex-mono-latin-ext-500-normal-BhDX_RLI.woff +0 -0
  67. package/resources/web/assets/ibm-plex-mono-latin-ext-500-normal-Dn-cqWhb.woff2 +0 -0
  68. package/resources/web/assets/ibm-plex-mono-vietnamese-400-normal-BFiUPp6R.woff2 +0 -0
  69. package/resources/web/assets/ibm-plex-mono-vietnamese-400-normal-DLynVohM.woff +0 -0
  70. package/resources/web/assets/ibm-plex-mono-vietnamese-500-normal-CevHOlzG.woff2 +0 -0
  71. package/resources/web/assets/ibm-plex-mono-vietnamese-500-normal-QhwQXayn.woff +0 -0
  72. package/resources/web/assets/index-DrgBjkJQ.js +322 -0
  73. package/resources/web/assets/index-gLwjTNlu.css +1 -0
  74. package/resources/web/assets/index-ydGCWKys.js +1 -0
  75. package/resources/web/assets/inter-tight-cyrillic-400-normal-Cu6X1knp.woff +0 -0
  76. package/resources/web/assets/inter-tight-cyrillic-400-normal-DLglYK2S.woff2 +0 -0
  77. package/resources/web/assets/inter-tight-cyrillic-500-normal-BS_Q301l.woff +0 -0
  78. package/resources/web/assets/inter-tight-cyrillic-500-normal-GsQC2I9I.woff2 +0 -0
  79. package/resources/web/assets/inter-tight-cyrillic-600-normal-CA1nZd4A.woff +0 -0
  80. package/resources/web/assets/inter-tight-cyrillic-600-normal-zvV8lvuq.woff2 +0 -0
  81. package/resources/web/assets/inter-tight-cyrillic-ext-400-normal-CPa21WFm.woff +0 -0
  82. package/resources/web/assets/inter-tight-cyrillic-ext-400-normal-wRoSiYJX.woff2 +0 -0
  83. package/resources/web/assets/inter-tight-cyrillic-ext-500-normal-DDZdcw0e.woff2 +0 -0
  84. package/resources/web/assets/inter-tight-cyrillic-ext-500-normal-SbyCo7Dv.woff +0 -0
  85. package/resources/web/assets/inter-tight-cyrillic-ext-600-normal-BwQoccyI.woff2 +0 -0
  86. package/resources/web/assets/inter-tight-cyrillic-ext-600-normal-D1EOoMTg.woff +0 -0
  87. package/resources/web/assets/inter-tight-greek-400-normal-8GU0b4sT.woff2 +0 -0
  88. package/resources/web/assets/inter-tight-greek-400-normal-BeMKI6ne.woff +0 -0
  89. package/resources/web/assets/inter-tight-greek-500-normal-BGOdJ4jK.woff +0 -0
  90. package/resources/web/assets/inter-tight-greek-500-normal-DfwCMcvd.woff2 +0 -0
  91. package/resources/web/assets/inter-tight-greek-600-normal-BIWCW30H.woff2 +0 -0
  92. package/resources/web/assets/inter-tight-greek-600-normal-CMARuIv4.woff +0 -0
  93. package/resources/web/assets/inter-tight-greek-ext-400-normal-B035aUhC.woff2 +0 -0
  94. package/resources/web/assets/inter-tight-greek-ext-400-normal-tWLvaB1R.woff +0 -0
  95. package/resources/web/assets/inter-tight-greek-ext-500-normal-BtZsBjxU.woff +0 -0
  96. package/resources/web/assets/inter-tight-greek-ext-500-normal-DitH-qUF.woff2 +0 -0
  97. package/resources/web/assets/inter-tight-greek-ext-600-normal-4wRrF3Lp.woff2 +0 -0
  98. package/resources/web/assets/inter-tight-greek-ext-600-normal-DTLxDvi0.woff +0 -0
  99. package/resources/web/assets/inter-tight-latin-400-normal-BW_APOAv.woff +0 -0
  100. package/resources/web/assets/inter-tight-latin-400-normal-CjmW70MP.woff2 +0 -0
  101. package/resources/web/assets/inter-tight-latin-500-normal-DHfo6WYp.woff2 +0 -0
  102. package/resources/web/assets/inter-tight-latin-500-normal-DSK3iurg.woff +0 -0
  103. package/resources/web/assets/inter-tight-latin-600-normal-BhR4EMHT.woff2 +0 -0
  104. package/resources/web/assets/inter-tight-latin-600-normal-RFJ2ueZL.woff +0 -0
  105. package/resources/web/assets/inter-tight-latin-ext-400-normal-BdDiaPns.woff +0 -0
  106. package/resources/web/assets/inter-tight-latin-ext-400-normal-Gi8wMfrP.woff2 +0 -0
  107. package/resources/web/assets/inter-tight-latin-ext-500-normal-BdRfio7v.woff +0 -0
  108. package/resources/web/assets/inter-tight-latin-ext-500-normal-CSMKT5kA.woff2 +0 -0
  109. package/resources/web/assets/inter-tight-latin-ext-600-normal-BiZjrIRq.woff +0 -0
  110. package/resources/web/assets/inter-tight-latin-ext-600-normal-Yxv5k3jL.woff2 +0 -0
  111. package/resources/web/assets/inter-tight-vietnamese-400-normal-CWFku8rW.woff2 +0 -0
  112. package/resources/web/assets/inter-tight-vietnamese-400-normal-s0S0Ysqp.woff +0 -0
  113. package/resources/web/assets/inter-tight-vietnamese-500-normal-B9o3jXvc.woff2 +0 -0
  114. package/resources/web/assets/inter-tight-vietnamese-500-normal-D9AKxpnU.woff +0 -0
  115. package/resources/web/assets/inter-tight-vietnamese-600-normal-B6ESNxpD.woff +0 -0
  116. package/resources/web/assets/inter-tight-vietnamese-600-normal-BZpsSm6S.woff2 +0 -0
  117. package/resources/web/assets/splash-CLEpm4fL.js +1 -0
  118. package/resources/web/favicon.svg +15 -0
  119. package/resources/web/index.html +17 -0
  120. package/resources/web/samples/flux-schnell.webp +0 -0
  121. package/resources/web/samples/sdxl-turbo.webp +0 -0
  122. package/resources/web/samples/sdxl.webp +0 -0
  123. package/resources/web/samples/z-image-turbo.webp +0 -0
  124. package/resources/web/splash.html +26 -0
@@ -0,0 +1,872 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "64e4031f-d45e-4626-9b5c-914687688062",
5
+ "prevId": "099ad40f-40fd-427d-a3da-80f7be566dee",
6
+ "tables": {
7
+ "api_tokens": {
8
+ "name": "api_tokens",
9
+ "columns": {
10
+ "id": {
11
+ "name": "id",
12
+ "type": "text",
13
+ "primaryKey": true,
14
+ "notNull": true,
15
+ "autoincrement": false
16
+ },
17
+ "user_id": {
18
+ "name": "user_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
+ "scopes": {
32
+ "name": "scopes",
33
+ "type": "text",
34
+ "primaryKey": false,
35
+ "notNull": true,
36
+ "autoincrement": false
37
+ },
38
+ "spend_limit_usd": {
39
+ "name": "spend_limit_usd",
40
+ "type": "real",
41
+ "primaryKey": false,
42
+ "notNull": false,
43
+ "autoincrement": false
44
+ },
45
+ "created_at": {
46
+ "name": "created_at",
47
+ "type": "integer",
48
+ "primaryKey": false,
49
+ "notNull": true,
50
+ "autoincrement": false
51
+ },
52
+ "last_used_at": {
53
+ "name": "last_used_at",
54
+ "type": "integer",
55
+ "primaryKey": false,
56
+ "notNull": false,
57
+ "autoincrement": false
58
+ },
59
+ "expires_at": {
60
+ "name": "expires_at",
61
+ "type": "integer",
62
+ "primaryKey": false,
63
+ "notNull": false,
64
+ "autoincrement": false
65
+ }
66
+ },
67
+ "indexes": {
68
+ "api_tokens_user": {
69
+ "name": "api_tokens_user",
70
+ "columns": ["user_id"],
71
+ "isUnique": false
72
+ }
73
+ },
74
+ "foreignKeys": {
75
+ "api_tokens_user_id_users_id_fk": {
76
+ "name": "api_tokens_user_id_users_id_fk",
77
+ "tableFrom": "api_tokens",
78
+ "tableTo": "users",
79
+ "columnsFrom": ["user_id"],
80
+ "columnsTo": ["id"],
81
+ "onDelete": "cascade",
82
+ "onUpdate": "no action"
83
+ }
84
+ },
85
+ "compositePrimaryKeys": {},
86
+ "uniqueConstraints": {},
87
+ "checkConstraints": {}
88
+ },
89
+ "assets": {
90
+ "name": "assets",
91
+ "columns": {
92
+ "id": {
93
+ "name": "id",
94
+ "type": "text",
95
+ "primaryKey": true,
96
+ "notNull": true,
97
+ "autoincrement": false
98
+ },
99
+ "user_id": {
100
+ "name": "user_id",
101
+ "type": "text",
102
+ "primaryKey": false,
103
+ "notNull": true,
104
+ "autoincrement": false
105
+ },
106
+ "job_id": {
107
+ "name": "job_id",
108
+ "type": "text",
109
+ "primaryKey": false,
110
+ "notNull": false,
111
+ "autoincrement": false
112
+ },
113
+ "kind": {
114
+ "name": "kind",
115
+ "type": "text",
116
+ "primaryKey": false,
117
+ "notNull": true,
118
+ "autoincrement": false
119
+ },
120
+ "hash": {
121
+ "name": "hash",
122
+ "type": "text",
123
+ "primaryKey": false,
124
+ "notNull": true,
125
+ "autoincrement": false
126
+ },
127
+ "mime": {
128
+ "name": "mime",
129
+ "type": "text",
130
+ "primaryKey": false,
131
+ "notNull": true,
132
+ "autoincrement": false
133
+ },
134
+ "size": {
135
+ "name": "size",
136
+ "type": "integer",
137
+ "primaryKey": false,
138
+ "notNull": true,
139
+ "autoincrement": false
140
+ },
141
+ "prompt": {
142
+ "name": "prompt",
143
+ "type": "text",
144
+ "primaryKey": false,
145
+ "notNull": false,
146
+ "autoincrement": false
147
+ },
148
+ "model_id": {
149
+ "name": "model_id",
150
+ "type": "text",
151
+ "primaryKey": false,
152
+ "notNull": false,
153
+ "autoincrement": false
154
+ },
155
+ "params": {
156
+ "name": "params",
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
+ },
170
+ "indexes": {
171
+ "assets_user_kind_created": {
172
+ "name": "assets_user_kind_created",
173
+ "columns": ["user_id", "kind", "created_at"],
174
+ "isUnique": false
175
+ },
176
+ "assets_job": {
177
+ "name": "assets_job",
178
+ "columns": ["job_id"],
179
+ "isUnique": false
180
+ }
181
+ },
182
+ "foreignKeys": {
183
+ "assets_job_id_jobs_id_fk": {
184
+ "name": "assets_job_id_jobs_id_fk",
185
+ "tableFrom": "assets",
186
+ "tableTo": "jobs",
187
+ "columnsFrom": ["job_id"],
188
+ "columnsTo": ["id"],
189
+ "onDelete": "set null",
190
+ "onUpdate": "no action"
191
+ }
192
+ },
193
+ "compositePrimaryKeys": {},
194
+ "uniqueConstraints": {},
195
+ "checkConstraints": {}
196
+ },
197
+ "auth_sessions": {
198
+ "name": "auth_sessions",
199
+ "columns": {
200
+ "id": {
201
+ "name": "id",
202
+ "type": "text",
203
+ "primaryKey": true,
204
+ "notNull": true,
205
+ "autoincrement": false
206
+ },
207
+ "user_id": {
208
+ "name": "user_id",
209
+ "type": "text",
210
+ "primaryKey": false,
211
+ "notNull": true,
212
+ "autoincrement": false
213
+ },
214
+ "created_at": {
215
+ "name": "created_at",
216
+ "type": "integer",
217
+ "primaryKey": false,
218
+ "notNull": true,
219
+ "autoincrement": false
220
+ },
221
+ "last_seen_at": {
222
+ "name": "last_seen_at",
223
+ "type": "integer",
224
+ "primaryKey": false,
225
+ "notNull": true,
226
+ "autoincrement": false
227
+ },
228
+ "expires_at": {
229
+ "name": "expires_at",
230
+ "type": "integer",
231
+ "primaryKey": false,
232
+ "notNull": true,
233
+ "autoincrement": false
234
+ },
235
+ "user_agent": {
236
+ "name": "user_agent",
237
+ "type": "text",
238
+ "primaryKey": false,
239
+ "notNull": false,
240
+ "autoincrement": false
241
+ },
242
+ "ip": {
243
+ "name": "ip",
244
+ "type": "text",
245
+ "primaryKey": false,
246
+ "notNull": false,
247
+ "autoincrement": false
248
+ }
249
+ },
250
+ "indexes": {
251
+ "auth_sessions_user": {
252
+ "name": "auth_sessions_user",
253
+ "columns": ["user_id"],
254
+ "isUnique": false
255
+ }
256
+ },
257
+ "foreignKeys": {
258
+ "auth_sessions_user_id_users_id_fk": {
259
+ "name": "auth_sessions_user_id_users_id_fk",
260
+ "tableFrom": "auth_sessions",
261
+ "tableTo": "users",
262
+ "columnsFrom": ["user_id"],
263
+ "columnsTo": ["id"],
264
+ "onDelete": "cascade",
265
+ "onUpdate": "no action"
266
+ }
267
+ },
268
+ "compositePrimaryKeys": {},
269
+ "uniqueConstraints": {},
270
+ "checkConstraints": {}
271
+ },
272
+ "invites": {
273
+ "name": "invites",
274
+ "columns": {
275
+ "id": {
276
+ "name": "id",
277
+ "type": "text",
278
+ "primaryKey": true,
279
+ "notNull": true,
280
+ "autoincrement": false
281
+ },
282
+ "role": {
283
+ "name": "role",
284
+ "type": "text",
285
+ "primaryKey": false,
286
+ "notNull": true,
287
+ "autoincrement": false
288
+ },
289
+ "can_use_paid": {
290
+ "name": "can_use_paid",
291
+ "type": "integer",
292
+ "primaryKey": false,
293
+ "notNull": true,
294
+ "autoincrement": false
295
+ },
296
+ "can_train": {
297
+ "name": "can_train",
298
+ "type": "integer",
299
+ "primaryKey": false,
300
+ "notNull": true,
301
+ "autoincrement": false
302
+ },
303
+ "monthly_limit_usd": {
304
+ "name": "monthly_limit_usd",
305
+ "type": "real",
306
+ "primaryKey": false,
307
+ "notNull": false,
308
+ "autoincrement": false
309
+ },
310
+ "expires_at": {
311
+ "name": "expires_at",
312
+ "type": "integer",
313
+ "primaryKey": false,
314
+ "notNull": true,
315
+ "autoincrement": false
316
+ },
317
+ "created_by": {
318
+ "name": "created_by",
319
+ "type": "text",
320
+ "primaryKey": false,
321
+ "notNull": true,
322
+ "autoincrement": false
323
+ },
324
+ "created_at": {
325
+ "name": "created_at",
326
+ "type": "integer",
327
+ "primaryKey": false,
328
+ "notNull": true,
329
+ "autoincrement": false
330
+ },
331
+ "used_by": {
332
+ "name": "used_by",
333
+ "type": "text",
334
+ "primaryKey": false,
335
+ "notNull": false,
336
+ "autoincrement": false
337
+ },
338
+ "used_at": {
339
+ "name": "used_at",
340
+ "type": "integer",
341
+ "primaryKey": false,
342
+ "notNull": false,
343
+ "autoincrement": false
344
+ }
345
+ },
346
+ "indexes": {},
347
+ "foreignKeys": {
348
+ "invites_created_by_users_id_fk": {
349
+ "name": "invites_created_by_users_id_fk",
350
+ "tableFrom": "invites",
351
+ "tableTo": "users",
352
+ "columnsFrom": ["created_by"],
353
+ "columnsTo": ["id"],
354
+ "onDelete": "cascade",
355
+ "onUpdate": "no action"
356
+ },
357
+ "invites_used_by_users_id_fk": {
358
+ "name": "invites_used_by_users_id_fk",
359
+ "tableFrom": "invites",
360
+ "tableTo": "users",
361
+ "columnsFrom": ["used_by"],
362
+ "columnsTo": ["id"],
363
+ "onDelete": "set null",
364
+ "onUpdate": "no action"
365
+ }
366
+ },
367
+ "compositePrimaryKeys": {},
368
+ "uniqueConstraints": {},
369
+ "checkConstraints": {}
370
+ },
371
+ "jobs": {
372
+ "name": "jobs",
373
+ "columns": {
374
+ "id": {
375
+ "name": "id",
376
+ "type": "text",
377
+ "primaryKey": true,
378
+ "notNull": true,
379
+ "autoincrement": false
380
+ },
381
+ "turn_id": {
382
+ "name": "turn_id",
383
+ "type": "text",
384
+ "primaryKey": false,
385
+ "notNull": true,
386
+ "autoincrement": false
387
+ },
388
+ "position": {
389
+ "name": "position",
390
+ "type": "integer",
391
+ "primaryKey": false,
392
+ "notNull": true,
393
+ "autoincrement": false
394
+ },
395
+ "user_id": {
396
+ "name": "user_id",
397
+ "type": "text",
398
+ "primaryKey": false,
399
+ "notNull": true,
400
+ "autoincrement": false
401
+ },
402
+ "provider_id": {
403
+ "name": "provider_id",
404
+ "type": "text",
405
+ "primaryKey": false,
406
+ "notNull": true,
407
+ "autoincrement": false
408
+ },
409
+ "model_id": {
410
+ "name": "model_id",
411
+ "type": "text",
412
+ "primaryKey": false,
413
+ "notNull": true,
414
+ "autoincrement": false
415
+ },
416
+ "params": {
417
+ "name": "params",
418
+ "type": "text",
419
+ "primaryKey": false,
420
+ "notNull": true,
421
+ "autoincrement": false
422
+ },
423
+ "status": {
424
+ "name": "status",
425
+ "type": "text",
426
+ "primaryKey": false,
427
+ "notNull": true,
428
+ "autoincrement": false
429
+ },
430
+ "handle": {
431
+ "name": "handle",
432
+ "type": "text",
433
+ "primaryKey": false,
434
+ "notNull": false,
435
+ "autoincrement": false
436
+ },
437
+ "error": {
438
+ "name": "error",
439
+ "type": "text",
440
+ "primaryKey": false,
441
+ "notNull": false,
442
+ "autoincrement": false
443
+ },
444
+ "error_code": {
445
+ "name": "error_code",
446
+ "type": "text",
447
+ "primaryKey": false,
448
+ "notNull": false,
449
+ "autoincrement": false
450
+ },
451
+ "error_params": {
452
+ "name": "error_params",
453
+ "type": "text",
454
+ "primaryKey": false,
455
+ "notNull": false,
456
+ "autoincrement": false
457
+ },
458
+ "cost_usd": {
459
+ "name": "cost_usd",
460
+ "type": "real",
461
+ "primaryKey": false,
462
+ "notNull": false,
463
+ "autoincrement": false
464
+ },
465
+ "created_at": {
466
+ "name": "created_at",
467
+ "type": "integer",
468
+ "primaryKey": false,
469
+ "notNull": true,
470
+ "autoincrement": false
471
+ },
472
+ "started_at": {
473
+ "name": "started_at",
474
+ "type": "integer",
475
+ "primaryKey": false,
476
+ "notNull": false,
477
+ "autoincrement": false
478
+ },
479
+ "finished_at": {
480
+ "name": "finished_at",
481
+ "type": "integer",
482
+ "primaryKey": false,
483
+ "notNull": false,
484
+ "autoincrement": false
485
+ }
486
+ },
487
+ "indexes": {
488
+ "jobs_turn": {
489
+ "name": "jobs_turn",
490
+ "columns": ["turn_id"],
491
+ "isUnique": false
492
+ },
493
+ "jobs_status": {
494
+ "name": "jobs_status",
495
+ "columns": ["status"],
496
+ "isUnique": false
497
+ }
498
+ },
499
+ "foreignKeys": {
500
+ "jobs_turn_id_turns_id_fk": {
501
+ "name": "jobs_turn_id_turns_id_fk",
502
+ "tableFrom": "jobs",
503
+ "tableTo": "turns",
504
+ "columnsFrom": ["turn_id"],
505
+ "columnsTo": ["id"],
506
+ "onDelete": "cascade",
507
+ "onUpdate": "no action"
508
+ }
509
+ },
510
+ "compositePrimaryKeys": {},
511
+ "uniqueConstraints": {},
512
+ "checkConstraints": {}
513
+ },
514
+ "messages": {
515
+ "name": "messages",
516
+ "columns": {
517
+ "id": {
518
+ "name": "id",
519
+ "type": "text",
520
+ "primaryKey": true,
521
+ "notNull": true,
522
+ "autoincrement": false
523
+ },
524
+ "session_id": {
525
+ "name": "session_id",
526
+ "type": "text",
527
+ "primaryKey": false,
528
+ "notNull": true,
529
+ "autoincrement": false
530
+ },
531
+ "user_id": {
532
+ "name": "user_id",
533
+ "type": "text",
534
+ "primaryKey": false,
535
+ "notNull": true,
536
+ "autoincrement": false
537
+ },
538
+ "body": {
539
+ "name": "body",
540
+ "type": "text",
541
+ "primaryKey": false,
542
+ "notNull": true,
543
+ "autoincrement": false
544
+ },
545
+ "created_at": {
546
+ "name": "created_at",
547
+ "type": "integer",
548
+ "primaryKey": false,
549
+ "notNull": true,
550
+ "autoincrement": false
551
+ }
552
+ },
553
+ "indexes": {
554
+ "messages_session_created": {
555
+ "name": "messages_session_created",
556
+ "columns": ["session_id", "created_at"],
557
+ "isUnique": false
558
+ }
559
+ },
560
+ "foreignKeys": {
561
+ "messages_session_id_sessions_id_fk": {
562
+ "name": "messages_session_id_sessions_id_fk",
563
+ "tableFrom": "messages",
564
+ "tableTo": "sessions",
565
+ "columnsFrom": ["session_id"],
566
+ "columnsTo": ["id"],
567
+ "onDelete": "cascade",
568
+ "onUpdate": "no action"
569
+ }
570
+ },
571
+ "compositePrimaryKeys": {},
572
+ "uniqueConstraints": {},
573
+ "checkConstraints": {}
574
+ },
575
+ "sessions": {
576
+ "name": "sessions",
577
+ "columns": {
578
+ "id": {
579
+ "name": "id",
580
+ "type": "text",
581
+ "primaryKey": true,
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
+ "title": {
593
+ "name": "title",
594
+ "type": "text",
595
+ "primaryKey": false,
596
+ "notNull": true,
597
+ "autoincrement": false
598
+ },
599
+ "created_at": {
600
+ "name": "created_at",
601
+ "type": "integer",
602
+ "primaryKey": false,
603
+ "notNull": true,
604
+ "autoincrement": false
605
+ },
606
+ "updated_at": {
607
+ "name": "updated_at",
608
+ "type": "integer",
609
+ "primaryKey": false,
610
+ "notNull": true,
611
+ "autoincrement": false
612
+ }
613
+ },
614
+ "indexes": {
615
+ "sessions_user_updated": {
616
+ "name": "sessions_user_updated",
617
+ "columns": ["user_id", "updated_at"],
618
+ "isUnique": false
619
+ }
620
+ },
621
+ "foreignKeys": {},
622
+ "compositePrimaryKeys": {},
623
+ "uniqueConstraints": {},
624
+ "checkConstraints": {}
625
+ },
626
+ "spending": {
627
+ "name": "spending",
628
+ "columns": {
629
+ "id": {
630
+ "name": "id",
631
+ "type": "text",
632
+ "primaryKey": true,
633
+ "notNull": true,
634
+ "autoincrement": false
635
+ },
636
+ "user_id": {
637
+ "name": "user_id",
638
+ "type": "text",
639
+ "primaryKey": false,
640
+ "notNull": true,
641
+ "autoincrement": false
642
+ },
643
+ "kind": {
644
+ "name": "kind",
645
+ "type": "text",
646
+ "primaryKey": false,
647
+ "notNull": true,
648
+ "autoincrement": false
649
+ },
650
+ "job_id": {
651
+ "name": "job_id",
652
+ "type": "text",
653
+ "primaryKey": false,
654
+ "notNull": false,
655
+ "autoincrement": false
656
+ },
657
+ "cost_usd": {
658
+ "name": "cost_usd",
659
+ "type": "real",
660
+ "primaryKey": false,
661
+ "notNull": true,
662
+ "autoincrement": false
663
+ },
664
+ "created_at": {
665
+ "name": "created_at",
666
+ "type": "integer",
667
+ "primaryKey": false,
668
+ "notNull": true,
669
+ "autoincrement": false
670
+ }
671
+ },
672
+ "indexes": {
673
+ "spending_user_created": {
674
+ "name": "spending_user_created",
675
+ "columns": ["user_id", "created_at"],
676
+ "isUnique": false
677
+ }
678
+ },
679
+ "foreignKeys": {},
680
+ "compositePrimaryKeys": {},
681
+ "uniqueConstraints": {},
682
+ "checkConstraints": {}
683
+ },
684
+ "turns": {
685
+ "name": "turns",
686
+ "columns": {
687
+ "id": {
688
+ "name": "id",
689
+ "type": "text",
690
+ "primaryKey": true,
691
+ "notNull": true,
692
+ "autoincrement": false
693
+ },
694
+ "session_id": {
695
+ "name": "session_id",
696
+ "type": "text",
697
+ "primaryKey": false,
698
+ "notNull": true,
699
+ "autoincrement": false
700
+ },
701
+ "user_id": {
702
+ "name": "user_id",
703
+ "type": "text",
704
+ "primaryKey": false,
705
+ "notNull": true,
706
+ "autoincrement": false
707
+ },
708
+ "prompt": {
709
+ "name": "prompt",
710
+ "type": "text",
711
+ "primaryKey": false,
712
+ "notNull": true,
713
+ "autoincrement": false
714
+ },
715
+ "reference_asset_ids": {
716
+ "name": "reference_asset_ids",
717
+ "type": "text",
718
+ "primaryKey": false,
719
+ "notNull": true,
720
+ "autoincrement": false
721
+ },
722
+ "created_at": {
723
+ "name": "created_at",
724
+ "type": "integer",
725
+ "primaryKey": false,
726
+ "notNull": true,
727
+ "autoincrement": false
728
+ }
729
+ },
730
+ "indexes": {
731
+ "turns_session_created": {
732
+ "name": "turns_session_created",
733
+ "columns": ["session_id", "created_at"],
734
+ "isUnique": false
735
+ }
736
+ },
737
+ "foreignKeys": {
738
+ "turns_session_id_sessions_id_fk": {
739
+ "name": "turns_session_id_sessions_id_fk",
740
+ "tableFrom": "turns",
741
+ "tableTo": "sessions",
742
+ "columnsFrom": ["session_id"],
743
+ "columnsTo": ["id"],
744
+ "onDelete": "cascade",
745
+ "onUpdate": "no action"
746
+ }
747
+ },
748
+ "compositePrimaryKeys": {},
749
+ "uniqueConstraints": {},
750
+ "checkConstraints": {}
751
+ },
752
+ "users": {
753
+ "name": "users",
754
+ "columns": {
755
+ "id": {
756
+ "name": "id",
757
+ "type": "text",
758
+ "primaryKey": true,
759
+ "notNull": true,
760
+ "autoincrement": false
761
+ },
762
+ "username": {
763
+ "name": "username",
764
+ "type": "text",
765
+ "primaryKey": false,
766
+ "notNull": true,
767
+ "autoincrement": false
768
+ },
769
+ "display_name": {
770
+ "name": "display_name",
771
+ "type": "text",
772
+ "primaryKey": false,
773
+ "notNull": true,
774
+ "autoincrement": false
775
+ },
776
+ "password_hash": {
777
+ "name": "password_hash",
778
+ "type": "text",
779
+ "primaryKey": false,
780
+ "notNull": true,
781
+ "autoincrement": false
782
+ },
783
+ "role": {
784
+ "name": "role",
785
+ "type": "text",
786
+ "primaryKey": false,
787
+ "notNull": true,
788
+ "autoincrement": false
789
+ },
790
+ "can_use_paid": {
791
+ "name": "can_use_paid",
792
+ "type": "integer",
793
+ "primaryKey": false,
794
+ "notNull": true,
795
+ "autoincrement": false
796
+ },
797
+ "can_train": {
798
+ "name": "can_train",
799
+ "type": "integer",
800
+ "primaryKey": false,
801
+ "notNull": true,
802
+ "autoincrement": false
803
+ },
804
+ "monthly_limit_usd": {
805
+ "name": "monthly_limit_usd",
806
+ "type": "real",
807
+ "primaryKey": false,
808
+ "notNull": false,
809
+ "autoincrement": false
810
+ },
811
+ "totp_secret": {
812
+ "name": "totp_secret",
813
+ "type": "text",
814
+ "primaryKey": false,
815
+ "notNull": false,
816
+ "autoincrement": false
817
+ },
818
+ "must_change_password": {
819
+ "name": "must_change_password",
820
+ "type": "integer",
821
+ "primaryKey": false,
822
+ "notNull": true,
823
+ "autoincrement": false,
824
+ "default": false
825
+ },
826
+ "disabled_at": {
827
+ "name": "disabled_at",
828
+ "type": "integer",
829
+ "primaryKey": false,
830
+ "notNull": false,
831
+ "autoincrement": false
832
+ },
833
+ "created_at": {
834
+ "name": "created_at",
835
+ "type": "integer",
836
+ "primaryKey": false,
837
+ "notNull": true,
838
+ "autoincrement": false
839
+ }
840
+ },
841
+ "indexes": {
842
+ "users_username": {
843
+ "name": "users_username",
844
+ "columns": ["lower(\"username\")"],
845
+ "isUnique": true
846
+ }
847
+ },
848
+ "foreignKeys": {},
849
+ "compositePrimaryKeys": {},
850
+ "uniqueConstraints": {},
851
+ "checkConstraints": {}
852
+ }
853
+ },
854
+ "views": {},
855
+ "enums": {},
856
+ "_meta": {
857
+ "schemas": {},
858
+ "tables": {},
859
+ "columns": {}
860
+ },
861
+ "internal": {
862
+ "indexes": {
863
+ "users_username": {
864
+ "columns": {
865
+ "lower(\"username\")": {
866
+ "isExpression": true
867
+ }
868
+ }
869
+ }
870
+ }
871
+ }
872
+ }