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,750 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "d1566547-b9cf-4d86-9fcf-416f371ebcad",
5
+ "prevId": "65a1b238-c4cb-4ee1-9eca-f82d07858af2",
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
+ "scope": {
328
+ "name": "scope",
329
+ "type": "text",
330
+ "primaryKey": false,
331
+ "notNull": false,
332
+ "autoincrement": false
333
+ },
334
+ "starred": {
335
+ "name": "starred",
336
+ "type": "integer",
337
+ "primaryKey": false,
338
+ "notNull": true,
339
+ "autoincrement": false,
340
+ "default": 0
341
+ },
342
+ "has_changes": {
343
+ "name": "has_changes",
344
+ "type": "integer",
345
+ "primaryKey": false,
346
+ "notNull": true,
347
+ "autoincrement": false,
348
+ "default": 0
349
+ },
350
+ "created_at": {
351
+ "name": "created_at",
352
+ "type": "integer",
353
+ "primaryKey": false,
354
+ "notNull": true,
355
+ "autoincrement": false
356
+ },
357
+ "updated_at": {
358
+ "name": "updated_at",
359
+ "type": "integer",
360
+ "primaryKey": false,
361
+ "notNull": true,
362
+ "autoincrement": false
363
+ }
364
+ },
365
+ "indexes": {
366
+ "code_workspaces_container_name_unique": {
367
+ "name": "code_workspaces_container_name_unique",
368
+ "columns": [
369
+ "container_name"
370
+ ],
371
+ "isUnique": true
372
+ }
373
+ },
374
+ "foreignKeys": {},
375
+ "compositePrimaryKeys": {},
376
+ "uniqueConstraints": {},
377
+ "checkConstraints": {}
378
+ },
379
+ "messages": {
380
+ "name": "messages",
381
+ "columns": {
382
+ "id": {
383
+ "name": "id",
384
+ "type": "text",
385
+ "primaryKey": true,
386
+ "notNull": true,
387
+ "autoincrement": false
388
+ },
389
+ "chat_id": {
390
+ "name": "chat_id",
391
+ "type": "text",
392
+ "primaryKey": false,
393
+ "notNull": true,
394
+ "autoincrement": false
395
+ },
396
+ "role": {
397
+ "name": "role",
398
+ "type": "text",
399
+ "primaryKey": false,
400
+ "notNull": true,
401
+ "autoincrement": false
402
+ },
403
+ "content": {
404
+ "name": "content",
405
+ "type": "text",
406
+ "primaryKey": false,
407
+ "notNull": true,
408
+ "autoincrement": false
409
+ },
410
+ "created_at": {
411
+ "name": "created_at",
412
+ "type": "integer",
413
+ "primaryKey": false,
414
+ "notNull": true,
415
+ "autoincrement": false
416
+ }
417
+ },
418
+ "indexes": {},
419
+ "foreignKeys": {},
420
+ "compositePrimaryKeys": {},
421
+ "uniqueConstraints": {},
422
+ "checkConstraints": {}
423
+ },
424
+ "notifications": {
425
+ "name": "notifications",
426
+ "columns": {
427
+ "id": {
428
+ "name": "id",
429
+ "type": "text",
430
+ "primaryKey": true,
431
+ "notNull": true,
432
+ "autoincrement": false
433
+ },
434
+ "notification": {
435
+ "name": "notification",
436
+ "type": "text",
437
+ "primaryKey": false,
438
+ "notNull": true,
439
+ "autoincrement": false
440
+ },
441
+ "payload": {
442
+ "name": "payload",
443
+ "type": "text",
444
+ "primaryKey": false,
445
+ "notNull": true,
446
+ "autoincrement": false
447
+ },
448
+ "read": {
449
+ "name": "read",
450
+ "type": "integer",
451
+ "primaryKey": false,
452
+ "notNull": true,
453
+ "autoincrement": false,
454
+ "default": 0
455
+ },
456
+ "created_at": {
457
+ "name": "created_at",
458
+ "type": "integer",
459
+ "primaryKey": false,
460
+ "notNull": true,
461
+ "autoincrement": false
462
+ }
463
+ },
464
+ "indexes": {},
465
+ "foreignKeys": {},
466
+ "compositePrimaryKeys": {},
467
+ "uniqueConstraints": {},
468
+ "checkConstraints": {}
469
+ },
470
+ "settings": {
471
+ "name": "settings",
472
+ "columns": {
473
+ "id": {
474
+ "name": "id",
475
+ "type": "text",
476
+ "primaryKey": true,
477
+ "notNull": true,
478
+ "autoincrement": false
479
+ },
480
+ "type": {
481
+ "name": "type",
482
+ "type": "text",
483
+ "primaryKey": false,
484
+ "notNull": true,
485
+ "autoincrement": false
486
+ },
487
+ "key": {
488
+ "name": "key",
489
+ "type": "text",
490
+ "primaryKey": false,
491
+ "notNull": true,
492
+ "autoincrement": false
493
+ },
494
+ "value": {
495
+ "name": "value",
496
+ "type": "text",
497
+ "primaryKey": false,
498
+ "notNull": true,
499
+ "autoincrement": false
500
+ },
501
+ "created_by": {
502
+ "name": "created_by",
503
+ "type": "text",
504
+ "primaryKey": false,
505
+ "notNull": false,
506
+ "autoincrement": false
507
+ },
508
+ "last_used_at": {
509
+ "name": "last_used_at",
510
+ "type": "integer",
511
+ "primaryKey": false,
512
+ "notNull": false,
513
+ "autoincrement": false
514
+ },
515
+ "created_at": {
516
+ "name": "created_at",
517
+ "type": "integer",
518
+ "primaryKey": false,
519
+ "notNull": true,
520
+ "autoincrement": false
521
+ },
522
+ "updated_at": {
523
+ "name": "updated_at",
524
+ "type": "integer",
525
+ "primaryKey": false,
526
+ "notNull": true,
527
+ "autoincrement": false
528
+ }
529
+ },
530
+ "indexes": {},
531
+ "foreignKeys": {},
532
+ "compositePrimaryKeys": {},
533
+ "uniqueConstraints": {},
534
+ "checkConstraints": {}
535
+ },
536
+ "subscriptions": {
537
+ "name": "subscriptions",
538
+ "columns": {
539
+ "id": {
540
+ "name": "id",
541
+ "type": "text",
542
+ "primaryKey": true,
543
+ "notNull": true,
544
+ "autoincrement": false
545
+ },
546
+ "platform": {
547
+ "name": "platform",
548
+ "type": "text",
549
+ "primaryKey": false,
550
+ "notNull": true,
551
+ "autoincrement": false
552
+ },
553
+ "channel_id": {
554
+ "name": "channel_id",
555
+ "type": "text",
556
+ "primaryKey": false,
557
+ "notNull": true,
558
+ "autoincrement": false
559
+ },
560
+ "created_at": {
561
+ "name": "created_at",
562
+ "type": "integer",
563
+ "primaryKey": false,
564
+ "notNull": true,
565
+ "autoincrement": false
566
+ }
567
+ },
568
+ "indexes": {},
569
+ "foreignKeys": {},
570
+ "compositePrimaryKeys": {},
571
+ "uniqueConstraints": {},
572
+ "checkConstraints": {}
573
+ },
574
+ "user_channels": {
575
+ "name": "user_channels",
576
+ "columns": {
577
+ "id": {
578
+ "name": "id",
579
+ "type": "text",
580
+ "primaryKey": true,
581
+ "notNull": true,
582
+ "autoincrement": false
583
+ },
584
+ "user_id": {
585
+ "name": "user_id",
586
+ "type": "text",
587
+ "primaryKey": false,
588
+ "notNull": true,
589
+ "autoincrement": false
590
+ },
591
+ "channel": {
592
+ "name": "channel",
593
+ "type": "text",
594
+ "primaryKey": false,
595
+ "notNull": true,
596
+ "autoincrement": false
597
+ },
598
+ "channel_chat_id": {
599
+ "name": "channel_chat_id",
600
+ "type": "text",
601
+ "primaryKey": false,
602
+ "notNull": false,
603
+ "autoincrement": false
604
+ },
605
+ "code": {
606
+ "name": "code",
607
+ "type": "text",
608
+ "primaryKey": false,
609
+ "notNull": false,
610
+ "autoincrement": false
611
+ },
612
+ "code_expires_at": {
613
+ "name": "code_expires_at",
614
+ "type": "integer",
615
+ "primaryKey": false,
616
+ "notNull": false,
617
+ "autoincrement": false
618
+ },
619
+ "verified_at": {
620
+ "name": "verified_at",
621
+ "type": "integer",
622
+ "primaryKey": false,
623
+ "notNull": false,
624
+ "autoincrement": false
625
+ },
626
+ "active_thread_id": {
627
+ "name": "active_thread_id",
628
+ "type": "text",
629
+ "primaryKey": false,
630
+ "notNull": false,
631
+ "autoincrement": false
632
+ },
633
+ "created_at": {
634
+ "name": "created_at",
635
+ "type": "integer",
636
+ "primaryKey": false,
637
+ "notNull": true,
638
+ "autoincrement": false
639
+ },
640
+ "updated_at": {
641
+ "name": "updated_at",
642
+ "type": "integer",
643
+ "primaryKey": false,
644
+ "notNull": true,
645
+ "autoincrement": false
646
+ }
647
+ },
648
+ "indexes": {
649
+ "user_channels_user_channel_unique": {
650
+ "name": "user_channels_user_channel_unique",
651
+ "columns": [
652
+ "user_id",
653
+ "channel"
654
+ ],
655
+ "isUnique": true
656
+ },
657
+ "user_channels_channel_chat_id_unique": {
658
+ "name": "user_channels_channel_chat_id_unique",
659
+ "columns": [
660
+ "channel",
661
+ "channel_chat_id"
662
+ ],
663
+ "isUnique": true
664
+ },
665
+ "user_channels_code_lookup": {
666
+ "name": "user_channels_code_lookup",
667
+ "columns": [
668
+ "code"
669
+ ],
670
+ "isUnique": false
671
+ }
672
+ },
673
+ "foreignKeys": {},
674
+ "compositePrimaryKeys": {},
675
+ "uniqueConstraints": {},
676
+ "checkConstraints": {}
677
+ },
678
+ "users": {
679
+ "name": "users",
680
+ "columns": {
681
+ "id": {
682
+ "name": "id",
683
+ "type": "text",
684
+ "primaryKey": true,
685
+ "notNull": true,
686
+ "autoincrement": false
687
+ },
688
+ "email": {
689
+ "name": "email",
690
+ "type": "text",
691
+ "primaryKey": false,
692
+ "notNull": true,
693
+ "autoincrement": false
694
+ },
695
+ "password_hash": {
696
+ "name": "password_hash",
697
+ "type": "text",
698
+ "primaryKey": false,
699
+ "notNull": true,
700
+ "autoincrement": false
701
+ },
702
+ "role": {
703
+ "name": "role",
704
+ "type": "text",
705
+ "primaryKey": false,
706
+ "notNull": true,
707
+ "autoincrement": false,
708
+ "default": "'admin'"
709
+ },
710
+ "created_at": {
711
+ "name": "created_at",
712
+ "type": "integer",
713
+ "primaryKey": false,
714
+ "notNull": true,
715
+ "autoincrement": false
716
+ },
717
+ "updated_at": {
718
+ "name": "updated_at",
719
+ "type": "integer",
720
+ "primaryKey": false,
721
+ "notNull": true,
722
+ "autoincrement": false
723
+ }
724
+ },
725
+ "indexes": {
726
+ "users_email_unique": {
727
+ "name": "users_email_unique",
728
+ "columns": [
729
+ "email"
730
+ ],
731
+ "isUnique": true
732
+ }
733
+ },
734
+ "foreignKeys": {},
735
+ "compositePrimaryKeys": {},
736
+ "uniqueConstraints": {},
737
+ "checkConstraints": {}
738
+ }
739
+ },
740
+ "views": {},
741
+ "enums": {},
742
+ "_meta": {
743
+ "schemas": {},
744
+ "tables": {},
745
+ "columns": {}
746
+ },
747
+ "internal": {
748
+ "indexes": {}
749
+ }
750
+ }