thepopebot 1.2.76-beta.2 → 1.2.76-beta.21

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 (128) hide show
  1. package/README.md +3 -3
  2. package/api/CLAUDE.md +11 -4
  3. package/api/index.js +56 -18
  4. package/bin/CLAUDE.md +7 -4
  5. package/bin/cli.js +25 -45
  6. package/config/CLAUDE.md +23 -4
  7. package/drizzle/0021_coding_agent_workspace.sql +1 -0
  8. package/drizzle/0022_organic_apocalypse.sql +16 -0
  9. package/drizzle/0023_needy_ender_wiggin.sql +1 -0
  10. package/drizzle/meta/0021_snapshot.json +639 -0
  11. package/drizzle/meta/0022_snapshot.json +743 -0
  12. package/drizzle/meta/0023_snapshot.json +750 -0
  13. package/drizzle/meta/_journal.json +21 -0
  14. package/lib/CLAUDE.md +2 -2
  15. package/lib/actions.js +9 -1
  16. package/lib/ai/CLAUDE.md +72 -57
  17. package/lib/ai/helper-llm.js +108 -0
  18. package/lib/ai/index.js +308 -438
  19. package/lib/ai/line-mappers.js +42 -24
  20. package/lib/ai/scope.js +26 -0
  21. package/lib/ai/sdk-adapters/CLAUDE.md +114 -0
  22. package/lib/ai/sdk-adapters/claude-code.js +120 -8
  23. package/lib/ai/system-prompt.js +34 -0
  24. package/lib/ai/workspace-setup.js +19 -35
  25. package/lib/channels/CLAUDE.md +14 -4
  26. package/lib/channels/base.js +6 -2
  27. package/lib/channels/commands/index.js +42 -0
  28. package/lib/channels/commands/session.js +53 -0
  29. package/lib/channels/commands/verify.js +18 -0
  30. package/lib/channels/telegram.js +79 -28
  31. package/lib/chat/CLAUDE.md +4 -4
  32. package/lib/chat/actions.js +270 -49
  33. package/lib/chat/api.js +185 -31
  34. package/lib/chat/components/CLAUDE.md +6 -2
  35. package/lib/chat/components/chat-input.js +77 -47
  36. package/lib/chat/components/chat-input.jsx +77 -40
  37. package/lib/chat/components/chat-page.js +2 -0
  38. package/lib/chat/components/chat-page.jsx +3 -0
  39. package/lib/chat/components/chat.js +62 -14
  40. package/lib/chat/components/chat.jsx +68 -10
  41. package/lib/chat/components/code-mode-toggle.js +141 -22
  42. package/lib/chat/components/code-mode-toggle.jsx +129 -20
  43. package/lib/chat/components/containers-page.js +58 -40
  44. package/lib/chat/components/containers-page.jsx +64 -25
  45. package/lib/chat/components/crons-page.js +17 -3
  46. package/lib/chat/components/crons-page.jsx +34 -6
  47. package/lib/chat/components/index.js +2 -2
  48. package/lib/chat/components/message.js +18 -3
  49. package/lib/chat/components/message.jsx +18 -3
  50. package/lib/chat/components/profile-page.js +182 -4
  51. package/lib/chat/components/profile-page.jsx +196 -1
  52. package/lib/chat/components/scope-picker.js +21 -0
  53. package/lib/chat/components/scope-picker.jsx +27 -0
  54. package/lib/chat/components/settings-chat-page.js +11 -11
  55. package/lib/chat/components/settings-chat-page.jsx +14 -18
  56. package/lib/chat/components/settings-coding-agents-page.js +110 -16
  57. package/lib/chat/components/settings-coding-agents-page.jsx +87 -3
  58. package/lib/chat/components/settings-github-page.js +5 -0
  59. package/lib/chat/components/settings-github-page.jsx +5 -0
  60. package/lib/chat/components/settings-layout.js +3 -3
  61. package/lib/chat/components/settings-layout.jsx +3 -3
  62. package/lib/chat/components/settings-secrets-layout.js +1 -2
  63. package/lib/chat/components/settings-secrets-layout.jsx +1 -2
  64. package/lib/chat/components/settings-secrets-page.js +180 -75
  65. package/lib/chat/components/settings-secrets-page.jsx +212 -66
  66. package/lib/chat/components/triggers-page.js +17 -3
  67. package/lib/chat/components/triggers-page.jsx +34 -6
  68. package/lib/chat/components/ui/combobox.js +18 -2
  69. package/lib/chat/components/ui/combobox.jsx +17 -1
  70. package/lib/chat/components/ui/dropdown-menu.js +23 -2
  71. package/lib/chat/components/ui/dropdown-menu.jsx +27 -2
  72. package/lib/chat/telegram-profile.js +33 -0
  73. package/lib/cluster/CLAUDE.md +9 -3
  74. package/lib/code/CLAUDE.md +11 -3
  75. package/lib/code/actions.js +47 -8
  76. package/lib/code/terminal-view.js +31 -21
  77. package/lib/code/terminal-view.jsx +32 -23
  78. package/lib/config.js +15 -4
  79. package/lib/containers/CLAUDE.md +16 -6
  80. package/lib/db/CLAUDE.md +5 -2
  81. package/lib/db/chats.js +9 -17
  82. package/lib/db/code-workspaces.js +8 -3
  83. package/lib/db/config.js +0 -1
  84. package/lib/db/index.js +12 -0
  85. package/lib/db/schema.js +24 -1
  86. package/lib/db/user-channels.js +129 -0
  87. package/lib/llm-providers.js +8 -0
  88. package/lib/maintenance.js +31 -21
  89. package/lib/tools/CLAUDE.md +12 -3
  90. package/lib/tools/assemblyai.js +17 -0
  91. package/lib/tools/create-agent-job.js +12 -8
  92. package/lib/tools/docker.js +34 -10
  93. package/lib/tools/github.js +34 -0
  94. package/lib/tools/telegram.js +106 -0
  95. package/lib/utils/render-md.js +44 -18
  96. package/package.json +8 -8
  97. package/setup/CLAUDE.md +11 -5
  98. package/setup/lib/providers.mjs +2 -1
  99. package/setup/lib/targets.mjs +13 -16
  100. package/setup/lib/telegram.mjs +8 -69
  101. package/templates/.env.example +0 -7
  102. package/templates/.github/workflows/rebuild-event-handler.yml +1 -1
  103. package/templates/.gitignore.template +1 -3
  104. package/templates/CLAUDE.md +1 -1
  105. package/templates/CLAUDE.md.template +29 -7
  106. package/templates/agent-job/CLAUDE.md.template +5 -3
  107. package/templates/agent-job/CRONS.json +16 -0
  108. package/templates/agent-job/SYSTEM.md +16 -11
  109. package/templates/agents/CLAUDE.md.template +17 -17
  110. package/templates/coding-workspace/CLAUDE.md.template +7 -0
  111. package/templates/data/CLAUDE.md.template +1 -1
  112. package/templates/docker-compose.custom.yml +1 -0
  113. package/templates/docker-compose.yml +1 -0
  114. package/templates/event-handler/CLAUDE.md.template +79 -0
  115. package/templates/event-handler/TRIGGERS.json +18 -2
  116. package/templates/skills/CLAUDE.md.template +20 -22
  117. package/templates/skills/{library/agent-job-secrets → agent-job-secrets}/SKILL.md +2 -2
  118. package/lib/ai/agent.js +0 -65
  119. package/lib/ai/async-channel.js +0 -51
  120. package/lib/ai/model.js +0 -130
  121. package/lib/ai/tools.js +0 -164
  122. package/lib/tools/openai.js +0 -37
  123. package/setup/lib/telegram-verify.mjs +0 -63
  124. package/setup/setup-telegram.mjs +0 -260
  125. package/templates/agent-job/SOUL.md +0 -17
  126. /package/templates/{skills/active/.gitkeep → coding-workspace/SYSTEM.md} +0 -0
  127. /package/templates/skills/{library/agent-job-secrets → agent-job-secrets}/agent-job-secrets.js +0 -0
  128. /package/templates/skills/{library/playwright-cli → playwright-cli}/SKILL.md +0 -0
@@ -0,0 +1,743 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "65a1b238-c4cb-4ee1-9eca-f82d07858af2",
5
+ "prevId": "c4aac773-f0ac-4a09-a13f-4fc12662d732",
6
+ "tables": {
7
+ "chats": {
8
+ "name": "chats",
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
+ "title": {
25
+ "name": "title",
26
+ "type": "text",
27
+ "primaryKey": false,
28
+ "notNull": true,
29
+ "autoincrement": false,
30
+ "default": "'New Chat'"
31
+ },
32
+ "starred": {
33
+ "name": "starred",
34
+ "type": "integer",
35
+ "primaryKey": false,
36
+ "notNull": true,
37
+ "autoincrement": false,
38
+ "default": 0
39
+ },
40
+ "chat_mode": {
41
+ "name": "chat_mode",
42
+ "type": "text",
43
+ "primaryKey": false,
44
+ "notNull": true,
45
+ "autoincrement": false,
46
+ "default": "'agent'"
47
+ },
48
+ "code_workspace_id": {
49
+ "name": "code_workspace_id",
50
+ "type": "text",
51
+ "primaryKey": false,
52
+ "notNull": false,
53
+ "autoincrement": false
54
+ },
55
+ "created_at": {
56
+ "name": "created_at",
57
+ "type": "integer",
58
+ "primaryKey": false,
59
+ "notNull": true,
60
+ "autoincrement": false
61
+ },
62
+ "updated_at": {
63
+ "name": "updated_at",
64
+ "type": "integer",
65
+ "primaryKey": false,
66
+ "notNull": true,
67
+ "autoincrement": false
68
+ }
69
+ },
70
+ "indexes": {},
71
+ "foreignKeys": {},
72
+ "compositePrimaryKeys": {},
73
+ "uniqueConstraints": {},
74
+ "checkConstraints": {}
75
+ },
76
+ "cluster_roles": {
77
+ "name": "cluster_roles",
78
+ "columns": {
79
+ "id": {
80
+ "name": "id",
81
+ "type": "text",
82
+ "primaryKey": true,
83
+ "notNull": true,
84
+ "autoincrement": false
85
+ },
86
+ "cluster_id": {
87
+ "name": "cluster_id",
88
+ "type": "text",
89
+ "primaryKey": false,
90
+ "notNull": true,
91
+ "autoincrement": false
92
+ },
93
+ "role_name": {
94
+ "name": "role_name",
95
+ "type": "text",
96
+ "primaryKey": false,
97
+ "notNull": true,
98
+ "autoincrement": false
99
+ },
100
+ "role": {
101
+ "name": "role",
102
+ "type": "text",
103
+ "primaryKey": false,
104
+ "notNull": true,
105
+ "autoincrement": false,
106
+ "default": "''"
107
+ },
108
+ "prompt": {
109
+ "name": "prompt",
110
+ "type": "text",
111
+ "primaryKey": false,
112
+ "notNull": true,
113
+ "autoincrement": false,
114
+ "default": "'Execute your role.'"
115
+ },
116
+ "trigger_config": {
117
+ "name": "trigger_config",
118
+ "type": "text",
119
+ "primaryKey": false,
120
+ "notNull": false,
121
+ "autoincrement": false
122
+ },
123
+ "max_concurrency": {
124
+ "name": "max_concurrency",
125
+ "type": "integer",
126
+ "primaryKey": false,
127
+ "notNull": true,
128
+ "autoincrement": false,
129
+ "default": 1
130
+ },
131
+ "cleanup_worker_dir": {
132
+ "name": "cleanup_worker_dir",
133
+ "type": "integer",
134
+ "primaryKey": false,
135
+ "notNull": true,
136
+ "autoincrement": false,
137
+ "default": 0
138
+ },
139
+ "plan_mode": {
140
+ "name": "plan_mode",
141
+ "type": "integer",
142
+ "primaryKey": false,
143
+ "notNull": true,
144
+ "autoincrement": false,
145
+ "default": 0
146
+ },
147
+ "folders": {
148
+ "name": "folders",
149
+ "type": "text",
150
+ "primaryKey": false,
151
+ "notNull": false,
152
+ "autoincrement": false
153
+ },
154
+ "sort_order": {
155
+ "name": "sort_order",
156
+ "type": "integer",
157
+ "primaryKey": false,
158
+ "notNull": true,
159
+ "autoincrement": false,
160
+ "default": 0
161
+ },
162
+ "created_at": {
163
+ "name": "created_at",
164
+ "type": "integer",
165
+ "primaryKey": false,
166
+ "notNull": true,
167
+ "autoincrement": false
168
+ },
169
+ "updated_at": {
170
+ "name": "updated_at",
171
+ "type": "integer",
172
+ "primaryKey": false,
173
+ "notNull": true,
174
+ "autoincrement": false
175
+ }
176
+ },
177
+ "indexes": {},
178
+ "foreignKeys": {},
179
+ "compositePrimaryKeys": {},
180
+ "uniqueConstraints": {},
181
+ "checkConstraints": {}
182
+ },
183
+ "clusters": {
184
+ "name": "clusters",
185
+ "columns": {
186
+ "id": {
187
+ "name": "id",
188
+ "type": "text",
189
+ "primaryKey": true,
190
+ "notNull": true,
191
+ "autoincrement": false
192
+ },
193
+ "user_id": {
194
+ "name": "user_id",
195
+ "type": "text",
196
+ "primaryKey": false,
197
+ "notNull": true,
198
+ "autoincrement": false
199
+ },
200
+ "name": {
201
+ "name": "name",
202
+ "type": "text",
203
+ "primaryKey": false,
204
+ "notNull": true,
205
+ "autoincrement": false,
206
+ "default": "'New Cluster'"
207
+ },
208
+ "system_prompt": {
209
+ "name": "system_prompt",
210
+ "type": "text",
211
+ "primaryKey": false,
212
+ "notNull": true,
213
+ "autoincrement": false,
214
+ "default": "''"
215
+ },
216
+ "folders": {
217
+ "name": "folders",
218
+ "type": "text",
219
+ "primaryKey": false,
220
+ "notNull": false,
221
+ "autoincrement": false
222
+ },
223
+ "enabled": {
224
+ "name": "enabled",
225
+ "type": "integer",
226
+ "primaryKey": false,
227
+ "notNull": true,
228
+ "autoincrement": false,
229
+ "default": 0
230
+ },
231
+ "starred": {
232
+ "name": "starred",
233
+ "type": "integer",
234
+ "primaryKey": false,
235
+ "notNull": true,
236
+ "autoincrement": false,
237
+ "default": 0
238
+ },
239
+ "created_at": {
240
+ "name": "created_at",
241
+ "type": "integer",
242
+ "primaryKey": false,
243
+ "notNull": true,
244
+ "autoincrement": false
245
+ },
246
+ "updated_at": {
247
+ "name": "updated_at",
248
+ "type": "integer",
249
+ "primaryKey": false,
250
+ "notNull": true,
251
+ "autoincrement": false
252
+ }
253
+ },
254
+ "indexes": {},
255
+ "foreignKeys": {},
256
+ "compositePrimaryKeys": {},
257
+ "uniqueConstraints": {},
258
+ "checkConstraints": {}
259
+ },
260
+ "code_workspaces": {
261
+ "name": "code_workspaces",
262
+ "columns": {
263
+ "id": {
264
+ "name": "id",
265
+ "type": "text",
266
+ "primaryKey": true,
267
+ "notNull": true,
268
+ "autoincrement": false
269
+ },
270
+ "user_id": {
271
+ "name": "user_id",
272
+ "type": "text",
273
+ "primaryKey": false,
274
+ "notNull": true,
275
+ "autoincrement": false
276
+ },
277
+ "container_name": {
278
+ "name": "container_name",
279
+ "type": "text",
280
+ "primaryKey": false,
281
+ "notNull": false,
282
+ "autoincrement": false
283
+ },
284
+ "repo": {
285
+ "name": "repo",
286
+ "type": "text",
287
+ "primaryKey": false,
288
+ "notNull": false,
289
+ "autoincrement": false
290
+ },
291
+ "branch": {
292
+ "name": "branch",
293
+ "type": "text",
294
+ "primaryKey": false,
295
+ "notNull": false,
296
+ "autoincrement": false
297
+ },
298
+ "feature_branch": {
299
+ "name": "feature_branch",
300
+ "type": "text",
301
+ "primaryKey": false,
302
+ "notNull": false,
303
+ "autoincrement": false
304
+ },
305
+ "title": {
306
+ "name": "title",
307
+ "type": "text",
308
+ "primaryKey": false,
309
+ "notNull": true,
310
+ "autoincrement": false,
311
+ "default": "'Code Workspace'"
312
+ },
313
+ "last_interactive_commit": {
314
+ "name": "last_interactive_commit",
315
+ "type": "text",
316
+ "primaryKey": false,
317
+ "notNull": false,
318
+ "autoincrement": false
319
+ },
320
+ "coding_agent": {
321
+ "name": "coding_agent",
322
+ "type": "text",
323
+ "primaryKey": false,
324
+ "notNull": false,
325
+ "autoincrement": false
326
+ },
327
+ "starred": {
328
+ "name": "starred",
329
+ "type": "integer",
330
+ "primaryKey": false,
331
+ "notNull": true,
332
+ "autoincrement": false,
333
+ "default": 0
334
+ },
335
+ "has_changes": {
336
+ "name": "has_changes",
337
+ "type": "integer",
338
+ "primaryKey": false,
339
+ "notNull": true,
340
+ "autoincrement": false,
341
+ "default": 0
342
+ },
343
+ "created_at": {
344
+ "name": "created_at",
345
+ "type": "integer",
346
+ "primaryKey": false,
347
+ "notNull": true,
348
+ "autoincrement": false
349
+ },
350
+ "updated_at": {
351
+ "name": "updated_at",
352
+ "type": "integer",
353
+ "primaryKey": false,
354
+ "notNull": true,
355
+ "autoincrement": false
356
+ }
357
+ },
358
+ "indexes": {
359
+ "code_workspaces_container_name_unique": {
360
+ "name": "code_workspaces_container_name_unique",
361
+ "columns": [
362
+ "container_name"
363
+ ],
364
+ "isUnique": true
365
+ }
366
+ },
367
+ "foreignKeys": {},
368
+ "compositePrimaryKeys": {},
369
+ "uniqueConstraints": {},
370
+ "checkConstraints": {}
371
+ },
372
+ "messages": {
373
+ "name": "messages",
374
+ "columns": {
375
+ "id": {
376
+ "name": "id",
377
+ "type": "text",
378
+ "primaryKey": true,
379
+ "notNull": true,
380
+ "autoincrement": false
381
+ },
382
+ "chat_id": {
383
+ "name": "chat_id",
384
+ "type": "text",
385
+ "primaryKey": false,
386
+ "notNull": true,
387
+ "autoincrement": false
388
+ },
389
+ "role": {
390
+ "name": "role",
391
+ "type": "text",
392
+ "primaryKey": false,
393
+ "notNull": true,
394
+ "autoincrement": false
395
+ },
396
+ "content": {
397
+ "name": "content",
398
+ "type": "text",
399
+ "primaryKey": false,
400
+ "notNull": true,
401
+ "autoincrement": false
402
+ },
403
+ "created_at": {
404
+ "name": "created_at",
405
+ "type": "integer",
406
+ "primaryKey": false,
407
+ "notNull": true,
408
+ "autoincrement": false
409
+ }
410
+ },
411
+ "indexes": {},
412
+ "foreignKeys": {},
413
+ "compositePrimaryKeys": {},
414
+ "uniqueConstraints": {},
415
+ "checkConstraints": {}
416
+ },
417
+ "notifications": {
418
+ "name": "notifications",
419
+ "columns": {
420
+ "id": {
421
+ "name": "id",
422
+ "type": "text",
423
+ "primaryKey": true,
424
+ "notNull": true,
425
+ "autoincrement": false
426
+ },
427
+ "notification": {
428
+ "name": "notification",
429
+ "type": "text",
430
+ "primaryKey": false,
431
+ "notNull": true,
432
+ "autoincrement": false
433
+ },
434
+ "payload": {
435
+ "name": "payload",
436
+ "type": "text",
437
+ "primaryKey": false,
438
+ "notNull": true,
439
+ "autoincrement": false
440
+ },
441
+ "read": {
442
+ "name": "read",
443
+ "type": "integer",
444
+ "primaryKey": false,
445
+ "notNull": true,
446
+ "autoincrement": false,
447
+ "default": 0
448
+ },
449
+ "created_at": {
450
+ "name": "created_at",
451
+ "type": "integer",
452
+ "primaryKey": false,
453
+ "notNull": true,
454
+ "autoincrement": false
455
+ }
456
+ },
457
+ "indexes": {},
458
+ "foreignKeys": {},
459
+ "compositePrimaryKeys": {},
460
+ "uniqueConstraints": {},
461
+ "checkConstraints": {}
462
+ },
463
+ "settings": {
464
+ "name": "settings",
465
+ "columns": {
466
+ "id": {
467
+ "name": "id",
468
+ "type": "text",
469
+ "primaryKey": true,
470
+ "notNull": true,
471
+ "autoincrement": false
472
+ },
473
+ "type": {
474
+ "name": "type",
475
+ "type": "text",
476
+ "primaryKey": false,
477
+ "notNull": true,
478
+ "autoincrement": false
479
+ },
480
+ "key": {
481
+ "name": "key",
482
+ "type": "text",
483
+ "primaryKey": false,
484
+ "notNull": true,
485
+ "autoincrement": false
486
+ },
487
+ "value": {
488
+ "name": "value",
489
+ "type": "text",
490
+ "primaryKey": false,
491
+ "notNull": true,
492
+ "autoincrement": false
493
+ },
494
+ "created_by": {
495
+ "name": "created_by",
496
+ "type": "text",
497
+ "primaryKey": false,
498
+ "notNull": false,
499
+ "autoincrement": false
500
+ },
501
+ "last_used_at": {
502
+ "name": "last_used_at",
503
+ "type": "integer",
504
+ "primaryKey": false,
505
+ "notNull": false,
506
+ "autoincrement": false
507
+ },
508
+ "created_at": {
509
+ "name": "created_at",
510
+ "type": "integer",
511
+ "primaryKey": false,
512
+ "notNull": true,
513
+ "autoincrement": false
514
+ },
515
+ "updated_at": {
516
+ "name": "updated_at",
517
+ "type": "integer",
518
+ "primaryKey": false,
519
+ "notNull": true,
520
+ "autoincrement": false
521
+ }
522
+ },
523
+ "indexes": {},
524
+ "foreignKeys": {},
525
+ "compositePrimaryKeys": {},
526
+ "uniqueConstraints": {},
527
+ "checkConstraints": {}
528
+ },
529
+ "subscriptions": {
530
+ "name": "subscriptions",
531
+ "columns": {
532
+ "id": {
533
+ "name": "id",
534
+ "type": "text",
535
+ "primaryKey": true,
536
+ "notNull": true,
537
+ "autoincrement": false
538
+ },
539
+ "platform": {
540
+ "name": "platform",
541
+ "type": "text",
542
+ "primaryKey": false,
543
+ "notNull": true,
544
+ "autoincrement": false
545
+ },
546
+ "channel_id": {
547
+ "name": "channel_id",
548
+ "type": "text",
549
+ "primaryKey": false,
550
+ "notNull": true,
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
+ },
561
+ "indexes": {},
562
+ "foreignKeys": {},
563
+ "compositePrimaryKeys": {},
564
+ "uniqueConstraints": {},
565
+ "checkConstraints": {}
566
+ },
567
+ "user_channels": {
568
+ "name": "user_channels",
569
+ "columns": {
570
+ "id": {
571
+ "name": "id",
572
+ "type": "text",
573
+ "primaryKey": true,
574
+ "notNull": true,
575
+ "autoincrement": false
576
+ },
577
+ "user_id": {
578
+ "name": "user_id",
579
+ "type": "text",
580
+ "primaryKey": false,
581
+ "notNull": true,
582
+ "autoincrement": false
583
+ },
584
+ "channel": {
585
+ "name": "channel",
586
+ "type": "text",
587
+ "primaryKey": false,
588
+ "notNull": true,
589
+ "autoincrement": false
590
+ },
591
+ "channel_chat_id": {
592
+ "name": "channel_chat_id",
593
+ "type": "text",
594
+ "primaryKey": false,
595
+ "notNull": false,
596
+ "autoincrement": false
597
+ },
598
+ "code": {
599
+ "name": "code",
600
+ "type": "text",
601
+ "primaryKey": false,
602
+ "notNull": false,
603
+ "autoincrement": false
604
+ },
605
+ "code_expires_at": {
606
+ "name": "code_expires_at",
607
+ "type": "integer",
608
+ "primaryKey": false,
609
+ "notNull": false,
610
+ "autoincrement": false
611
+ },
612
+ "verified_at": {
613
+ "name": "verified_at",
614
+ "type": "integer",
615
+ "primaryKey": false,
616
+ "notNull": false,
617
+ "autoincrement": false
618
+ },
619
+ "active_thread_id": {
620
+ "name": "active_thread_id",
621
+ "type": "text",
622
+ "primaryKey": false,
623
+ "notNull": false,
624
+ "autoincrement": false
625
+ },
626
+ "created_at": {
627
+ "name": "created_at",
628
+ "type": "integer",
629
+ "primaryKey": false,
630
+ "notNull": true,
631
+ "autoincrement": false
632
+ },
633
+ "updated_at": {
634
+ "name": "updated_at",
635
+ "type": "integer",
636
+ "primaryKey": false,
637
+ "notNull": true,
638
+ "autoincrement": false
639
+ }
640
+ },
641
+ "indexes": {
642
+ "user_channels_user_channel_unique": {
643
+ "name": "user_channels_user_channel_unique",
644
+ "columns": [
645
+ "user_id",
646
+ "channel"
647
+ ],
648
+ "isUnique": true
649
+ },
650
+ "user_channels_channel_chat_id_unique": {
651
+ "name": "user_channels_channel_chat_id_unique",
652
+ "columns": [
653
+ "channel",
654
+ "channel_chat_id"
655
+ ],
656
+ "isUnique": true
657
+ },
658
+ "user_channels_code_lookup": {
659
+ "name": "user_channels_code_lookup",
660
+ "columns": [
661
+ "code"
662
+ ],
663
+ "isUnique": false
664
+ }
665
+ },
666
+ "foreignKeys": {},
667
+ "compositePrimaryKeys": {},
668
+ "uniqueConstraints": {},
669
+ "checkConstraints": {}
670
+ },
671
+ "users": {
672
+ "name": "users",
673
+ "columns": {
674
+ "id": {
675
+ "name": "id",
676
+ "type": "text",
677
+ "primaryKey": true,
678
+ "notNull": true,
679
+ "autoincrement": false
680
+ },
681
+ "email": {
682
+ "name": "email",
683
+ "type": "text",
684
+ "primaryKey": false,
685
+ "notNull": true,
686
+ "autoincrement": false
687
+ },
688
+ "password_hash": {
689
+ "name": "password_hash",
690
+ "type": "text",
691
+ "primaryKey": false,
692
+ "notNull": true,
693
+ "autoincrement": false
694
+ },
695
+ "role": {
696
+ "name": "role",
697
+ "type": "text",
698
+ "primaryKey": false,
699
+ "notNull": true,
700
+ "autoincrement": false,
701
+ "default": "'admin'"
702
+ },
703
+ "created_at": {
704
+ "name": "created_at",
705
+ "type": "integer",
706
+ "primaryKey": false,
707
+ "notNull": true,
708
+ "autoincrement": false
709
+ },
710
+ "updated_at": {
711
+ "name": "updated_at",
712
+ "type": "integer",
713
+ "primaryKey": false,
714
+ "notNull": true,
715
+ "autoincrement": false
716
+ }
717
+ },
718
+ "indexes": {
719
+ "users_email_unique": {
720
+ "name": "users_email_unique",
721
+ "columns": [
722
+ "email"
723
+ ],
724
+ "isUnique": true
725
+ }
726
+ },
727
+ "foreignKeys": {},
728
+ "compositePrimaryKeys": {},
729
+ "uniqueConstraints": {},
730
+ "checkConstraints": {}
731
+ }
732
+ },
733
+ "views": {},
734
+ "enums": {},
735
+ "_meta": {
736
+ "schemas": {},
737
+ "tables": {},
738
+ "columns": {}
739
+ },
740
+ "internal": {
741
+ "indexes": {}
742
+ }
743
+ }