larness 0.0.0-stage → 0.1.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 (160) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +205 -2
  3. package/app.js +131 -0
  4. package/apps/server/dist/address-UO6lb2Hx.js +95 -0
  5. package/apps/server/dist/client-DGXcZxzL.js +121 -0
  6. package/apps/server/dist/doctor-CTealIcx.js +131 -0
  7. package/apps/server/dist/doctor.js +13 -0
  8. package/apps/server/dist/index.js +25481 -0
  9. package/apps/server/dist/lock-8kmtcopF.js +102 -0
  10. package/apps/server/dist/managed-CHal_mk1.js +216 -0
  11. package/apps/server/dist/paths-Bp1nTSw3.js +2434 -0
  12. package/apps/server/dist/status-Dyecl2ni.js +50 -0
  13. package/apps/server/dist/status.js +31 -0
  14. package/apps/server/dist/tui.js +1628 -0
  15. package/apps/server/drizzle/0001_auth.sql +110 -0
  16. package/apps/server/drizzle/0002_projects.sql +13 -0
  17. package/apps/server/drizzle/0003_workspace.sql +81 -0
  18. package/apps/server/drizzle/0004_models.sql +30 -0
  19. package/apps/server/drizzle/0005_resources.sql +54 -0
  20. package/apps/server/drizzle/0006_commands.sql +24 -0
  21. package/apps/server/drizzle/0007_terminals.sql +42 -0
  22. package/apps/server/drizzle/0008_resource_actions.sql +24 -0
  23. package/apps/server/drizzle/0009_terminal_title.sql +1 -0
  24. package/apps/server/drizzle/0010_services.sql +32 -0
  25. package/apps/server/drizzle/0011_deployments.sql +88 -0
  26. package/apps/server/drizzle/0012_deployment_authorizations.sql +67 -0
  27. package/apps/server/drizzle/0013_service_ops.sql +64 -0
  28. package/apps/server/drizzle/0014_service_actions.sql +36 -0
  29. package/apps/server/drizzle/0015_model_catalog.sql +17 -0
  30. package/apps/server/drizzle/0016_multi_provider.sql +2 -0
  31. package/apps/server/drizzle/0017_model_visibility.sql +10 -0
  32. package/apps/server/drizzle/0018_model_defaults.sql +9 -0
  33. package/apps/server/drizzle/0019_credential_endpoint.sql +1 -0
  34. package/apps/server/drizzle/0020_compatible_context.sql +1 -0
  35. package/apps/server/drizzle/0021_context_summaries.sql +13 -0
  36. package/apps/server/drizzle/0022_scheduler.sql +58 -0
  37. package/apps/server/drizzle/meta/0001_snapshot.json +705 -0
  38. package/apps/server/drizzle/meta/0002_snapshot.json +784 -0
  39. package/apps/server/drizzle/meta/0003_snapshot.json +1300 -0
  40. package/apps/server/drizzle/meta/0004_snapshot.json +1489 -0
  41. package/apps/server/drizzle/meta/0005_snapshot.json +1794 -0
  42. package/apps/server/drizzle/meta/0006_snapshot.json +1953 -0
  43. package/apps/server/drizzle/meta/0007_snapshot.json +2232 -0
  44. package/apps/server/drizzle/meta/0008_snapshot.json +2391 -0
  45. package/apps/server/drizzle/meta/0009_snapshot.json +2398 -0
  46. package/apps/server/drizzle/meta/0010_snapshot.json +2601 -0
  47. package/apps/server/drizzle/meta/0015_snapshot.json +4332 -0
  48. package/apps/server/drizzle/meta/0016_snapshot.json +4346 -0
  49. package/apps/server/drizzle/meta/0017_snapshot.json +4408 -0
  50. package/apps/server/drizzle/meta/0018_snapshot.json +4468 -0
  51. package/apps/server/drizzle/meta/0019_snapshot.json +4475 -0
  52. package/apps/server/drizzle/meta/0020_snapshot.json +4482 -0
  53. package/apps/server/drizzle/meta/0021_snapshot.json +4565 -0
  54. package/apps/server/drizzle/meta/0022_snapshot.json +4960 -0
  55. package/apps/server/drizzle/meta/_journal.json +160 -0
  56. package/apps/server/package.json +57 -0
  57. package/apps/web/dist/assets/FileEditor-DpVfk7t3.js +1 -0
  58. package/apps/web/dist/assets/FileViewer-Bv5VYaA3.js +1 -0
  59. package/apps/web/dist/assets/abap-DLDM7-KI.js +1 -0
  60. package/apps/web/dist/assets/apex-DNDY2TF8.js +1 -0
  61. package/apps/web/dist/assets/azcli-Y6nb8tq_.js +1 -0
  62. package/apps/web/dist/assets/bat-BwHxbl9M.js +1 -0
  63. package/apps/web/dist/assets/bicep-CFznDFnq.js +2 -0
  64. package/apps/web/dist/assets/cameligo-Bf6VGUru.js +1 -0
  65. package/apps/web/dist/assets/clojure-Dnu-v4kV.js +1 -0
  66. package/apps/web/dist/assets/codicon-DF1abBS2.ttf +0 -0
  67. package/apps/web/dist/assets/coffee-Bd8akH9Z.js +1 -0
  68. package/apps/web/dist/assets/cpp-BbWJElDN.js +1 -0
  69. package/apps/web/dist/assets/csharp-Co3qMtFm.js +1 -0
  70. package/apps/web/dist/assets/csp-D-4FJmMZ.js +1 -0
  71. package/apps/web/dist/assets/css-DdJfP1eB.js +3 -0
  72. package/apps/web/dist/assets/css.worker-C_6RgliQ.js +97 -0
  73. package/apps/web/dist/assets/cssMode-EHCHSzzL.js +1 -0
  74. package/apps/web/dist/assets/cypher-cTPe9QuQ.js +1 -0
  75. package/apps/web/dist/assets/dart-BOtBlQCF.js +1 -0
  76. package/apps/web/dist/assets/dockerfile-BG73LgW2.js +1 -0
  77. package/apps/web/dist/assets/ecl-BEgZUVRK.js +1 -0
  78. package/apps/web/dist/assets/editor.worker-D1TDBLlL.js +30 -0
  79. package/apps/web/dist/assets/elixir-BkW5O-1t.js +1 -0
  80. package/apps/web/dist/assets/flow9-BeJ5waoc.js +1 -0
  81. package/apps/web/dist/assets/freemarker2-CYDUi4bR.js +3 -0
  82. package/apps/web/dist/assets/fsharp-PahG7c26.js +1 -0
  83. package/apps/web/dist/assets/go-acbASCJo.js +1 -0
  84. package/apps/web/dist/assets/graphql-BxJiqAUM.js +1 -0
  85. package/apps/web/dist/assets/handlebars-Bl5r-XBz.js +1 -0
  86. package/apps/web/dist/assets/hcl-DtV1sZF8.js +1 -0
  87. package/apps/web/dist/assets/html-Dimr8AuT.js +1 -0
  88. package/apps/web/dist/assets/html.worker-CLyYFd_g.js +474 -0
  89. package/apps/web/dist/assets/htmlMode-DbKEQN5e.js +1 -0
  90. package/apps/web/dist/assets/index-CiO_U1kt.js +158 -0
  91. package/apps/web/dist/assets/index-Cn8Mc6ux.css +1 -0
  92. package/apps/web/dist/assets/ini-Kd9XrMLS.js +1 -0
  93. package/apps/web/dist/assets/java-CXBNlu9o.js +1 -0
  94. package/apps/web/dist/assets/javascript-CAsmnqI3.js +1 -0
  95. package/apps/web/dist/assets/json.worker-BggoxaER.js +62 -0
  96. package/apps/web/dist/assets/jsonMode-FAO7KTW2.js +7 -0
  97. package/apps/web/dist/assets/julia-cl7-CwDS.js +1 -0
  98. package/apps/web/dist/assets/kotlin-s7OhZKlX.js +1 -0
  99. package/apps/web/dist/assets/less-9HpZscsL.js +2 -0
  100. package/apps/web/dist/assets/lexon-OrD6JF1K.js +1 -0
  101. package/apps/web/dist/assets/liquid-5H_43_EZ.js +1 -0
  102. package/apps/web/dist/assets/lspLanguageFeatures-DnuYc3pX.js +4 -0
  103. package/apps/web/dist/assets/lua-Cyyb5UIc.js +1 -0
  104. package/apps/web/dist/assets/m3-B8OfTtLu.js +1 -0
  105. package/apps/web/dist/assets/markdown-BFxVWTOG.js +1 -0
  106. package/apps/web/dist/assets/mdx-DJvtDn95.js +1 -0
  107. package/apps/web/dist/assets/mips-CiqrrVzr.js +1 -0
  108. package/apps/web/dist/assets/monaco-BEZSi3GX.js +1005 -0
  109. package/apps/web/dist/assets/monaco-Ced-qlZg.css +1 -0
  110. package/apps/web/dist/assets/msdax-DmeGPVcC.js +1 -0
  111. package/apps/web/dist/assets/mysql-C_tMU-Nz.js +1 -0
  112. package/apps/web/dist/assets/objective-c-BDtDVThU.js +1 -0
  113. package/apps/web/dist/assets/pascal-vHIfCaH5.js +1 -0
  114. package/apps/web/dist/assets/pascaligo-DtZ0uQbO.js +1 -0
  115. package/apps/web/dist/assets/perl-Ub6l9XKa.js +1 -0
  116. package/apps/web/dist/assets/pgsql-BlNEE0v7.js +1 -0
  117. package/apps/web/dist/assets/php-BBUBE1dy.js +1 -0
  118. package/apps/web/dist/assets/pla-DSh2-awV.js +1 -0
  119. package/apps/web/dist/assets/postiats-CocnycG-.js +1 -0
  120. package/apps/web/dist/assets/powerquery-tScXyioY.js +1 -0
  121. package/apps/web/dist/assets/powershell-COWaemsV.js +1 -0
  122. package/apps/web/dist/assets/protobuf-Brw8urJB.js +2 -0
  123. package/apps/web/dist/assets/pug-8SOpv6rk.js +1 -0
  124. package/apps/web/dist/assets/python-D4581wh8.js +1 -0
  125. package/apps/web/dist/assets/qsharp-Bw9ernYp.js +1 -0
  126. package/apps/web/dist/assets/r-j7ic8hl3.js +1 -0
  127. package/apps/web/dist/assets/razor-Cob92s3y.js +1 -0
  128. package/apps/web/dist/assets/redis-Bu5POkcn.js +1 -0
  129. package/apps/web/dist/assets/redshift-Bs9aos_-.js +1 -0
  130. package/apps/web/dist/assets/restructuredtext-CqXO7rUv.js +1 -0
  131. package/apps/web/dist/assets/ruby-zBfavPgS.js +1 -0
  132. package/apps/web/dist/assets/rust-BzKRNQWT.js +1 -0
  133. package/apps/web/dist/assets/sb-BBc9UKZt.js +1 -0
  134. package/apps/web/dist/assets/scala-D9hQfWCl.js +1 -0
  135. package/apps/web/dist/assets/scheme-BPhDTwHR.js +1 -0
  136. package/apps/web/dist/assets/scss-CBJaRo0y.js +3 -0
  137. package/apps/web/dist/assets/shell-DiJ1NA_G.js +1 -0
  138. package/apps/web/dist/assets/solidity-Db0IVjzk.js +1 -0
  139. package/apps/web/dist/assets/sophia-CnS9iZB_.js +1 -0
  140. package/apps/web/dist/assets/sparql-CJmd_6j2.js +1 -0
  141. package/apps/web/dist/assets/sql-ClhHkBeG.js +1 -0
  142. package/apps/web/dist/assets/st-CHwy0fLd.js +1 -0
  143. package/apps/web/dist/assets/swift-CnmFD0ga.js +1 -0
  144. package/apps/web/dist/assets/systemverilog-Bs9z6M-B.js +1 -0
  145. package/apps/web/dist/assets/tcl-Dm6ycUr_.js +1 -0
  146. package/apps/web/dist/assets/ts.worker-BrLZGe_E.js +67722 -0
  147. package/apps/web/dist/assets/tsMode-WJsr57wC.js +11 -0
  148. package/apps/web/dist/assets/twig-Csy3S7wG.js +1 -0
  149. package/apps/web/dist/assets/typescript-8M7GiCNW.js +1 -0
  150. package/apps/web/dist/assets/typespec-Btyra-wh.js +1 -0
  151. package/apps/web/dist/assets/vb-Db0cS2oM.js +1 -0
  152. package/apps/web/dist/assets/wgsl-BTesnYfV.js +298 -0
  153. package/apps/web/dist/assets/workers-FOC7l7Wh.js +1 -0
  154. package/apps/web/dist/assets/xml-Hm5ZZqOZ.js +1 -0
  155. package/apps/web/dist/assets/yaml-E7sEyvM5.js +1 -0
  156. package/apps/web/dist/favicon.svg +4 -0
  157. package/apps/web/dist/index.html +15 -0
  158. package/docs/README.md +26 -0
  159. package/docs/guides/install.md +63 -0
  160. package/package.json +94 -4
@@ -0,0 +1,4960 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "b0dfc4e9-d9cc-406a-8e6e-ed4c9d185177",
5
+ "prevId": "10d6e3fc-c8cc-447b-99e2-a58430856033",
6
+ "tables": {
7
+ "agent_events": {
8
+ "name": "agent_events",
9
+ "columns": {
10
+ "id": {
11
+ "name": "id",
12
+ "type": "text",
13
+ "primaryKey": true,
14
+ "notNull": true,
15
+ "autoincrement": false
16
+ },
17
+ "session_id": {
18
+ "name": "session_id",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true,
22
+ "autoincrement": false
23
+ },
24
+ "turn_id": {
25
+ "name": "turn_id",
26
+ "type": "text",
27
+ "primaryKey": false,
28
+ "notNull": false,
29
+ "autoincrement": false
30
+ },
31
+ "seq": {
32
+ "name": "seq",
33
+ "type": "integer",
34
+ "primaryKey": false,
35
+ "notNull": true,
36
+ "autoincrement": false
37
+ },
38
+ "type": {
39
+ "name": "type",
40
+ "type": "text",
41
+ "primaryKey": false,
42
+ "notNull": true,
43
+ "autoincrement": false
44
+ },
45
+ "payload_json": {
46
+ "name": "payload_json",
47
+ "type": "text",
48
+ "primaryKey": false,
49
+ "notNull": true,
50
+ "autoincrement": false,
51
+ "default": "'{}'"
52
+ },
53
+ "created_at": {
54
+ "name": "created_at",
55
+ "type": "integer",
56
+ "primaryKey": false,
57
+ "notNull": true,
58
+ "autoincrement": false
59
+ }
60
+ },
61
+ "indexes": {
62
+ "agent_events_session_seq_unique": {
63
+ "name": "agent_events_session_seq_unique",
64
+ "columns": ["session_id", "seq"],
65
+ "isUnique": true
66
+ }
67
+ },
68
+ "foreignKeys": {
69
+ "agent_events_session_id_sessions_id_fk": {
70
+ "name": "agent_events_session_id_sessions_id_fk",
71
+ "tableFrom": "agent_events",
72
+ "tableTo": "sessions",
73
+ "columnsFrom": ["session_id"],
74
+ "columnsTo": ["id"],
75
+ "onDelete": "cascade",
76
+ "onUpdate": "no action"
77
+ },
78
+ "agent_events_turn_id_turns_id_fk": {
79
+ "name": "agent_events_turn_id_turns_id_fk",
80
+ "tableFrom": "agent_events",
81
+ "tableTo": "turns",
82
+ "columnsFrom": ["turn_id"],
83
+ "columnsTo": ["id"],
84
+ "onDelete": "cascade",
85
+ "onUpdate": "no action"
86
+ }
87
+ },
88
+ "compositePrimaryKeys": {},
89
+ "uniqueConstraints": {},
90
+ "checkConstraints": {}
91
+ },
92
+ "app_meta": {
93
+ "name": "app_meta",
94
+ "columns": {
95
+ "key": {
96
+ "name": "key",
97
+ "type": "text",
98
+ "primaryKey": true,
99
+ "notNull": true,
100
+ "autoincrement": false
101
+ },
102
+ "value": {
103
+ "name": "value",
104
+ "type": "text",
105
+ "primaryKey": false,
106
+ "notNull": true,
107
+ "autoincrement": false
108
+ },
109
+ "updated_at": {
110
+ "name": "updated_at",
111
+ "type": "integer",
112
+ "primaryKey": false,
113
+ "notNull": true,
114
+ "autoincrement": false
115
+ }
116
+ },
117
+ "indexes": {},
118
+ "foreignKeys": {},
119
+ "compositePrimaryKeys": {},
120
+ "uniqueConstraints": {},
121
+ "checkConstraints": {}
122
+ },
123
+ "approvals": {
124
+ "name": "approvals",
125
+ "columns": {
126
+ "id": {
127
+ "name": "id",
128
+ "type": "text",
129
+ "primaryKey": true,
130
+ "notNull": true,
131
+ "autoincrement": false
132
+ },
133
+ "turn_id": {
134
+ "name": "turn_id",
135
+ "type": "text",
136
+ "primaryKey": false,
137
+ "notNull": true,
138
+ "autoincrement": false
139
+ },
140
+ "tool_call_id": {
141
+ "name": "tool_call_id",
142
+ "type": "text",
143
+ "primaryKey": false,
144
+ "notNull": true,
145
+ "autoincrement": false
146
+ },
147
+ "tool_name": {
148
+ "name": "tool_name",
149
+ "type": "text",
150
+ "primaryKey": false,
151
+ "notNull": true,
152
+ "autoincrement": false
153
+ },
154
+ "risk": {
155
+ "name": "risk",
156
+ "type": "text",
157
+ "primaryKey": false,
158
+ "notNull": true,
159
+ "autoincrement": false
160
+ },
161
+ "status": {
162
+ "name": "status",
163
+ "type": "text",
164
+ "primaryKey": false,
165
+ "notNull": true,
166
+ "autoincrement": false,
167
+ "default": "'pending'"
168
+ },
169
+ "scope_json": {
170
+ "name": "scope_json",
171
+ "type": "text",
172
+ "primaryKey": false,
173
+ "notNull": true,
174
+ "autoincrement": false,
175
+ "default": "'{}'"
176
+ },
177
+ "params_hash": {
178
+ "name": "params_hash",
179
+ "type": "text",
180
+ "primaryKey": false,
181
+ "notNull": true,
182
+ "autoincrement": false
183
+ },
184
+ "expires_at": {
185
+ "name": "expires_at",
186
+ "type": "integer",
187
+ "primaryKey": false,
188
+ "notNull": true,
189
+ "autoincrement": false
190
+ },
191
+ "decided_at": {
192
+ "name": "decided_at",
193
+ "type": "integer",
194
+ "primaryKey": false,
195
+ "notNull": false,
196
+ "autoincrement": false
197
+ },
198
+ "decided_by": {
199
+ "name": "decided_by",
200
+ "type": "text",
201
+ "primaryKey": false,
202
+ "notNull": false,
203
+ "autoincrement": false
204
+ },
205
+ "created_at": {
206
+ "name": "created_at",
207
+ "type": "integer",
208
+ "primaryKey": false,
209
+ "notNull": true,
210
+ "autoincrement": false
211
+ }
212
+ },
213
+ "indexes": {
214
+ "idx_approvals_turn_status": {
215
+ "name": "idx_approvals_turn_status",
216
+ "columns": ["turn_id", "status"],
217
+ "isUnique": false
218
+ },
219
+ "idx_approvals_expiry": {
220
+ "name": "idx_approvals_expiry",
221
+ "columns": ["expires_at"],
222
+ "isUnique": false
223
+ }
224
+ },
225
+ "foreignKeys": {
226
+ "approvals_turn_id_turns_id_fk": {
227
+ "name": "approvals_turn_id_turns_id_fk",
228
+ "tableFrom": "approvals",
229
+ "tableTo": "turns",
230
+ "columnsFrom": ["turn_id"],
231
+ "columnsTo": ["id"],
232
+ "onDelete": "cascade",
233
+ "onUpdate": "no action"
234
+ }
235
+ },
236
+ "compositePrimaryKeys": {},
237
+ "uniqueConstraints": {},
238
+ "checkConstraints": {}
239
+ },
240
+ "audit_logs": {
241
+ "name": "audit_logs",
242
+ "columns": {
243
+ "id": {
244
+ "name": "id",
245
+ "type": "text",
246
+ "primaryKey": true,
247
+ "notNull": true,
248
+ "autoincrement": false
249
+ },
250
+ "client_session_id": {
251
+ "name": "client_session_id",
252
+ "type": "text",
253
+ "primaryKey": false,
254
+ "notNull": false,
255
+ "autoincrement": false
256
+ },
257
+ "session_id": {
258
+ "name": "session_id",
259
+ "type": "text",
260
+ "primaryKey": false,
261
+ "notNull": false,
262
+ "autoincrement": false
263
+ },
264
+ "action": {
265
+ "name": "action",
266
+ "type": "text",
267
+ "primaryKey": false,
268
+ "notNull": true,
269
+ "autoincrement": false
270
+ },
271
+ "resource_type": {
272
+ "name": "resource_type",
273
+ "type": "text",
274
+ "primaryKey": false,
275
+ "notNull": false,
276
+ "autoincrement": false
277
+ },
278
+ "resource_id": {
279
+ "name": "resource_id",
280
+ "type": "text",
281
+ "primaryKey": false,
282
+ "notNull": false,
283
+ "autoincrement": false
284
+ },
285
+ "decision": {
286
+ "name": "decision",
287
+ "type": "text",
288
+ "primaryKey": false,
289
+ "notNull": false,
290
+ "autoincrement": false
291
+ },
292
+ "details_json": {
293
+ "name": "details_json",
294
+ "type": "text",
295
+ "primaryKey": false,
296
+ "notNull": true,
297
+ "autoincrement": false,
298
+ "default": "'{}'"
299
+ },
300
+ "created_at": {
301
+ "name": "created_at",
302
+ "type": "integer",
303
+ "primaryKey": false,
304
+ "notNull": true,
305
+ "autoincrement": false
306
+ }
307
+ },
308
+ "indexes": {
309
+ "idx_audit_created": {
310
+ "name": "idx_audit_created",
311
+ "columns": ["created_at"],
312
+ "isUnique": false
313
+ },
314
+ "idx_audit_action": {
315
+ "name": "idx_audit_action",
316
+ "columns": ["action", "created_at"],
317
+ "isUnique": false
318
+ }
319
+ },
320
+ "foreignKeys": {},
321
+ "compositePrimaryKeys": {},
322
+ "uniqueConstraints": {},
323
+ "checkConstraints": {}
324
+ },
325
+ "auth_settings": {
326
+ "name": "auth_settings",
327
+ "columns": {
328
+ "id": {
329
+ "name": "id",
330
+ "type": "integer",
331
+ "primaryKey": true,
332
+ "notNull": true,
333
+ "autoincrement": false
334
+ },
335
+ "admin_hash": {
336
+ "name": "admin_hash",
337
+ "type": "text",
338
+ "primaryKey": false,
339
+ "notNull": true,
340
+ "autoincrement": false
341
+ },
342
+ "admin_updated_at": {
343
+ "name": "admin_updated_at",
344
+ "type": "integer",
345
+ "primaryKey": false,
346
+ "notNull": true,
347
+ "autoincrement": false
348
+ },
349
+ "initialized_at": {
350
+ "name": "initialized_at",
351
+ "type": "integer",
352
+ "primaryKey": false,
353
+ "notNull": true,
354
+ "autoincrement": false
355
+ }
356
+ },
357
+ "indexes": {},
358
+ "foreignKeys": {},
359
+ "compositePrimaryKeys": {},
360
+ "uniqueConstraints": {},
361
+ "checkConstraints": {
362
+ "auth_settings_single_row": {
363
+ "name": "auth_settings_single_row",
364
+ "value": "\"auth_settings\".\"id\" = 1"
365
+ }
366
+ }
367
+ },
368
+ "browser_sessions": {
369
+ "name": "browser_sessions",
370
+ "columns": {
371
+ "id": {
372
+ "name": "id",
373
+ "type": "text",
374
+ "primaryKey": true,
375
+ "notNull": true,
376
+ "autoincrement": false
377
+ },
378
+ "device_id": {
379
+ "name": "device_id",
380
+ "type": "text",
381
+ "primaryKey": false,
382
+ "notNull": false,
383
+ "autoincrement": false
384
+ },
385
+ "token_hash": {
386
+ "name": "token_hash",
387
+ "type": "text",
388
+ "primaryKey": false,
389
+ "notNull": true,
390
+ "autoincrement": false
391
+ },
392
+ "kind": {
393
+ "name": "kind",
394
+ "type": "text",
395
+ "primaryKey": false,
396
+ "notNull": true,
397
+ "autoincrement": false
398
+ },
399
+ "ip": {
400
+ "name": "ip",
401
+ "type": "text",
402
+ "primaryKey": false,
403
+ "notNull": false,
404
+ "autoincrement": false
405
+ },
406
+ "user_agent": {
407
+ "name": "user_agent",
408
+ "type": "text",
409
+ "primaryKey": false,
410
+ "notNull": false,
411
+ "autoincrement": false
412
+ },
413
+ "created_at": {
414
+ "name": "created_at",
415
+ "type": "integer",
416
+ "primaryKey": false,
417
+ "notNull": true,
418
+ "autoincrement": false
419
+ },
420
+ "last_seen_at": {
421
+ "name": "last_seen_at",
422
+ "type": "integer",
423
+ "primaryKey": false,
424
+ "notNull": true,
425
+ "autoincrement": false
426
+ },
427
+ "expires_at": {
428
+ "name": "expires_at",
429
+ "type": "integer",
430
+ "primaryKey": false,
431
+ "notNull": true,
432
+ "autoincrement": false
433
+ },
434
+ "revoked_at": {
435
+ "name": "revoked_at",
436
+ "type": "integer",
437
+ "primaryKey": false,
438
+ "notNull": false,
439
+ "autoincrement": false
440
+ }
441
+ },
442
+ "indexes": {
443
+ "browser_sessions_token_hash_unique": {
444
+ "name": "browser_sessions_token_hash_unique",
445
+ "columns": ["token_hash"],
446
+ "isUnique": true
447
+ },
448
+ "idx_browser_sessions_device": {
449
+ "name": "idx_browser_sessions_device",
450
+ "columns": ["device_id"],
451
+ "isUnique": false
452
+ }
453
+ },
454
+ "foreignKeys": {
455
+ "browser_sessions_device_id_trusted_devices_id_fk": {
456
+ "name": "browser_sessions_device_id_trusted_devices_id_fk",
457
+ "tableFrom": "browser_sessions",
458
+ "tableTo": "trusted_devices",
459
+ "columnsFrom": ["device_id"],
460
+ "columnsTo": ["id"],
461
+ "onDelete": "no action",
462
+ "onUpdate": "no action"
463
+ }
464
+ },
465
+ "compositePrimaryKeys": {},
466
+ "uniqueConstraints": {},
467
+ "checkConstraints": {}
468
+ },
469
+ "command_executions": {
470
+ "name": "command_executions",
471
+ "columns": {
472
+ "id": {
473
+ "name": "id",
474
+ "type": "text",
475
+ "primaryKey": true,
476
+ "notNull": true,
477
+ "autoincrement": false
478
+ },
479
+ "operation_id": {
480
+ "name": "operation_id",
481
+ "type": "text",
482
+ "primaryKey": false,
483
+ "notNull": true,
484
+ "autoincrement": false
485
+ },
486
+ "project_id": {
487
+ "name": "project_id",
488
+ "type": "text",
489
+ "primaryKey": false,
490
+ "notNull": false,
491
+ "autoincrement": false
492
+ },
493
+ "workspace_session_id": {
494
+ "name": "workspace_session_id",
495
+ "type": "text",
496
+ "primaryKey": false,
497
+ "notNull": false,
498
+ "autoincrement": false
499
+ },
500
+ "session_id": {
501
+ "name": "session_id",
502
+ "type": "text",
503
+ "primaryKey": false,
504
+ "notNull": true,
505
+ "autoincrement": false
506
+ },
507
+ "turn_id": {
508
+ "name": "turn_id",
509
+ "type": "text",
510
+ "primaryKey": false,
511
+ "notNull": true,
512
+ "autoincrement": false
513
+ },
514
+ "tool_call_id": {
515
+ "name": "tool_call_id",
516
+ "type": "text",
517
+ "primaryKey": false,
518
+ "notNull": true,
519
+ "autoincrement": false
520
+ },
521
+ "policy_snapshot_id": {
522
+ "name": "policy_snapshot_id",
523
+ "type": "text",
524
+ "primaryKey": false,
525
+ "notNull": true,
526
+ "autoincrement": false
527
+ },
528
+ "params_hash": {
529
+ "name": "params_hash",
530
+ "type": "text",
531
+ "primaryKey": false,
532
+ "notNull": true,
533
+ "autoincrement": false
534
+ },
535
+ "status": {
536
+ "name": "status",
537
+ "type": "text",
538
+ "primaryKey": false,
539
+ "notNull": true,
540
+ "autoincrement": false
541
+ },
542
+ "exit_code": {
543
+ "name": "exit_code",
544
+ "type": "integer",
545
+ "primaryKey": false,
546
+ "notNull": false,
547
+ "autoincrement": false
548
+ },
549
+ "reason_code": {
550
+ "name": "reason_code",
551
+ "type": "text",
552
+ "primaryKey": false,
553
+ "notNull": false,
554
+ "autoincrement": false
555
+ },
556
+ "truncated": {
557
+ "name": "truncated",
558
+ "type": "integer",
559
+ "primaryKey": false,
560
+ "notNull": true,
561
+ "autoincrement": false,
562
+ "default": false
563
+ },
564
+ "process_identity_json": {
565
+ "name": "process_identity_json",
566
+ "type": "text",
567
+ "primaryKey": false,
568
+ "notNull": false,
569
+ "autoincrement": false
570
+ },
571
+ "output_cursor": {
572
+ "name": "output_cursor",
573
+ "type": "integer",
574
+ "primaryKey": false,
575
+ "notNull": true,
576
+ "autoincrement": false,
577
+ "default": 0
578
+ },
579
+ "created_at": {
580
+ "name": "created_at",
581
+ "type": "integer",
582
+ "primaryKey": false,
583
+ "notNull": true,
584
+ "autoincrement": false
585
+ },
586
+ "started_at": {
587
+ "name": "started_at",
588
+ "type": "integer",
589
+ "primaryKey": false,
590
+ "notNull": false,
591
+ "autoincrement": false
592
+ },
593
+ "ended_at": {
594
+ "name": "ended_at",
595
+ "type": "integer",
596
+ "primaryKey": false,
597
+ "notNull": false,
598
+ "autoincrement": false
599
+ }
600
+ },
601
+ "indexes": {
602
+ "command_executions_operation": {
603
+ "name": "command_executions_operation",
604
+ "columns": ["operation_id"],
605
+ "isUnique": true
606
+ },
607
+ "command_executions_status": {
608
+ "name": "command_executions_status",
609
+ "columns": ["status"],
610
+ "isUnique": false
611
+ }
612
+ },
613
+ "foreignKeys": {
614
+ "command_executions_operation_id_resource_operations_id_fk": {
615
+ "name": "command_executions_operation_id_resource_operations_id_fk",
616
+ "tableFrom": "command_executions",
617
+ "tableTo": "resource_operations",
618
+ "columnsFrom": ["operation_id"],
619
+ "columnsTo": ["id"],
620
+ "onDelete": "no action",
621
+ "onUpdate": "no action"
622
+ }
623
+ },
624
+ "compositePrimaryKeys": {},
625
+ "uniqueConstraints": {},
626
+ "checkConstraints": {}
627
+ },
628
+ "credential_profiles": {
629
+ "name": "credential_profiles",
630
+ "columns": {
631
+ "id": {
632
+ "name": "id",
633
+ "type": "text",
634
+ "primaryKey": true,
635
+ "notNull": true,
636
+ "autoincrement": false
637
+ },
638
+ "provider": {
639
+ "name": "provider",
640
+ "type": "text",
641
+ "primaryKey": false,
642
+ "notNull": true,
643
+ "autoincrement": false
644
+ },
645
+ "label": {
646
+ "name": "label",
647
+ "type": "text",
648
+ "primaryKey": false,
649
+ "notNull": true,
650
+ "autoincrement": false
651
+ },
652
+ "secret_ref": {
653
+ "name": "secret_ref",
654
+ "type": "text",
655
+ "primaryKey": false,
656
+ "notNull": true,
657
+ "autoincrement": false
658
+ },
659
+ "endpoint": {
660
+ "name": "endpoint",
661
+ "type": "text",
662
+ "primaryKey": false,
663
+ "notNull": false,
664
+ "autoincrement": false
665
+ },
666
+ "context_window": {
667
+ "name": "context_window",
668
+ "type": "integer",
669
+ "primaryKey": false,
670
+ "notNull": false,
671
+ "autoincrement": false
672
+ },
673
+ "created_at": {
674
+ "name": "created_at",
675
+ "type": "integer",
676
+ "primaryKey": false,
677
+ "notNull": true,
678
+ "autoincrement": false
679
+ }
680
+ },
681
+ "indexes": {
682
+ "idx_credential_profiles_provider": {
683
+ "name": "idx_credential_profiles_provider",
684
+ "columns": ["provider"],
685
+ "isUnique": false
686
+ }
687
+ },
688
+ "foreignKeys": {
689
+ "credential_profiles_secret_ref_secrets_id_fk": {
690
+ "name": "credential_profiles_secret_ref_secrets_id_fk",
691
+ "tableFrom": "credential_profiles",
692
+ "tableTo": "secrets",
693
+ "columnsFrom": ["secret_ref"],
694
+ "columnsTo": ["id"],
695
+ "onDelete": "cascade",
696
+ "onUpdate": "no action"
697
+ }
698
+ },
699
+ "compositePrimaryKeys": {},
700
+ "uniqueConstraints": {},
701
+ "checkConstraints": {}
702
+ },
703
+ "deployment_approvals": {
704
+ "name": "deployment_approvals",
705
+ "columns": {
706
+ "id": {
707
+ "name": "id",
708
+ "type": "text",
709
+ "primaryKey": true,
710
+ "notNull": true,
711
+ "autoincrement": false
712
+ },
713
+ "authorization_id": {
714
+ "name": "authorization_id",
715
+ "type": "text",
716
+ "primaryKey": false,
717
+ "notNull": true,
718
+ "autoincrement": false
719
+ },
720
+ "plan_id": {
721
+ "name": "plan_id",
722
+ "type": "text",
723
+ "primaryKey": false,
724
+ "notNull": true,
725
+ "autoincrement": false
726
+ },
727
+ "target_id": {
728
+ "name": "target_id",
729
+ "type": "text",
730
+ "primaryKey": false,
731
+ "notNull": true,
732
+ "autoincrement": false
733
+ },
734
+ "project_id": {
735
+ "name": "project_id",
736
+ "type": "text",
737
+ "primaryKey": false,
738
+ "notNull": true,
739
+ "autoincrement": false
740
+ },
741
+ "status": {
742
+ "name": "status",
743
+ "type": "text",
744
+ "primaryKey": false,
745
+ "notNull": true,
746
+ "autoincrement": false
747
+ },
748
+ "plan_hash": {
749
+ "name": "plan_hash",
750
+ "type": "text",
751
+ "primaryKey": false,
752
+ "notNull": true,
753
+ "autoincrement": false
754
+ },
755
+ "artifact_hash": {
756
+ "name": "artifact_hash",
757
+ "type": "text",
758
+ "primaryKey": false,
759
+ "notNull": true,
760
+ "autoincrement": false
761
+ },
762
+ "requested_by": {
763
+ "name": "requested_by",
764
+ "type": "text",
765
+ "primaryKey": false,
766
+ "notNull": true,
767
+ "autoincrement": false
768
+ },
769
+ "decided_by": {
770
+ "name": "decided_by",
771
+ "type": "text",
772
+ "primaryKey": false,
773
+ "notNull": false,
774
+ "autoincrement": false
775
+ },
776
+ "expires_at": {
777
+ "name": "expires_at",
778
+ "type": "integer",
779
+ "primaryKey": false,
780
+ "notNull": true,
781
+ "autoincrement": false
782
+ },
783
+ "decided_at": {
784
+ "name": "decided_at",
785
+ "type": "integer",
786
+ "primaryKey": false,
787
+ "notNull": false,
788
+ "autoincrement": false
789
+ },
790
+ "created_at": {
791
+ "name": "created_at",
792
+ "type": "integer",
793
+ "primaryKey": false,
794
+ "notNull": true,
795
+ "autoincrement": false
796
+ }
797
+ },
798
+ "indexes": {
799
+ "deployment_approvals_authorization": {
800
+ "name": "deployment_approvals_authorization",
801
+ "columns": ["authorization_id"],
802
+ "isUnique": true
803
+ },
804
+ "deployment_approvals_status_expires": {
805
+ "name": "deployment_approvals_status_expires",
806
+ "columns": ["status", "expires_at"],
807
+ "isUnique": false
808
+ }
809
+ },
810
+ "foreignKeys": {
811
+ "deployment_approvals_authorization_id_deployment_authorizations_id_fk": {
812
+ "name": "deployment_approvals_authorization_id_deployment_authorizations_id_fk",
813
+ "tableFrom": "deployment_approvals",
814
+ "tableTo": "deployment_authorizations",
815
+ "columnsFrom": ["authorization_id"],
816
+ "columnsTo": ["id"],
817
+ "onDelete": "no action",
818
+ "onUpdate": "no action"
819
+ },
820
+ "deployment_approvals_plan_id_deployment_plans_id_fk": {
821
+ "name": "deployment_approvals_plan_id_deployment_plans_id_fk",
822
+ "tableFrom": "deployment_approvals",
823
+ "tableTo": "deployment_plans",
824
+ "columnsFrom": ["plan_id"],
825
+ "columnsTo": ["id"],
826
+ "onDelete": "no action",
827
+ "onUpdate": "no action"
828
+ },
829
+ "deployment_approvals_target_id_deployment_targets_id_fk": {
830
+ "name": "deployment_approvals_target_id_deployment_targets_id_fk",
831
+ "tableFrom": "deployment_approvals",
832
+ "tableTo": "deployment_targets",
833
+ "columnsFrom": ["target_id"],
834
+ "columnsTo": ["id"],
835
+ "onDelete": "no action",
836
+ "onUpdate": "no action"
837
+ },
838
+ "deployment_approvals_project_id_projects_id_fk": {
839
+ "name": "deployment_approvals_project_id_projects_id_fk",
840
+ "tableFrom": "deployment_approvals",
841
+ "tableTo": "projects",
842
+ "columnsFrom": ["project_id"],
843
+ "columnsTo": ["id"],
844
+ "onDelete": "no action",
845
+ "onUpdate": "no action"
846
+ }
847
+ },
848
+ "compositePrimaryKeys": {},
849
+ "uniqueConstraints": {},
850
+ "checkConstraints": {
851
+ "deployment_approvals_status": {
852
+ "name": "deployment_approvals_status",
853
+ "value": "\"deployment_approvals\".\"status\" IN ('PENDING', 'APPROVED', 'DENIED', 'EXPIRED', 'REVOKED')"
854
+ },
855
+ "deployment_approvals_plan_hash": {
856
+ "name": "deployment_approvals_plan_hash",
857
+ "value": "length(\"deployment_approvals\".\"plan_hash\") = 64"
858
+ },
859
+ "deployment_approvals_artifact_hash": {
860
+ "name": "deployment_approvals_artifact_hash",
861
+ "value": "length(\"deployment_approvals\".\"artifact_hash\") = 64"
862
+ }
863
+ }
864
+ },
865
+ "deployment_artifacts": {
866
+ "name": "deployment_artifacts",
867
+ "columns": {
868
+ "id": {
869
+ "name": "id",
870
+ "type": "text",
871
+ "primaryKey": true,
872
+ "notNull": true,
873
+ "autoincrement": false
874
+ },
875
+ "build_id": {
876
+ "name": "build_id",
877
+ "type": "text",
878
+ "primaryKey": false,
879
+ "notNull": true,
880
+ "autoincrement": false
881
+ },
882
+ "target_id": {
883
+ "name": "target_id",
884
+ "type": "text",
885
+ "primaryKey": false,
886
+ "notNull": true,
887
+ "autoincrement": false
888
+ },
889
+ "project_id": {
890
+ "name": "project_id",
891
+ "type": "text",
892
+ "primaryKey": false,
893
+ "notNull": true,
894
+ "autoincrement": false
895
+ },
896
+ "version": {
897
+ "name": "version",
898
+ "type": "text",
899
+ "primaryKey": false,
900
+ "notNull": true,
901
+ "autoincrement": false
902
+ },
903
+ "artifact_hash": {
904
+ "name": "artifact_hash",
905
+ "type": "text",
906
+ "primaryKey": false,
907
+ "notNull": true,
908
+ "autoincrement": false
909
+ },
910
+ "artifact_path": {
911
+ "name": "artifact_path",
912
+ "type": "text",
913
+ "primaryKey": false,
914
+ "notNull": true,
915
+ "autoincrement": false
916
+ },
917
+ "size_bytes": {
918
+ "name": "size_bytes",
919
+ "type": "integer",
920
+ "primaryKey": false,
921
+ "notNull": true,
922
+ "autoincrement": false
923
+ },
924
+ "file_count": {
925
+ "name": "file_count",
926
+ "type": "integer",
927
+ "primaryKey": false,
928
+ "notNull": true,
929
+ "autoincrement": false
930
+ },
931
+ "spec_json": {
932
+ "name": "spec_json",
933
+ "type": "text",
934
+ "primaryKey": false,
935
+ "notNull": true,
936
+ "autoincrement": false
937
+ },
938
+ "spec_hash": {
939
+ "name": "spec_hash",
940
+ "type": "text",
941
+ "primaryKey": false,
942
+ "notNull": true,
943
+ "autoincrement": false
944
+ },
945
+ "source_json": {
946
+ "name": "source_json",
947
+ "type": "text",
948
+ "primaryKey": false,
949
+ "notNull": true,
950
+ "autoincrement": false
951
+ },
952
+ "created_at": {
953
+ "name": "created_at",
954
+ "type": "integer",
955
+ "primaryKey": false,
956
+ "notNull": true,
957
+ "autoincrement": false
958
+ }
959
+ },
960
+ "indexes": {
961
+ "deployment_artifacts_build": {
962
+ "name": "deployment_artifacts_build",
963
+ "columns": ["build_id"],
964
+ "isUnique": true
965
+ },
966
+ "deployment_artifacts_target_version": {
967
+ "name": "deployment_artifacts_target_version",
968
+ "columns": ["target_id", "version"],
969
+ "isUnique": true
970
+ },
971
+ "deployment_artifacts_target_created": {
972
+ "name": "deployment_artifacts_target_created",
973
+ "columns": ["target_id", "created_at"],
974
+ "isUnique": false
975
+ }
976
+ },
977
+ "foreignKeys": {
978
+ "deployment_artifacts_build_id_deployment_builds_id_fk": {
979
+ "name": "deployment_artifacts_build_id_deployment_builds_id_fk",
980
+ "tableFrom": "deployment_artifacts",
981
+ "tableTo": "deployment_builds",
982
+ "columnsFrom": ["build_id"],
983
+ "columnsTo": ["id"],
984
+ "onDelete": "no action",
985
+ "onUpdate": "no action"
986
+ },
987
+ "deployment_artifacts_target_id_deployment_targets_id_fk": {
988
+ "name": "deployment_artifacts_target_id_deployment_targets_id_fk",
989
+ "tableFrom": "deployment_artifacts",
990
+ "tableTo": "deployment_targets",
991
+ "columnsFrom": ["target_id"],
992
+ "columnsTo": ["id"],
993
+ "onDelete": "no action",
994
+ "onUpdate": "no action"
995
+ },
996
+ "deployment_artifacts_project_id_projects_id_fk": {
997
+ "name": "deployment_artifacts_project_id_projects_id_fk",
998
+ "tableFrom": "deployment_artifacts",
999
+ "tableTo": "projects",
1000
+ "columnsFrom": ["project_id"],
1001
+ "columnsTo": ["id"],
1002
+ "onDelete": "no action",
1003
+ "onUpdate": "no action"
1004
+ }
1005
+ },
1006
+ "compositePrimaryKeys": {},
1007
+ "uniqueConstraints": {},
1008
+ "checkConstraints": {
1009
+ "deployment_artifacts_hash": {
1010
+ "name": "deployment_artifacts_hash",
1011
+ "value": "length(\"deployment_artifacts\".\"artifact_hash\") = 64"
1012
+ },
1013
+ "deployment_artifacts_size": {
1014
+ "name": "deployment_artifacts_size",
1015
+ "value": "\"deployment_artifacts\".\"size_bytes\" >= 0"
1016
+ },
1017
+ "deployment_artifacts_count": {
1018
+ "name": "deployment_artifacts_count",
1019
+ "value": "\"deployment_artifacts\".\"file_count\" >= 0"
1020
+ }
1021
+ }
1022
+ },
1023
+ "deployment_authorizations": {
1024
+ "name": "deployment_authorizations",
1025
+ "columns": {
1026
+ "id": {
1027
+ "name": "id",
1028
+ "type": "text",
1029
+ "primaryKey": true,
1030
+ "notNull": true,
1031
+ "autoincrement": false
1032
+ },
1033
+ "plan_id": {
1034
+ "name": "plan_id",
1035
+ "type": "text",
1036
+ "primaryKey": false,
1037
+ "notNull": true,
1038
+ "autoincrement": false
1039
+ },
1040
+ "target_id": {
1041
+ "name": "target_id",
1042
+ "type": "text",
1043
+ "primaryKey": false,
1044
+ "notNull": true,
1045
+ "autoincrement": false
1046
+ },
1047
+ "project_id": {
1048
+ "name": "project_id",
1049
+ "type": "text",
1050
+ "primaryKey": false,
1051
+ "notNull": true,
1052
+ "autoincrement": false
1053
+ },
1054
+ "action": {
1055
+ "name": "action",
1056
+ "type": "text",
1057
+ "primaryKey": false,
1058
+ "notNull": true,
1059
+ "autoincrement": false
1060
+ },
1061
+ "actor_type": {
1062
+ "name": "actor_type",
1063
+ "type": "text",
1064
+ "primaryKey": false,
1065
+ "notNull": true,
1066
+ "autoincrement": false
1067
+ },
1068
+ "actor_id": {
1069
+ "name": "actor_id",
1070
+ "type": "text",
1071
+ "primaryKey": false,
1072
+ "notNull": true,
1073
+ "autoincrement": false
1074
+ },
1075
+ "client_session_id": {
1076
+ "name": "client_session_id",
1077
+ "type": "text",
1078
+ "primaryKey": false,
1079
+ "notNull": false,
1080
+ "autoincrement": false
1081
+ },
1082
+ "session_id": {
1083
+ "name": "session_id",
1084
+ "type": "text",
1085
+ "primaryKey": false,
1086
+ "notNull": false,
1087
+ "autoincrement": false
1088
+ },
1089
+ "turn_id": {
1090
+ "name": "turn_id",
1091
+ "type": "text",
1092
+ "primaryKey": false,
1093
+ "notNull": false,
1094
+ "autoincrement": false
1095
+ },
1096
+ "policy": {
1097
+ "name": "policy",
1098
+ "type": "text",
1099
+ "primaryKey": false,
1100
+ "notNull": true,
1101
+ "autoincrement": false
1102
+ },
1103
+ "policy_snapshot_id": {
1104
+ "name": "policy_snapshot_id",
1105
+ "type": "text",
1106
+ "primaryKey": false,
1107
+ "notNull": true,
1108
+ "autoincrement": false
1109
+ },
1110
+ "status": {
1111
+ "name": "status",
1112
+ "type": "text",
1113
+ "primaryKey": false,
1114
+ "notNull": true,
1115
+ "autoincrement": false
1116
+ },
1117
+ "plan_hash": {
1118
+ "name": "plan_hash",
1119
+ "type": "text",
1120
+ "primaryKey": false,
1121
+ "notNull": true,
1122
+ "autoincrement": false
1123
+ },
1124
+ "artifact_hash": {
1125
+ "name": "artifact_hash",
1126
+ "type": "text",
1127
+ "primaryKey": false,
1128
+ "notNull": true,
1129
+ "autoincrement": false
1130
+ },
1131
+ "scope_json": {
1132
+ "name": "scope_json",
1133
+ "type": "text",
1134
+ "primaryKey": false,
1135
+ "notNull": true,
1136
+ "autoincrement": false
1137
+ },
1138
+ "scope_hash": {
1139
+ "name": "scope_hash",
1140
+ "type": "text",
1141
+ "primaryKey": false,
1142
+ "notNull": true,
1143
+ "autoincrement": false
1144
+ },
1145
+ "approval_id": {
1146
+ "name": "approval_id",
1147
+ "type": "text",
1148
+ "primaryKey": false,
1149
+ "notNull": false,
1150
+ "autoincrement": false
1151
+ },
1152
+ "request_key": {
1153
+ "name": "request_key",
1154
+ "type": "text",
1155
+ "primaryKey": false,
1156
+ "notNull": true,
1157
+ "autoincrement": false
1158
+ },
1159
+ "expires_at": {
1160
+ "name": "expires_at",
1161
+ "type": "integer",
1162
+ "primaryKey": false,
1163
+ "notNull": true,
1164
+ "autoincrement": false
1165
+ },
1166
+ "decided_at": {
1167
+ "name": "decided_at",
1168
+ "type": "integer",
1169
+ "primaryKey": false,
1170
+ "notNull": false,
1171
+ "autoincrement": false
1172
+ },
1173
+ "consumed_at": {
1174
+ "name": "consumed_at",
1175
+ "type": "integer",
1176
+ "primaryKey": false,
1177
+ "notNull": false,
1178
+ "autoincrement": false
1179
+ },
1180
+ "consume_key": {
1181
+ "name": "consume_key",
1182
+ "type": "text",
1183
+ "primaryKey": false,
1184
+ "notNull": false,
1185
+ "autoincrement": false
1186
+ },
1187
+ "reason_code": {
1188
+ "name": "reason_code",
1189
+ "type": "text",
1190
+ "primaryKey": false,
1191
+ "notNull": false,
1192
+ "autoincrement": false
1193
+ },
1194
+ "created_at": {
1195
+ "name": "created_at",
1196
+ "type": "integer",
1197
+ "primaryKey": false,
1198
+ "notNull": true,
1199
+ "autoincrement": false
1200
+ }
1201
+ },
1202
+ "indexes": {
1203
+ "deployment_authorizations_request": {
1204
+ "name": "deployment_authorizations_request",
1205
+ "columns": ["request_key"],
1206
+ "isUnique": true
1207
+ },
1208
+ "deployment_authorizations_plan_status": {
1209
+ "name": "deployment_authorizations_plan_status",
1210
+ "columns": ["plan_id", "status"],
1211
+ "isUnique": false
1212
+ },
1213
+ "deployment_authorizations_target_status": {
1214
+ "name": "deployment_authorizations_target_status",
1215
+ "columns": ["target_id", "status"],
1216
+ "isUnique": false
1217
+ },
1218
+ "deployment_authorizations_status_expires": {
1219
+ "name": "deployment_authorizations_status_expires",
1220
+ "columns": ["status", "expires_at"],
1221
+ "isUnique": false
1222
+ }
1223
+ },
1224
+ "foreignKeys": {
1225
+ "deployment_authorizations_plan_id_deployment_plans_id_fk": {
1226
+ "name": "deployment_authorizations_plan_id_deployment_plans_id_fk",
1227
+ "tableFrom": "deployment_authorizations",
1228
+ "tableTo": "deployment_plans",
1229
+ "columnsFrom": ["plan_id"],
1230
+ "columnsTo": ["id"],
1231
+ "onDelete": "no action",
1232
+ "onUpdate": "no action"
1233
+ },
1234
+ "deployment_authorizations_target_id_deployment_targets_id_fk": {
1235
+ "name": "deployment_authorizations_target_id_deployment_targets_id_fk",
1236
+ "tableFrom": "deployment_authorizations",
1237
+ "tableTo": "deployment_targets",
1238
+ "columnsFrom": ["target_id"],
1239
+ "columnsTo": ["id"],
1240
+ "onDelete": "no action",
1241
+ "onUpdate": "no action"
1242
+ },
1243
+ "deployment_authorizations_project_id_projects_id_fk": {
1244
+ "name": "deployment_authorizations_project_id_projects_id_fk",
1245
+ "tableFrom": "deployment_authorizations",
1246
+ "tableTo": "projects",
1247
+ "columnsFrom": ["project_id"],
1248
+ "columnsTo": ["id"],
1249
+ "onDelete": "no action",
1250
+ "onUpdate": "no action"
1251
+ }
1252
+ },
1253
+ "compositePrimaryKeys": {},
1254
+ "uniqueConstraints": {},
1255
+ "checkConstraints": {
1256
+ "deployment_authorizations_action": {
1257
+ "name": "deployment_authorizations_action",
1258
+ "value": "\"deployment_authorizations\".\"action\" = 'apply'"
1259
+ },
1260
+ "deployment_authorizations_actor": {
1261
+ "name": "deployment_authorizations_actor",
1262
+ "value": "\"deployment_authorizations\".\"actor_type\" IN ('human', 'agent')"
1263
+ },
1264
+ "deployment_authorizations_policy": {
1265
+ "name": "deployment_authorizations_policy",
1266
+ "value": "\"deployment_authorizations\".\"policy\" IN ('standard', 'strict', 'readonly', 'autonomous')"
1267
+ },
1268
+ "deployment_authorizations_status": {
1269
+ "name": "deployment_authorizations_status",
1270
+ "value": "\"deployment_authorizations\".\"status\" IN ('PENDING', 'AUTHORIZED', 'DENIED', 'EXPIRED', 'REVOKED', 'CONSUMED', 'INVALIDATED')"
1271
+ },
1272
+ "deployment_authorizations_plan_hash": {
1273
+ "name": "deployment_authorizations_plan_hash",
1274
+ "value": "length(\"deployment_authorizations\".\"plan_hash\") = 64"
1275
+ },
1276
+ "deployment_authorizations_artifact_hash": {
1277
+ "name": "deployment_authorizations_artifact_hash",
1278
+ "value": "length(\"deployment_authorizations\".\"artifact_hash\") = 64"
1279
+ },
1280
+ "deployment_authorizations_scope_hash": {
1281
+ "name": "deployment_authorizations_scope_hash",
1282
+ "value": "length(\"deployment_authorizations\".\"scope_hash\") = 64"
1283
+ }
1284
+ }
1285
+ },
1286
+ "deployment_builds": {
1287
+ "name": "deployment_builds",
1288
+ "columns": {
1289
+ "id": {
1290
+ "name": "id",
1291
+ "type": "text",
1292
+ "primaryKey": true,
1293
+ "notNull": true,
1294
+ "autoincrement": false
1295
+ },
1296
+ "target_id": {
1297
+ "name": "target_id",
1298
+ "type": "text",
1299
+ "primaryKey": false,
1300
+ "notNull": true,
1301
+ "autoincrement": false
1302
+ },
1303
+ "project_id": {
1304
+ "name": "project_id",
1305
+ "type": "text",
1306
+ "primaryKey": false,
1307
+ "notNull": true,
1308
+ "autoincrement": false
1309
+ },
1310
+ "request_key": {
1311
+ "name": "request_key",
1312
+ "type": "text",
1313
+ "primaryKey": false,
1314
+ "notNull": true,
1315
+ "autoincrement": false
1316
+ },
1317
+ "requested_by": {
1318
+ "name": "requested_by",
1319
+ "type": "text",
1320
+ "primaryKey": false,
1321
+ "notNull": true,
1322
+ "autoincrement": false
1323
+ },
1324
+ "status": {
1325
+ "name": "status",
1326
+ "type": "text",
1327
+ "primaryKey": false,
1328
+ "notNull": true,
1329
+ "autoincrement": false
1330
+ },
1331
+ "spec_json": {
1332
+ "name": "spec_json",
1333
+ "type": "text",
1334
+ "primaryKey": false,
1335
+ "notNull": true,
1336
+ "autoincrement": false
1337
+ },
1338
+ "spec_hash": {
1339
+ "name": "spec_hash",
1340
+ "type": "text",
1341
+ "primaryKey": false,
1342
+ "notNull": true,
1343
+ "autoincrement": false
1344
+ },
1345
+ "reason_code": {
1346
+ "name": "reason_code",
1347
+ "type": "text",
1348
+ "primaryKey": false,
1349
+ "notNull": false,
1350
+ "autoincrement": false
1351
+ },
1352
+ "log_ref": {
1353
+ "name": "log_ref",
1354
+ "type": "text",
1355
+ "primaryKey": false,
1356
+ "notNull": true,
1357
+ "autoincrement": false
1358
+ },
1359
+ "started_at": {
1360
+ "name": "started_at",
1361
+ "type": "integer",
1362
+ "primaryKey": false,
1363
+ "notNull": false,
1364
+ "autoincrement": false
1365
+ },
1366
+ "ended_at": {
1367
+ "name": "ended_at",
1368
+ "type": "integer",
1369
+ "primaryKey": false,
1370
+ "notNull": false,
1371
+ "autoincrement": false
1372
+ },
1373
+ "created_at": {
1374
+ "name": "created_at",
1375
+ "type": "integer",
1376
+ "primaryKey": false,
1377
+ "notNull": true,
1378
+ "autoincrement": false
1379
+ }
1380
+ },
1381
+ "indexes": {
1382
+ "deployment_builds_request": {
1383
+ "name": "deployment_builds_request",
1384
+ "columns": ["request_key"],
1385
+ "isUnique": true
1386
+ },
1387
+ "deployment_builds_target_created": {
1388
+ "name": "deployment_builds_target_created",
1389
+ "columns": ["target_id", "created_at"],
1390
+ "isUnique": false
1391
+ },
1392
+ "deployment_builds_status": {
1393
+ "name": "deployment_builds_status",
1394
+ "columns": ["status"],
1395
+ "isUnique": false
1396
+ }
1397
+ },
1398
+ "foreignKeys": {
1399
+ "deployment_builds_target_id_deployment_targets_id_fk": {
1400
+ "name": "deployment_builds_target_id_deployment_targets_id_fk",
1401
+ "tableFrom": "deployment_builds",
1402
+ "tableTo": "deployment_targets",
1403
+ "columnsFrom": ["target_id"],
1404
+ "columnsTo": ["id"],
1405
+ "onDelete": "no action",
1406
+ "onUpdate": "no action"
1407
+ },
1408
+ "deployment_builds_project_id_projects_id_fk": {
1409
+ "name": "deployment_builds_project_id_projects_id_fk",
1410
+ "tableFrom": "deployment_builds",
1411
+ "tableTo": "projects",
1412
+ "columnsFrom": ["project_id"],
1413
+ "columnsTo": ["id"],
1414
+ "onDelete": "no action",
1415
+ "onUpdate": "no action"
1416
+ }
1417
+ },
1418
+ "compositePrimaryKeys": {},
1419
+ "uniqueConstraints": {},
1420
+ "checkConstraints": {
1421
+ "deployment_builds_status": {
1422
+ "name": "deployment_builds_status",
1423
+ "value": "\"deployment_builds\".\"status\" IN ('RUNNING', 'SUCCEEDED', 'FAILED', 'CANCELLED')"
1424
+ }
1425
+ }
1426
+ },
1427
+ "deployment_plans": {
1428
+ "name": "deployment_plans",
1429
+ "columns": {
1430
+ "id": {
1431
+ "name": "id",
1432
+ "type": "text",
1433
+ "primaryKey": true,
1434
+ "notNull": true,
1435
+ "autoincrement": false
1436
+ },
1437
+ "target_id": {
1438
+ "name": "target_id",
1439
+ "type": "text",
1440
+ "primaryKey": false,
1441
+ "notNull": true,
1442
+ "autoincrement": false
1443
+ },
1444
+ "project_id": {
1445
+ "name": "project_id",
1446
+ "type": "text",
1447
+ "primaryKey": false,
1448
+ "notNull": true,
1449
+ "autoincrement": false
1450
+ },
1451
+ "artifact_id": {
1452
+ "name": "artifact_id",
1453
+ "type": "text",
1454
+ "primaryKey": false,
1455
+ "notNull": true,
1456
+ "autoincrement": false
1457
+ },
1458
+ "previous_artifact_id": {
1459
+ "name": "previous_artifact_id",
1460
+ "type": "text",
1461
+ "primaryKey": false,
1462
+ "notNull": false,
1463
+ "autoincrement": false
1464
+ },
1465
+ "previous_version": {
1466
+ "name": "previous_version",
1467
+ "type": "text",
1468
+ "primaryKey": false,
1469
+ "notNull": false,
1470
+ "autoincrement": false
1471
+ },
1472
+ "version": {
1473
+ "name": "version",
1474
+ "type": "text",
1475
+ "primaryKey": false,
1476
+ "notNull": true,
1477
+ "autoincrement": false
1478
+ },
1479
+ "plan_json": {
1480
+ "name": "plan_json",
1481
+ "type": "text",
1482
+ "primaryKey": false,
1483
+ "notNull": true,
1484
+ "autoincrement": false
1485
+ },
1486
+ "plan_hash": {
1487
+ "name": "plan_hash",
1488
+ "type": "text",
1489
+ "primaryKey": false,
1490
+ "notNull": true,
1491
+ "autoincrement": false
1492
+ },
1493
+ "status": {
1494
+ "name": "status",
1495
+ "type": "text",
1496
+ "primaryKey": false,
1497
+ "notNull": true,
1498
+ "autoincrement": false
1499
+ },
1500
+ "expires_at": {
1501
+ "name": "expires_at",
1502
+ "type": "integer",
1503
+ "primaryKey": false,
1504
+ "notNull": true,
1505
+ "autoincrement": false
1506
+ },
1507
+ "request_key": {
1508
+ "name": "request_key",
1509
+ "type": "text",
1510
+ "primaryKey": false,
1511
+ "notNull": true,
1512
+ "autoincrement": false
1513
+ },
1514
+ "requested_by": {
1515
+ "name": "requested_by",
1516
+ "type": "text",
1517
+ "primaryKey": false,
1518
+ "notNull": true,
1519
+ "autoincrement": false
1520
+ },
1521
+ "created_at": {
1522
+ "name": "created_at",
1523
+ "type": "integer",
1524
+ "primaryKey": false,
1525
+ "notNull": true,
1526
+ "autoincrement": false
1527
+ }
1528
+ },
1529
+ "indexes": {
1530
+ "deployment_plans_request": {
1531
+ "name": "deployment_plans_request",
1532
+ "columns": ["request_key"],
1533
+ "isUnique": true
1534
+ },
1535
+ "deployment_plans_target_created": {
1536
+ "name": "deployment_plans_target_created",
1537
+ "columns": ["target_id", "created_at"],
1538
+ "isUnique": false
1539
+ },
1540
+ "deployment_plans_status_expires": {
1541
+ "name": "deployment_plans_status_expires",
1542
+ "columns": ["status", "expires_at"],
1543
+ "isUnique": false
1544
+ }
1545
+ },
1546
+ "foreignKeys": {
1547
+ "deployment_plans_target_id_deployment_targets_id_fk": {
1548
+ "name": "deployment_plans_target_id_deployment_targets_id_fk",
1549
+ "tableFrom": "deployment_plans",
1550
+ "tableTo": "deployment_targets",
1551
+ "columnsFrom": ["target_id"],
1552
+ "columnsTo": ["id"],
1553
+ "onDelete": "no action",
1554
+ "onUpdate": "no action"
1555
+ },
1556
+ "deployment_plans_project_id_projects_id_fk": {
1557
+ "name": "deployment_plans_project_id_projects_id_fk",
1558
+ "tableFrom": "deployment_plans",
1559
+ "tableTo": "projects",
1560
+ "columnsFrom": ["project_id"],
1561
+ "columnsTo": ["id"],
1562
+ "onDelete": "no action",
1563
+ "onUpdate": "no action"
1564
+ },
1565
+ "deployment_plans_artifact_id_deployment_artifacts_id_fk": {
1566
+ "name": "deployment_plans_artifact_id_deployment_artifacts_id_fk",
1567
+ "tableFrom": "deployment_plans",
1568
+ "tableTo": "deployment_artifacts",
1569
+ "columnsFrom": ["artifact_id"],
1570
+ "columnsTo": ["id"],
1571
+ "onDelete": "no action",
1572
+ "onUpdate": "no action"
1573
+ },
1574
+ "deployment_plans_previous_artifact_id_deployment_artifacts_id_fk": {
1575
+ "name": "deployment_plans_previous_artifact_id_deployment_artifacts_id_fk",
1576
+ "tableFrom": "deployment_plans",
1577
+ "tableTo": "deployment_artifacts",
1578
+ "columnsFrom": ["previous_artifact_id"],
1579
+ "columnsTo": ["id"],
1580
+ "onDelete": "no action",
1581
+ "onUpdate": "no action"
1582
+ }
1583
+ },
1584
+ "compositePrimaryKeys": {},
1585
+ "uniqueConstraints": {},
1586
+ "checkConstraints": {
1587
+ "deployment_plans_status": {
1588
+ "name": "deployment_plans_status",
1589
+ "value": "\"deployment_plans\".\"status\" IN ('READY', 'WAITING_APPROVAL', 'AUTHORIZED', 'APPLYING', 'HEALTH_CHECK', 'SUCCEEDED', 'FAILED', 'CANCELLED', 'EXPIRED', 'INVALIDATED', 'UNKNOWN')"
1590
+ },
1591
+ "deployment_plans_hash": {
1592
+ "name": "deployment_plans_hash",
1593
+ "value": "length(\"deployment_plans\".\"plan_hash\") = 64"
1594
+ },
1595
+ "deployment_plans_previous": {
1596
+ "name": "deployment_plans_previous",
1597
+ "value": "(\"deployment_plans\".\"previous_artifact_id\" IS NULL) = (\"deployment_plans\".\"previous_version\" IS NULL)"
1598
+ }
1599
+ }
1600
+ },
1601
+ "deployment_targets": {
1602
+ "name": "deployment_targets",
1603
+ "columns": {
1604
+ "id": {
1605
+ "name": "id",
1606
+ "type": "text",
1607
+ "primaryKey": true,
1608
+ "notNull": true,
1609
+ "autoincrement": false
1610
+ },
1611
+ "project_id": {
1612
+ "name": "project_id",
1613
+ "type": "text",
1614
+ "primaryKey": false,
1615
+ "notNull": true,
1616
+ "autoincrement": false
1617
+ },
1618
+ "name": {
1619
+ "name": "name",
1620
+ "type": "text",
1621
+ "primaryKey": false,
1622
+ "notNull": true,
1623
+ "autoincrement": false
1624
+ },
1625
+ "current_artifact_id": {
1626
+ "name": "current_artifact_id",
1627
+ "type": "text",
1628
+ "primaryKey": false,
1629
+ "notNull": false,
1630
+ "autoincrement": false
1631
+ },
1632
+ "current_version": {
1633
+ "name": "current_version",
1634
+ "type": "text",
1635
+ "primaryKey": false,
1636
+ "notNull": false,
1637
+ "autoincrement": false
1638
+ },
1639
+ "created_at": {
1640
+ "name": "created_at",
1641
+ "type": "integer",
1642
+ "primaryKey": false,
1643
+ "notNull": true,
1644
+ "autoincrement": false
1645
+ },
1646
+ "updated_at": {
1647
+ "name": "updated_at",
1648
+ "type": "integer",
1649
+ "primaryKey": false,
1650
+ "notNull": true,
1651
+ "autoincrement": false
1652
+ }
1653
+ },
1654
+ "indexes": {
1655
+ "deployment_targets_project_name": {
1656
+ "name": "deployment_targets_project_name",
1657
+ "columns": ["project_id", "name"],
1658
+ "isUnique": true
1659
+ },
1660
+ "deployment_targets_project_updated": {
1661
+ "name": "deployment_targets_project_updated",
1662
+ "columns": ["project_id", "updated_at"],
1663
+ "isUnique": false
1664
+ }
1665
+ },
1666
+ "foreignKeys": {
1667
+ "deployment_targets_project_id_projects_id_fk": {
1668
+ "name": "deployment_targets_project_id_projects_id_fk",
1669
+ "tableFrom": "deployment_targets",
1670
+ "tableTo": "projects",
1671
+ "columnsFrom": ["project_id"],
1672
+ "columnsTo": ["id"],
1673
+ "onDelete": "no action",
1674
+ "onUpdate": "no action"
1675
+ }
1676
+ },
1677
+ "compositePrimaryKeys": {},
1678
+ "uniqueConstraints": {},
1679
+ "checkConstraints": {
1680
+ "deployment_targets_current": {
1681
+ "name": "deployment_targets_current",
1682
+ "value": "(\"deployment_targets\".\"current_artifact_id\" IS NULL) = (\"deployment_targets\".\"current_version\" IS NULL)"
1683
+ }
1684
+ }
1685
+ },
1686
+ "device_requests": {
1687
+ "name": "device_requests",
1688
+ "columns": {
1689
+ "id": {
1690
+ "name": "id",
1691
+ "type": "text",
1692
+ "primaryKey": true,
1693
+ "notNull": true,
1694
+ "autoincrement": false
1695
+ },
1696
+ "short_code": {
1697
+ "name": "short_code",
1698
+ "type": "text",
1699
+ "primaryKey": false,
1700
+ "notNull": true,
1701
+ "autoincrement": false
1702
+ },
1703
+ "status": {
1704
+ "name": "status",
1705
+ "type": "text",
1706
+ "primaryKey": false,
1707
+ "notNull": true,
1708
+ "autoincrement": false
1709
+ },
1710
+ "decision": {
1711
+ "name": "decision",
1712
+ "type": "text",
1713
+ "primaryKey": false,
1714
+ "notNull": false,
1715
+ "autoincrement": false
1716
+ },
1717
+ "client_label": {
1718
+ "name": "client_label",
1719
+ "type": "text",
1720
+ "primaryKey": false,
1721
+ "notNull": false,
1722
+ "autoincrement": false
1723
+ },
1724
+ "user_agent": {
1725
+ "name": "user_agent",
1726
+ "type": "text",
1727
+ "primaryKey": false,
1728
+ "notNull": false,
1729
+ "autoincrement": false
1730
+ },
1731
+ "ip": {
1732
+ "name": "ip",
1733
+ "type": "text",
1734
+ "primaryKey": false,
1735
+ "notNull": false,
1736
+ "autoincrement": false
1737
+ },
1738
+ "client_origin": {
1739
+ "name": "client_origin",
1740
+ "type": "text",
1741
+ "primaryKey": false,
1742
+ "notNull": false,
1743
+ "autoincrement": false
1744
+ },
1745
+ "poll_token_hash": {
1746
+ "name": "poll_token_hash",
1747
+ "type": "text",
1748
+ "primaryKey": false,
1749
+ "notNull": true,
1750
+ "autoincrement": false
1751
+ },
1752
+ "code_hash": {
1753
+ "name": "code_hash",
1754
+ "type": "text",
1755
+ "primaryKey": false,
1756
+ "notNull": false,
1757
+ "autoincrement": false
1758
+ },
1759
+ "code_expires_at": {
1760
+ "name": "code_expires_at",
1761
+ "type": "integer",
1762
+ "primaryKey": false,
1763
+ "notNull": false,
1764
+ "autoincrement": false
1765
+ },
1766
+ "attempts": {
1767
+ "name": "attempts",
1768
+ "type": "integer",
1769
+ "primaryKey": false,
1770
+ "notNull": true,
1771
+ "autoincrement": false,
1772
+ "default": 0
1773
+ },
1774
+ "enrollment_token_hash": {
1775
+ "name": "enrollment_token_hash",
1776
+ "type": "text",
1777
+ "primaryKey": false,
1778
+ "notNull": false,
1779
+ "autoincrement": false
1780
+ },
1781
+ "enrollment_expires_at": {
1782
+ "name": "enrollment_expires_at",
1783
+ "type": "integer",
1784
+ "primaryKey": false,
1785
+ "notNull": false,
1786
+ "autoincrement": false
1787
+ },
1788
+ "created_at": {
1789
+ "name": "created_at",
1790
+ "type": "integer",
1791
+ "primaryKey": false,
1792
+ "notNull": true,
1793
+ "autoincrement": false
1794
+ },
1795
+ "expires_at": {
1796
+ "name": "expires_at",
1797
+ "type": "integer",
1798
+ "primaryKey": false,
1799
+ "notNull": true,
1800
+ "autoincrement": false
1801
+ },
1802
+ "decided_at": {
1803
+ "name": "decided_at",
1804
+ "type": "integer",
1805
+ "primaryKey": false,
1806
+ "notNull": false,
1807
+ "autoincrement": false
1808
+ },
1809
+ "redeemed_at": {
1810
+ "name": "redeemed_at",
1811
+ "type": "integer",
1812
+ "primaryKey": false,
1813
+ "notNull": false,
1814
+ "autoincrement": false
1815
+ }
1816
+ },
1817
+ "indexes": {
1818
+ "device_requests_short_code_unique": {
1819
+ "name": "device_requests_short_code_unique",
1820
+ "columns": ["short_code"],
1821
+ "isUnique": true
1822
+ },
1823
+ "idx_device_requests_status": {
1824
+ "name": "idx_device_requests_status",
1825
+ "columns": ["status", "expires_at"],
1826
+ "isUnique": false
1827
+ }
1828
+ },
1829
+ "foreignKeys": {},
1830
+ "compositePrimaryKeys": {},
1831
+ "uniqueConstraints": {},
1832
+ "checkConstraints": {}
1833
+ },
1834
+ "file_versions": {
1835
+ "name": "file_versions",
1836
+ "columns": {
1837
+ "scope_key": {
1838
+ "name": "scope_key",
1839
+ "type": "text",
1840
+ "primaryKey": false,
1841
+ "notNull": true,
1842
+ "autoincrement": false
1843
+ },
1844
+ "path": {
1845
+ "name": "path",
1846
+ "type": "text",
1847
+ "primaryKey": false,
1848
+ "notNull": true,
1849
+ "autoincrement": false
1850
+ },
1851
+ "real_path": {
1852
+ "name": "real_path",
1853
+ "type": "text",
1854
+ "primaryKey": false,
1855
+ "notNull": true,
1856
+ "autoincrement": false
1857
+ },
1858
+ "version_hash": {
1859
+ "name": "version_hash",
1860
+ "type": "text",
1861
+ "primaryKey": false,
1862
+ "notNull": true,
1863
+ "autoincrement": false
1864
+ },
1865
+ "size": {
1866
+ "name": "size",
1867
+ "type": "integer",
1868
+ "primaryKey": false,
1869
+ "notNull": true,
1870
+ "autoincrement": false
1871
+ },
1872
+ "mtime": {
1873
+ "name": "mtime",
1874
+ "type": "integer",
1875
+ "primaryKey": false,
1876
+ "notNull": true,
1877
+ "autoincrement": false
1878
+ },
1879
+ "updated_at": {
1880
+ "name": "updated_at",
1881
+ "type": "integer",
1882
+ "primaryKey": false,
1883
+ "notNull": true,
1884
+ "autoincrement": false
1885
+ }
1886
+ },
1887
+ "indexes": {
1888
+ "file_versions_scope_path": {
1889
+ "name": "file_versions_scope_path",
1890
+ "columns": ["scope_key", "path"],
1891
+ "isUnique": true
1892
+ }
1893
+ },
1894
+ "foreignKeys": {},
1895
+ "compositePrimaryKeys": {},
1896
+ "uniqueConstraints": {},
1897
+ "checkConstraints": {}
1898
+ },
1899
+ "model_catalog_cache": {
1900
+ "name": "model_catalog_cache",
1901
+ "columns": {
1902
+ "credential_profile_id": {
1903
+ "name": "credential_profile_id",
1904
+ "type": "text",
1905
+ "primaryKey": true,
1906
+ "notNull": true,
1907
+ "autoincrement": false
1908
+ },
1909
+ "provider": {
1910
+ "name": "provider",
1911
+ "type": "text",
1912
+ "primaryKey": false,
1913
+ "notNull": true,
1914
+ "autoincrement": false
1915
+ },
1916
+ "endpoint": {
1917
+ "name": "endpoint",
1918
+ "type": "text",
1919
+ "primaryKey": false,
1920
+ "notNull": true,
1921
+ "autoincrement": false
1922
+ },
1923
+ "models_json": {
1924
+ "name": "models_json",
1925
+ "type": "text",
1926
+ "primaryKey": false,
1927
+ "notNull": true,
1928
+ "autoincrement": false,
1929
+ "default": "'[]'"
1930
+ },
1931
+ "synced_at": {
1932
+ "name": "synced_at",
1933
+ "type": "integer",
1934
+ "primaryKey": false,
1935
+ "notNull": false,
1936
+ "autoincrement": false
1937
+ },
1938
+ "last_attempt_at": {
1939
+ "name": "last_attempt_at",
1940
+ "type": "integer",
1941
+ "primaryKey": false,
1942
+ "notNull": false,
1943
+ "autoincrement": false
1944
+ },
1945
+ "last_error_code": {
1946
+ "name": "last_error_code",
1947
+ "type": "text",
1948
+ "primaryKey": false,
1949
+ "notNull": false,
1950
+ "autoincrement": false
1951
+ }
1952
+ },
1953
+ "indexes": {},
1954
+ "foreignKeys": {
1955
+ "model_catalog_cache_credential_profile_id_credential_profiles_id_fk": {
1956
+ "name": "model_catalog_cache_credential_profile_id_credential_profiles_id_fk",
1957
+ "tableFrom": "model_catalog_cache",
1958
+ "tableTo": "credential_profiles",
1959
+ "columnsFrom": ["credential_profile_id"],
1960
+ "columnsTo": ["id"],
1961
+ "onDelete": "cascade",
1962
+ "onUpdate": "no action"
1963
+ }
1964
+ },
1965
+ "compositePrimaryKeys": {},
1966
+ "uniqueConstraints": {},
1967
+ "checkConstraints": {}
1968
+ },
1969
+ "model_defaults": {
1970
+ "name": "model_defaults",
1971
+ "columns": {
1972
+ "id": {
1973
+ "name": "id",
1974
+ "type": "text",
1975
+ "primaryKey": true,
1976
+ "notNull": true,
1977
+ "autoincrement": false
1978
+ },
1979
+ "credential_profile_id": {
1980
+ "name": "credential_profile_id",
1981
+ "type": "text",
1982
+ "primaryKey": false,
1983
+ "notNull": true,
1984
+ "autoincrement": false
1985
+ },
1986
+ "model": {
1987
+ "name": "model",
1988
+ "type": "text",
1989
+ "primaryKey": false,
1990
+ "notNull": true,
1991
+ "autoincrement": false
1992
+ },
1993
+ "thinking": {
1994
+ "name": "thinking",
1995
+ "type": "text",
1996
+ "primaryKey": false,
1997
+ "notNull": true,
1998
+ "autoincrement": false
1999
+ },
2000
+ "updated_at": {
2001
+ "name": "updated_at",
2002
+ "type": "integer",
2003
+ "primaryKey": false,
2004
+ "notNull": true,
2005
+ "autoincrement": false
2006
+ }
2007
+ },
2008
+ "indexes": {},
2009
+ "foreignKeys": {
2010
+ "model_defaults_credential_profile_id_credential_profiles_id_fk": {
2011
+ "name": "model_defaults_credential_profile_id_credential_profiles_id_fk",
2012
+ "tableFrom": "model_defaults",
2013
+ "tableTo": "credential_profiles",
2014
+ "columnsFrom": ["credential_profile_id"],
2015
+ "columnsTo": ["id"],
2016
+ "onDelete": "cascade",
2017
+ "onUpdate": "no action"
2018
+ }
2019
+ },
2020
+ "compositePrimaryKeys": {},
2021
+ "uniqueConstraints": {},
2022
+ "checkConstraints": {
2023
+ "model_defaults_single_row": {
2024
+ "name": "model_defaults_single_row",
2025
+ "value": "\"model_defaults\".\"id\" = 'default'"
2026
+ }
2027
+ }
2028
+ },
2029
+ "model_profiles": {
2030
+ "name": "model_profiles",
2031
+ "columns": {
2032
+ "id": {
2033
+ "name": "id",
2034
+ "type": "text",
2035
+ "primaryKey": true,
2036
+ "notNull": true,
2037
+ "autoincrement": false
2038
+ },
2039
+ "label": {
2040
+ "name": "label",
2041
+ "type": "text",
2042
+ "primaryKey": false,
2043
+ "notNull": true,
2044
+ "autoincrement": false
2045
+ },
2046
+ "provider": {
2047
+ "name": "provider",
2048
+ "type": "text",
2049
+ "primaryKey": false,
2050
+ "notNull": true,
2051
+ "autoincrement": false
2052
+ },
2053
+ "model": {
2054
+ "name": "model",
2055
+ "type": "text",
2056
+ "primaryKey": false,
2057
+ "notNull": true,
2058
+ "autoincrement": false
2059
+ },
2060
+ "credential_profile_id": {
2061
+ "name": "credential_profile_id",
2062
+ "type": "text",
2063
+ "primaryKey": false,
2064
+ "notNull": false,
2065
+ "autoincrement": false
2066
+ },
2067
+ "endpoint": {
2068
+ "name": "endpoint",
2069
+ "type": "text",
2070
+ "primaryKey": false,
2071
+ "notNull": false,
2072
+ "autoincrement": false
2073
+ },
2074
+ "capabilities_json": {
2075
+ "name": "capabilities_json",
2076
+ "type": "text",
2077
+ "primaryKey": false,
2078
+ "notNull": true,
2079
+ "autoincrement": false,
2080
+ "default": "'{}'"
2081
+ },
2082
+ "created_at": {
2083
+ "name": "created_at",
2084
+ "type": "integer",
2085
+ "primaryKey": false,
2086
+ "notNull": true,
2087
+ "autoincrement": false
2088
+ }
2089
+ },
2090
+ "indexes": {
2091
+ "idx_model_profiles_provider": {
2092
+ "name": "idx_model_profiles_provider",
2093
+ "columns": ["provider"],
2094
+ "isUnique": false
2095
+ }
2096
+ },
2097
+ "foreignKeys": {
2098
+ "model_profiles_credential_profile_id_credential_profiles_id_fk": {
2099
+ "name": "model_profiles_credential_profile_id_credential_profiles_id_fk",
2100
+ "tableFrom": "model_profiles",
2101
+ "tableTo": "credential_profiles",
2102
+ "columnsFrom": ["credential_profile_id"],
2103
+ "columnsTo": ["id"],
2104
+ "onDelete": "set null",
2105
+ "onUpdate": "no action"
2106
+ }
2107
+ },
2108
+ "compositePrimaryKeys": {},
2109
+ "uniqueConstraints": {},
2110
+ "checkConstraints": {}
2111
+ },
2112
+ "model_visibility": {
2113
+ "name": "model_visibility",
2114
+ "columns": {
2115
+ "id": {
2116
+ "name": "id",
2117
+ "type": "text",
2118
+ "primaryKey": true,
2119
+ "notNull": true,
2120
+ "autoincrement": false
2121
+ },
2122
+ "credential_profile_id": {
2123
+ "name": "credential_profile_id",
2124
+ "type": "text",
2125
+ "primaryKey": false,
2126
+ "notNull": true,
2127
+ "autoincrement": false
2128
+ },
2129
+ "model_id": {
2130
+ "name": "model_id",
2131
+ "type": "text",
2132
+ "primaryKey": false,
2133
+ "notNull": true,
2134
+ "autoincrement": false
2135
+ },
2136
+ "visible": {
2137
+ "name": "visible",
2138
+ "type": "integer",
2139
+ "primaryKey": false,
2140
+ "notNull": true,
2141
+ "autoincrement": false,
2142
+ "default": 1
2143
+ },
2144
+ "updated_at": {
2145
+ "name": "updated_at",
2146
+ "type": "integer",
2147
+ "primaryKey": false,
2148
+ "notNull": true,
2149
+ "autoincrement": false
2150
+ }
2151
+ },
2152
+ "indexes": {
2153
+ "model_visibility_credential_model": {
2154
+ "name": "model_visibility_credential_model",
2155
+ "columns": ["credential_profile_id", "model_id"],
2156
+ "isUnique": true
2157
+ }
2158
+ },
2159
+ "foreignKeys": {
2160
+ "model_visibility_credential_profile_id_credential_profiles_id_fk": {
2161
+ "name": "model_visibility_credential_profile_id_credential_profiles_id_fk",
2162
+ "tableFrom": "model_visibility",
2163
+ "tableTo": "credential_profiles",
2164
+ "columnsFrom": ["credential_profile_id"],
2165
+ "columnsTo": ["id"],
2166
+ "onDelete": "cascade",
2167
+ "onUpdate": "no action"
2168
+ }
2169
+ },
2170
+ "compositePrimaryKeys": {},
2171
+ "uniqueConstraints": {},
2172
+ "checkConstraints": {}
2173
+ },
2174
+ "projects": {
2175
+ "name": "projects",
2176
+ "columns": {
2177
+ "id": {
2178
+ "name": "id",
2179
+ "type": "text",
2180
+ "primaryKey": true,
2181
+ "notNull": true,
2182
+ "autoincrement": false
2183
+ },
2184
+ "name": {
2185
+ "name": "name",
2186
+ "type": "text",
2187
+ "primaryKey": false,
2188
+ "notNull": true,
2189
+ "autoincrement": false
2190
+ },
2191
+ "root_path": {
2192
+ "name": "root_path",
2193
+ "type": "text",
2194
+ "primaryKey": false,
2195
+ "notNull": true,
2196
+ "autoincrement": false
2197
+ },
2198
+ "real_path": {
2199
+ "name": "real_path",
2200
+ "type": "text",
2201
+ "primaryKey": false,
2202
+ "notNull": true,
2203
+ "autoincrement": false
2204
+ },
2205
+ "settings_json": {
2206
+ "name": "settings_json",
2207
+ "type": "text",
2208
+ "primaryKey": false,
2209
+ "notNull": true,
2210
+ "autoincrement": false,
2211
+ "default": "'{}'"
2212
+ },
2213
+ "git_detected": {
2214
+ "name": "git_detected",
2215
+ "type": "integer",
2216
+ "primaryKey": false,
2217
+ "notNull": true,
2218
+ "autoincrement": false,
2219
+ "default": false
2220
+ },
2221
+ "created_at": {
2222
+ "name": "created_at",
2223
+ "type": "integer",
2224
+ "primaryKey": false,
2225
+ "notNull": true,
2226
+ "autoincrement": false
2227
+ },
2228
+ "updated_at": {
2229
+ "name": "updated_at",
2230
+ "type": "integer",
2231
+ "primaryKey": false,
2232
+ "notNull": true,
2233
+ "autoincrement": false
2234
+ }
2235
+ },
2236
+ "indexes": {
2237
+ "projects_real_path_unique": {
2238
+ "name": "projects_real_path_unique",
2239
+ "columns": ["real_path"],
2240
+ "isUnique": true
2241
+ },
2242
+ "idx_projects_updated": {
2243
+ "name": "idx_projects_updated",
2244
+ "columns": ["updated_at"],
2245
+ "isUnique": false
2246
+ }
2247
+ },
2248
+ "foreignKeys": {},
2249
+ "compositePrimaryKeys": {},
2250
+ "uniqueConstraints": {},
2251
+ "checkConstraints": {}
2252
+ },
2253
+ "resource_actions": {
2254
+ "name": "resource_actions",
2255
+ "columns": {
2256
+ "id": {
2257
+ "name": "id",
2258
+ "type": "text",
2259
+ "primaryKey": true,
2260
+ "notNull": true,
2261
+ "autoincrement": false
2262
+ },
2263
+ "operation_id": {
2264
+ "name": "operation_id",
2265
+ "type": "text",
2266
+ "primaryKey": false,
2267
+ "notNull": true,
2268
+ "autoincrement": false
2269
+ },
2270
+ "project_id": {
2271
+ "name": "project_id",
2272
+ "type": "text",
2273
+ "primaryKey": false,
2274
+ "notNull": true,
2275
+ "autoincrement": false
2276
+ },
2277
+ "kind": {
2278
+ "name": "kind",
2279
+ "type": "text",
2280
+ "primaryKey": false,
2281
+ "notNull": true,
2282
+ "autoincrement": false
2283
+ },
2284
+ "risk": {
2285
+ "name": "risk",
2286
+ "type": "text",
2287
+ "primaryKey": false,
2288
+ "notNull": true,
2289
+ "autoincrement": false
2290
+ },
2291
+ "status": {
2292
+ "name": "status",
2293
+ "type": "text",
2294
+ "primaryKey": false,
2295
+ "notNull": true,
2296
+ "autoincrement": false
2297
+ },
2298
+ "params_json": {
2299
+ "name": "params_json",
2300
+ "type": "text",
2301
+ "primaryKey": false,
2302
+ "notNull": true,
2303
+ "autoincrement": false
2304
+ },
2305
+ "params_hash": {
2306
+ "name": "params_hash",
2307
+ "type": "text",
2308
+ "primaryKey": false,
2309
+ "notNull": true,
2310
+ "autoincrement": false
2311
+ },
2312
+ "snapshot_hash": {
2313
+ "name": "snapshot_hash",
2314
+ "type": "text",
2315
+ "primaryKey": false,
2316
+ "notNull": true,
2317
+ "autoincrement": false
2318
+ },
2319
+ "requested_by": {
2320
+ "name": "requested_by",
2321
+ "type": "text",
2322
+ "primaryKey": false,
2323
+ "notNull": true,
2324
+ "autoincrement": false
2325
+ },
2326
+ "decided_by": {
2327
+ "name": "decided_by",
2328
+ "type": "text",
2329
+ "primaryKey": false,
2330
+ "notNull": false,
2331
+ "autoincrement": false
2332
+ },
2333
+ "expires_at": {
2334
+ "name": "expires_at",
2335
+ "type": "integer",
2336
+ "primaryKey": false,
2337
+ "notNull": true,
2338
+ "autoincrement": false
2339
+ },
2340
+ "decided_at": {
2341
+ "name": "decided_at",
2342
+ "type": "integer",
2343
+ "primaryKey": false,
2344
+ "notNull": false,
2345
+ "autoincrement": false
2346
+ },
2347
+ "started_at": {
2348
+ "name": "started_at",
2349
+ "type": "integer",
2350
+ "primaryKey": false,
2351
+ "notNull": false,
2352
+ "autoincrement": false
2353
+ },
2354
+ "ended_at": {
2355
+ "name": "ended_at",
2356
+ "type": "integer",
2357
+ "primaryKey": false,
2358
+ "notNull": false,
2359
+ "autoincrement": false
2360
+ },
2361
+ "result_json": {
2362
+ "name": "result_json",
2363
+ "type": "text",
2364
+ "primaryKey": false,
2365
+ "notNull": false,
2366
+ "autoincrement": false
2367
+ },
2368
+ "created_at": {
2369
+ "name": "created_at",
2370
+ "type": "integer",
2371
+ "primaryKey": false,
2372
+ "notNull": true,
2373
+ "autoincrement": false
2374
+ }
2375
+ },
2376
+ "indexes": {
2377
+ "resource_actions_operation": {
2378
+ "name": "resource_actions_operation",
2379
+ "columns": ["operation_id"],
2380
+ "isUnique": true
2381
+ },
2382
+ "resource_actions_project_status": {
2383
+ "name": "resource_actions_project_status",
2384
+ "columns": ["project_id", "status"],
2385
+ "isUnique": false
2386
+ }
2387
+ },
2388
+ "foreignKeys": {
2389
+ "resource_actions_operation_id_resource_operations_id_fk": {
2390
+ "name": "resource_actions_operation_id_resource_operations_id_fk",
2391
+ "tableFrom": "resource_actions",
2392
+ "tableTo": "resource_operations",
2393
+ "columnsFrom": ["operation_id"],
2394
+ "columnsTo": ["id"],
2395
+ "onDelete": "no action",
2396
+ "onUpdate": "no action"
2397
+ },
2398
+ "resource_actions_project_id_projects_id_fk": {
2399
+ "name": "resource_actions_project_id_projects_id_fk",
2400
+ "tableFrom": "resource_actions",
2401
+ "tableTo": "projects",
2402
+ "columnsFrom": ["project_id"],
2403
+ "columnsTo": ["id"],
2404
+ "onDelete": "no action",
2405
+ "onUpdate": "no action"
2406
+ }
2407
+ },
2408
+ "compositePrimaryKeys": {},
2409
+ "uniqueConstraints": {},
2410
+ "checkConstraints": {}
2411
+ },
2412
+ "resource_events": {
2413
+ "name": "resource_events",
2414
+ "columns": {
2415
+ "id": {
2416
+ "name": "id",
2417
+ "type": "text",
2418
+ "primaryKey": true,
2419
+ "notNull": true,
2420
+ "autoincrement": false
2421
+ },
2422
+ "stream_id": {
2423
+ "name": "stream_id",
2424
+ "type": "text",
2425
+ "primaryKey": false,
2426
+ "notNull": true,
2427
+ "autoincrement": false
2428
+ },
2429
+ "seq": {
2430
+ "name": "seq",
2431
+ "type": "integer",
2432
+ "primaryKey": false,
2433
+ "notNull": true,
2434
+ "autoincrement": false
2435
+ },
2436
+ "type": {
2437
+ "name": "type",
2438
+ "type": "text",
2439
+ "primaryKey": false,
2440
+ "notNull": true,
2441
+ "autoincrement": false
2442
+ },
2443
+ "payload_json": {
2444
+ "name": "payload_json",
2445
+ "type": "text",
2446
+ "primaryKey": false,
2447
+ "notNull": true,
2448
+ "autoincrement": false
2449
+ },
2450
+ "created_at": {
2451
+ "name": "created_at",
2452
+ "type": "integer",
2453
+ "primaryKey": false,
2454
+ "notNull": true,
2455
+ "autoincrement": false
2456
+ }
2457
+ },
2458
+ "indexes": {
2459
+ "resource_events_stream_seq": {
2460
+ "name": "resource_events_stream_seq",
2461
+ "columns": ["stream_id", "seq"],
2462
+ "isUnique": true
2463
+ }
2464
+ },
2465
+ "foreignKeys": {
2466
+ "resource_events_stream_id_resource_streams_stream_id_fk": {
2467
+ "name": "resource_events_stream_id_resource_streams_stream_id_fk",
2468
+ "tableFrom": "resource_events",
2469
+ "tableTo": "resource_streams",
2470
+ "columnsFrom": ["stream_id"],
2471
+ "columnsTo": ["stream_id"],
2472
+ "onDelete": "no action",
2473
+ "onUpdate": "no action"
2474
+ }
2475
+ },
2476
+ "compositePrimaryKeys": {},
2477
+ "uniqueConstraints": {},
2478
+ "checkConstraints": {}
2479
+ },
2480
+ "resource_locks": {
2481
+ "name": "resource_locks",
2482
+ "columns": {
2483
+ "id": {
2484
+ "name": "id",
2485
+ "type": "text",
2486
+ "primaryKey": true,
2487
+ "notNull": true,
2488
+ "autoincrement": false
2489
+ },
2490
+ "resource_type": {
2491
+ "name": "resource_type",
2492
+ "type": "text",
2493
+ "primaryKey": false,
2494
+ "notNull": true,
2495
+ "autoincrement": false
2496
+ },
2497
+ "resource_id": {
2498
+ "name": "resource_id",
2499
+ "type": "text",
2500
+ "primaryKey": false,
2501
+ "notNull": true,
2502
+ "autoincrement": false
2503
+ },
2504
+ "root_real_path": {
2505
+ "name": "root_real_path",
2506
+ "type": "text",
2507
+ "primaryKey": false,
2508
+ "notNull": false,
2509
+ "autoincrement": false
2510
+ },
2511
+ "owner": {
2512
+ "name": "owner",
2513
+ "type": "text",
2514
+ "primaryKey": false,
2515
+ "notNull": true,
2516
+ "autoincrement": false
2517
+ },
2518
+ "execution_id": {
2519
+ "name": "execution_id",
2520
+ "type": "text",
2521
+ "primaryKey": false,
2522
+ "notNull": true,
2523
+ "autoincrement": false
2524
+ },
2525
+ "fencing_token": {
2526
+ "name": "fencing_token",
2527
+ "type": "integer",
2528
+ "primaryKey": false,
2529
+ "notNull": true,
2530
+ "autoincrement": false
2531
+ },
2532
+ "expires_at": {
2533
+ "name": "expires_at",
2534
+ "type": "integer",
2535
+ "primaryKey": false,
2536
+ "notNull": true,
2537
+ "autoincrement": false
2538
+ },
2539
+ "heartbeat_at": {
2540
+ "name": "heartbeat_at",
2541
+ "type": "integer",
2542
+ "primaryKey": false,
2543
+ "notNull": true,
2544
+ "autoincrement": false
2545
+ },
2546
+ "created_at": {
2547
+ "name": "created_at",
2548
+ "type": "integer",
2549
+ "primaryKey": false,
2550
+ "notNull": true,
2551
+ "autoincrement": false
2552
+ }
2553
+ },
2554
+ "indexes": {
2555
+ "resource_locks_resource_unique": {
2556
+ "name": "resource_locks_resource_unique",
2557
+ "columns": ["resource_type", "resource_id"],
2558
+ "isUnique": true
2559
+ },
2560
+ "idx_resource_locks_expiry": {
2561
+ "name": "idx_resource_locks_expiry",
2562
+ "columns": ["expires_at"],
2563
+ "isUnique": false
2564
+ }
2565
+ },
2566
+ "foreignKeys": {},
2567
+ "compositePrimaryKeys": {},
2568
+ "uniqueConstraints": {},
2569
+ "checkConstraints": {}
2570
+ },
2571
+ "resource_operations": {
2572
+ "name": "resource_operations",
2573
+ "columns": {
2574
+ "id": {
2575
+ "name": "id",
2576
+ "type": "text",
2577
+ "primaryKey": true,
2578
+ "notNull": true,
2579
+ "autoincrement": false
2580
+ },
2581
+ "scope_key": {
2582
+ "name": "scope_key",
2583
+ "type": "text",
2584
+ "primaryKey": false,
2585
+ "notNull": true,
2586
+ "autoincrement": false
2587
+ },
2588
+ "root_real_path": {
2589
+ "name": "root_real_path",
2590
+ "type": "text",
2591
+ "primaryKey": false,
2592
+ "notNull": true,
2593
+ "autoincrement": false
2594
+ },
2595
+ "kind": {
2596
+ "name": "kind",
2597
+ "type": "text",
2598
+ "primaryKey": false,
2599
+ "notNull": true,
2600
+ "autoincrement": false
2601
+ },
2602
+ "status": {
2603
+ "name": "status",
2604
+ "type": "text",
2605
+ "primaryKey": false,
2606
+ "notNull": true,
2607
+ "autoincrement": false
2608
+ },
2609
+ "params_hash": {
2610
+ "name": "params_hash",
2611
+ "type": "text",
2612
+ "primaryKey": false,
2613
+ "notNull": true,
2614
+ "autoincrement": false
2615
+ },
2616
+ "idempotency_key": {
2617
+ "name": "idempotency_key",
2618
+ "type": "text",
2619
+ "primaryKey": false,
2620
+ "notNull": true,
2621
+ "autoincrement": false
2622
+ },
2623
+ "client_session_id": {
2624
+ "name": "client_session_id",
2625
+ "type": "text",
2626
+ "primaryKey": false,
2627
+ "notNull": true,
2628
+ "autoincrement": false
2629
+ },
2630
+ "path": {
2631
+ "name": "path",
2632
+ "type": "text",
2633
+ "primaryKey": false,
2634
+ "notNull": true,
2635
+ "autoincrement": false
2636
+ },
2637
+ "expected_version": {
2638
+ "name": "expected_version",
2639
+ "type": "text",
2640
+ "primaryKey": false,
2641
+ "notNull": true,
2642
+ "autoincrement": false
2643
+ },
2644
+ "target_version": {
2645
+ "name": "target_version",
2646
+ "type": "text",
2647
+ "primaryKey": false,
2648
+ "notNull": true,
2649
+ "autoincrement": false
2650
+ },
2651
+ "lock_id": {
2652
+ "name": "lock_id",
2653
+ "type": "text",
2654
+ "primaryKey": false,
2655
+ "notNull": true,
2656
+ "autoincrement": false
2657
+ },
2658
+ "fencing_token": {
2659
+ "name": "fencing_token",
2660
+ "type": "integer",
2661
+ "primaryKey": false,
2662
+ "notNull": true,
2663
+ "autoincrement": false
2664
+ },
2665
+ "result_json": {
2666
+ "name": "result_json",
2667
+ "type": "text",
2668
+ "primaryKey": false,
2669
+ "notNull": false,
2670
+ "autoincrement": false
2671
+ },
2672
+ "error_code": {
2673
+ "name": "error_code",
2674
+ "type": "text",
2675
+ "primaryKey": false,
2676
+ "notNull": false,
2677
+ "autoincrement": false
2678
+ },
2679
+ "created_at": {
2680
+ "name": "created_at",
2681
+ "type": "integer",
2682
+ "primaryKey": false,
2683
+ "notNull": true,
2684
+ "autoincrement": false
2685
+ },
2686
+ "updated_at": {
2687
+ "name": "updated_at",
2688
+ "type": "integer",
2689
+ "primaryKey": false,
2690
+ "notNull": true,
2691
+ "autoincrement": false
2692
+ }
2693
+ },
2694
+ "indexes": {
2695
+ "resource_operations_client_kind_key": {
2696
+ "name": "resource_operations_client_kind_key",
2697
+ "columns": ["client_session_id", "kind", "idempotency_key"],
2698
+ "isUnique": true
2699
+ },
2700
+ "resource_operations_status": {
2701
+ "name": "resource_operations_status",
2702
+ "columns": ["status"],
2703
+ "isUnique": false
2704
+ }
2705
+ },
2706
+ "foreignKeys": {},
2707
+ "compositePrimaryKeys": {},
2708
+ "uniqueConstraints": {},
2709
+ "checkConstraints": {}
2710
+ },
2711
+ "resource_streams": {
2712
+ "name": "resource_streams",
2713
+ "columns": {
2714
+ "stream_id": {
2715
+ "name": "stream_id",
2716
+ "type": "text",
2717
+ "primaryKey": true,
2718
+ "notNull": true,
2719
+ "autoincrement": false
2720
+ },
2721
+ "last_seq": {
2722
+ "name": "last_seq",
2723
+ "type": "integer",
2724
+ "primaryKey": false,
2725
+ "notNull": true,
2726
+ "autoincrement": false,
2727
+ "default": 0
2728
+ }
2729
+ },
2730
+ "indexes": {},
2731
+ "foreignKeys": {},
2732
+ "compositePrimaryKeys": {},
2733
+ "uniqueConstraints": {},
2734
+ "checkConstraints": {}
2735
+ },
2736
+ "scheduled_job_runs": {
2737
+ "name": "scheduled_job_runs",
2738
+ "columns": {
2739
+ "id": {
2740
+ "name": "id",
2741
+ "type": "text",
2742
+ "primaryKey": true,
2743
+ "notNull": true,
2744
+ "autoincrement": false
2745
+ },
2746
+ "job_id": {
2747
+ "name": "job_id",
2748
+ "type": "text",
2749
+ "primaryKey": false,
2750
+ "notNull": true,
2751
+ "autoincrement": false
2752
+ },
2753
+ "trigger": {
2754
+ "name": "trigger",
2755
+ "type": "text",
2756
+ "primaryKey": false,
2757
+ "notNull": true,
2758
+ "autoincrement": false
2759
+ },
2760
+ "status": {
2761
+ "name": "status",
2762
+ "type": "text",
2763
+ "primaryKey": false,
2764
+ "notNull": true,
2765
+ "autoincrement": false
2766
+ },
2767
+ "scheduled_for": {
2768
+ "name": "scheduled_for",
2769
+ "type": "integer",
2770
+ "primaryKey": false,
2771
+ "notNull": true,
2772
+ "autoincrement": false
2773
+ },
2774
+ "started_at": {
2775
+ "name": "started_at",
2776
+ "type": "integer",
2777
+ "primaryKey": false,
2778
+ "notNull": false,
2779
+ "autoincrement": false
2780
+ },
2781
+ "ended_at": {
2782
+ "name": "ended_at",
2783
+ "type": "integer",
2784
+ "primaryKey": false,
2785
+ "notNull": false,
2786
+ "autoincrement": false
2787
+ },
2788
+ "duration_ms": {
2789
+ "name": "duration_ms",
2790
+ "type": "integer",
2791
+ "primaryKey": false,
2792
+ "notNull": false,
2793
+ "autoincrement": false
2794
+ },
2795
+ "session_id": {
2796
+ "name": "session_id",
2797
+ "type": "text",
2798
+ "primaryKey": false,
2799
+ "notNull": false,
2800
+ "autoincrement": false
2801
+ },
2802
+ "turn_id": {
2803
+ "name": "turn_id",
2804
+ "type": "text",
2805
+ "primaryKey": false,
2806
+ "notNull": false,
2807
+ "autoincrement": false
2808
+ },
2809
+ "exit_code": {
2810
+ "name": "exit_code",
2811
+ "type": "integer",
2812
+ "primaryKey": false,
2813
+ "notNull": false,
2814
+ "autoincrement": false
2815
+ },
2816
+ "output": {
2817
+ "name": "output",
2818
+ "type": "text",
2819
+ "primaryKey": false,
2820
+ "notNull": false,
2821
+ "autoincrement": false
2822
+ },
2823
+ "error_code": {
2824
+ "name": "error_code",
2825
+ "type": "text",
2826
+ "primaryKey": false,
2827
+ "notNull": false,
2828
+ "autoincrement": false
2829
+ },
2830
+ "error_message": {
2831
+ "name": "error_message",
2832
+ "type": "text",
2833
+ "primaryKey": false,
2834
+ "notNull": false,
2835
+ "autoincrement": false
2836
+ },
2837
+ "created_at": {
2838
+ "name": "created_at",
2839
+ "type": "integer",
2840
+ "primaryKey": false,
2841
+ "notNull": true,
2842
+ "autoincrement": false
2843
+ }
2844
+ },
2845
+ "indexes": {
2846
+ "idx_scheduled_job_runs_job": {
2847
+ "name": "idx_scheduled_job_runs_job",
2848
+ "columns": ["job_id", "created_at"],
2849
+ "isUnique": false
2850
+ },
2851
+ "idx_scheduled_job_runs_status": {
2852
+ "name": "idx_scheduled_job_runs_status",
2853
+ "columns": ["status", "created_at"],
2854
+ "isUnique": false
2855
+ }
2856
+ },
2857
+ "foreignKeys": {
2858
+ "scheduled_job_runs_job_id_scheduled_jobs_id_fk": {
2859
+ "name": "scheduled_job_runs_job_id_scheduled_jobs_id_fk",
2860
+ "tableFrom": "scheduled_job_runs",
2861
+ "tableTo": "scheduled_jobs",
2862
+ "columnsFrom": ["job_id"],
2863
+ "columnsTo": ["id"],
2864
+ "onDelete": "cascade",
2865
+ "onUpdate": "no action"
2866
+ },
2867
+ "scheduled_job_runs_session_id_sessions_id_fk": {
2868
+ "name": "scheduled_job_runs_session_id_sessions_id_fk",
2869
+ "tableFrom": "scheduled_job_runs",
2870
+ "tableTo": "sessions",
2871
+ "columnsFrom": ["session_id"],
2872
+ "columnsTo": ["id"],
2873
+ "onDelete": "set null",
2874
+ "onUpdate": "no action"
2875
+ },
2876
+ "scheduled_job_runs_turn_id_turns_id_fk": {
2877
+ "name": "scheduled_job_runs_turn_id_turns_id_fk",
2878
+ "tableFrom": "scheduled_job_runs",
2879
+ "tableTo": "turns",
2880
+ "columnsFrom": ["turn_id"],
2881
+ "columnsTo": ["id"],
2882
+ "onDelete": "set null",
2883
+ "onUpdate": "no action"
2884
+ }
2885
+ },
2886
+ "compositePrimaryKeys": {},
2887
+ "uniqueConstraints": {},
2888
+ "checkConstraints": {}
2889
+ },
2890
+ "scheduled_jobs": {
2891
+ "name": "scheduled_jobs",
2892
+ "columns": {
2893
+ "id": {
2894
+ "name": "id",
2895
+ "type": "text",
2896
+ "primaryKey": true,
2897
+ "notNull": true,
2898
+ "autoincrement": false
2899
+ },
2900
+ "name": {
2901
+ "name": "name",
2902
+ "type": "text",
2903
+ "primaryKey": false,
2904
+ "notNull": true,
2905
+ "autoincrement": false
2906
+ },
2907
+ "project_id": {
2908
+ "name": "project_id",
2909
+ "type": "text",
2910
+ "primaryKey": false,
2911
+ "notNull": false,
2912
+ "autoincrement": false
2913
+ },
2914
+ "kind": {
2915
+ "name": "kind",
2916
+ "type": "text",
2917
+ "primaryKey": false,
2918
+ "notNull": true,
2919
+ "autoincrement": false
2920
+ },
2921
+ "schedule_type": {
2922
+ "name": "schedule_type",
2923
+ "type": "text",
2924
+ "primaryKey": false,
2925
+ "notNull": true,
2926
+ "autoincrement": false
2927
+ },
2928
+ "cron_expression": {
2929
+ "name": "cron_expression",
2930
+ "type": "text",
2931
+ "primaryKey": false,
2932
+ "notNull": false,
2933
+ "autoincrement": false
2934
+ },
2935
+ "interval_seconds": {
2936
+ "name": "interval_seconds",
2937
+ "type": "integer",
2938
+ "primaryKey": false,
2939
+ "notNull": false,
2940
+ "autoincrement": false
2941
+ },
2942
+ "timezone": {
2943
+ "name": "timezone",
2944
+ "type": "text",
2945
+ "primaryKey": false,
2946
+ "notNull": true,
2947
+ "autoincrement": false
2948
+ },
2949
+ "enabled": {
2950
+ "name": "enabled",
2951
+ "type": "integer",
2952
+ "primaryKey": false,
2953
+ "notNull": true,
2954
+ "autoincrement": false,
2955
+ "default": true
2956
+ },
2957
+ "overlap_policy": {
2958
+ "name": "overlap_policy",
2959
+ "type": "text",
2960
+ "primaryKey": false,
2961
+ "notNull": true,
2962
+ "autoincrement": false,
2963
+ "default": "'skip'"
2964
+ },
2965
+ "missed_policy": {
2966
+ "name": "missed_policy",
2967
+ "type": "text",
2968
+ "primaryKey": false,
2969
+ "notNull": true,
2970
+ "autoincrement": false,
2971
+ "default": "'skip'"
2972
+ },
2973
+ "timeout_seconds": {
2974
+ "name": "timeout_seconds",
2975
+ "type": "integer",
2976
+ "primaryKey": false,
2977
+ "notNull": true,
2978
+ "autoincrement": false,
2979
+ "default": 600
2980
+ },
2981
+ "script_source": {
2982
+ "name": "script_source",
2983
+ "type": "text",
2984
+ "primaryKey": false,
2985
+ "notNull": false,
2986
+ "autoincrement": false
2987
+ },
2988
+ "agent_prompt": {
2989
+ "name": "agent_prompt",
2990
+ "type": "text",
2991
+ "primaryKey": false,
2992
+ "notNull": false,
2993
+ "autoincrement": false
2994
+ },
2995
+ "agent_model": {
2996
+ "name": "agent_model",
2997
+ "type": "text",
2998
+ "primaryKey": false,
2999
+ "notNull": false,
3000
+ "autoincrement": false
3001
+ },
3002
+ "agent_credential_profile_id": {
3003
+ "name": "agent_credential_profile_id",
3004
+ "type": "text",
3005
+ "primaryKey": false,
3006
+ "notNull": false,
3007
+ "autoincrement": false
3008
+ },
3009
+ "agent_thinking": {
3010
+ "name": "agent_thinking",
3011
+ "type": "text",
3012
+ "primaryKey": false,
3013
+ "notNull": false,
3014
+ "autoincrement": false
3015
+ },
3016
+ "agent_approval_policy": {
3017
+ "name": "agent_approval_policy",
3018
+ "type": "text",
3019
+ "primaryKey": false,
3020
+ "notNull": false,
3021
+ "autoincrement": false
3022
+ },
3023
+ "session_id": {
3024
+ "name": "session_id",
3025
+ "type": "text",
3026
+ "primaryKey": false,
3027
+ "notNull": false,
3028
+ "autoincrement": false
3029
+ },
3030
+ "next_run_at": {
3031
+ "name": "next_run_at",
3032
+ "type": "integer",
3033
+ "primaryKey": false,
3034
+ "notNull": false,
3035
+ "autoincrement": false
3036
+ },
3037
+ "last_run_at": {
3038
+ "name": "last_run_at",
3039
+ "type": "integer",
3040
+ "primaryKey": false,
3041
+ "notNull": false,
3042
+ "autoincrement": false
3043
+ },
3044
+ "last_status": {
3045
+ "name": "last_status",
3046
+ "type": "text",
3047
+ "primaryKey": false,
3048
+ "notNull": false,
3049
+ "autoincrement": false
3050
+ },
3051
+ "created_at": {
3052
+ "name": "created_at",
3053
+ "type": "integer",
3054
+ "primaryKey": false,
3055
+ "notNull": true,
3056
+ "autoincrement": false
3057
+ },
3058
+ "updated_at": {
3059
+ "name": "updated_at",
3060
+ "type": "integer",
3061
+ "primaryKey": false,
3062
+ "notNull": true,
3063
+ "autoincrement": false
3064
+ },
3065
+ "archived_at": {
3066
+ "name": "archived_at",
3067
+ "type": "integer",
3068
+ "primaryKey": false,
3069
+ "notNull": false,
3070
+ "autoincrement": false
3071
+ }
3072
+ },
3073
+ "indexes": {
3074
+ "idx_scheduled_jobs_due": {
3075
+ "name": "idx_scheduled_jobs_due",
3076
+ "columns": ["enabled", "archived_at", "next_run_at"],
3077
+ "isUnique": false
3078
+ },
3079
+ "idx_scheduled_jobs_project": {
3080
+ "name": "idx_scheduled_jobs_project",
3081
+ "columns": ["project_id", "updated_at"],
3082
+ "isUnique": false
3083
+ }
3084
+ },
3085
+ "foreignKeys": {
3086
+ "scheduled_jobs_project_id_projects_id_fk": {
3087
+ "name": "scheduled_jobs_project_id_projects_id_fk",
3088
+ "tableFrom": "scheduled_jobs",
3089
+ "tableTo": "projects",
3090
+ "columnsFrom": ["project_id"],
3091
+ "columnsTo": ["id"],
3092
+ "onDelete": "cascade",
3093
+ "onUpdate": "no action"
3094
+ },
3095
+ "scheduled_jobs_agent_credential_profile_id_credential_profiles_id_fk": {
3096
+ "name": "scheduled_jobs_agent_credential_profile_id_credential_profiles_id_fk",
3097
+ "tableFrom": "scheduled_jobs",
3098
+ "tableTo": "credential_profiles",
3099
+ "columnsFrom": ["agent_credential_profile_id"],
3100
+ "columnsTo": ["id"],
3101
+ "onDelete": "set null",
3102
+ "onUpdate": "no action"
3103
+ },
3104
+ "scheduled_jobs_session_id_sessions_id_fk": {
3105
+ "name": "scheduled_jobs_session_id_sessions_id_fk",
3106
+ "tableFrom": "scheduled_jobs",
3107
+ "tableTo": "sessions",
3108
+ "columnsFrom": ["session_id"],
3109
+ "columnsTo": ["id"],
3110
+ "onDelete": "set null",
3111
+ "onUpdate": "no action"
3112
+ }
3113
+ },
3114
+ "compositePrimaryKeys": {},
3115
+ "uniqueConstraints": {},
3116
+ "checkConstraints": {}
3117
+ },
3118
+ "secrets": {
3119
+ "name": "secrets",
3120
+ "columns": {
3121
+ "id": {
3122
+ "name": "id",
3123
+ "type": "text",
3124
+ "primaryKey": true,
3125
+ "notNull": true,
3126
+ "autoincrement": false
3127
+ },
3128
+ "ciphertext": {
3129
+ "name": "ciphertext",
3130
+ "type": "text",
3131
+ "primaryKey": false,
3132
+ "notNull": true,
3133
+ "autoincrement": false
3134
+ },
3135
+ "nonce": {
3136
+ "name": "nonce",
3137
+ "type": "text",
3138
+ "primaryKey": false,
3139
+ "notNull": true,
3140
+ "autoincrement": false
3141
+ },
3142
+ "tag": {
3143
+ "name": "tag",
3144
+ "type": "text",
3145
+ "primaryKey": false,
3146
+ "notNull": true,
3147
+ "autoincrement": false
3148
+ },
3149
+ "created_at": {
3150
+ "name": "created_at",
3151
+ "type": "integer",
3152
+ "primaryKey": false,
3153
+ "notNull": true,
3154
+ "autoincrement": false
3155
+ }
3156
+ },
3157
+ "indexes": {},
3158
+ "foreignKeys": {},
3159
+ "compositePrimaryKeys": {},
3160
+ "uniqueConstraints": {},
3161
+ "checkConstraints": {}
3162
+ },
3163
+ "service_action_authorizations": {
3164
+ "name": "service_action_authorizations",
3165
+ "columns": {
3166
+ "id": {
3167
+ "name": "id",
3168
+ "type": "text",
3169
+ "primaryKey": true,
3170
+ "notNull": true,
3171
+ "autoincrement": false
3172
+ },
3173
+ "target_id": {
3174
+ "name": "target_id",
3175
+ "type": "text",
3176
+ "primaryKey": false,
3177
+ "notNull": true,
3178
+ "autoincrement": false
3179
+ },
3180
+ "project_id": {
3181
+ "name": "project_id",
3182
+ "type": "text",
3183
+ "primaryKey": false,
3184
+ "notNull": true,
3185
+ "autoincrement": false
3186
+ },
3187
+ "action": {
3188
+ "name": "action",
3189
+ "type": "text",
3190
+ "primaryKey": false,
3191
+ "notNull": true,
3192
+ "autoincrement": false
3193
+ },
3194
+ "actor_type": {
3195
+ "name": "actor_type",
3196
+ "type": "text",
3197
+ "primaryKey": false,
3198
+ "notNull": true,
3199
+ "autoincrement": false
3200
+ },
3201
+ "actor_id": {
3202
+ "name": "actor_id",
3203
+ "type": "text",
3204
+ "primaryKey": false,
3205
+ "notNull": true,
3206
+ "autoincrement": false
3207
+ },
3208
+ "client_session_id": {
3209
+ "name": "client_session_id",
3210
+ "type": "text",
3211
+ "primaryKey": false,
3212
+ "notNull": false,
3213
+ "autoincrement": false
3214
+ },
3215
+ "session_id": {
3216
+ "name": "session_id",
3217
+ "type": "text",
3218
+ "primaryKey": false,
3219
+ "notNull": false,
3220
+ "autoincrement": false
3221
+ },
3222
+ "turn_id": {
3223
+ "name": "turn_id",
3224
+ "type": "text",
3225
+ "primaryKey": false,
3226
+ "notNull": false,
3227
+ "autoincrement": false
3228
+ },
3229
+ "policy": {
3230
+ "name": "policy",
3231
+ "type": "text",
3232
+ "primaryKey": false,
3233
+ "notNull": true,
3234
+ "autoincrement": false
3235
+ },
3236
+ "policy_snapshot_id": {
3237
+ "name": "policy_snapshot_id",
3238
+ "type": "text",
3239
+ "primaryKey": false,
3240
+ "notNull": true,
3241
+ "autoincrement": false
3242
+ },
3243
+ "status": {
3244
+ "name": "status",
3245
+ "type": "text",
3246
+ "primaryKey": false,
3247
+ "notNull": true,
3248
+ "autoincrement": false
3249
+ },
3250
+ "artifact_hash": {
3251
+ "name": "artifact_hash",
3252
+ "type": "text",
3253
+ "primaryKey": false,
3254
+ "notNull": true,
3255
+ "autoincrement": false
3256
+ },
3257
+ "version": {
3258
+ "name": "version",
3259
+ "type": "text",
3260
+ "primaryKey": false,
3261
+ "notNull": true,
3262
+ "autoincrement": false
3263
+ },
3264
+ "scope_json": {
3265
+ "name": "scope_json",
3266
+ "type": "text",
3267
+ "primaryKey": false,
3268
+ "notNull": true,
3269
+ "autoincrement": false
3270
+ },
3271
+ "scope_hash": {
3272
+ "name": "scope_hash",
3273
+ "type": "text",
3274
+ "primaryKey": false,
3275
+ "notNull": true,
3276
+ "autoincrement": false
3277
+ },
3278
+ "request_key": {
3279
+ "name": "request_key",
3280
+ "type": "text",
3281
+ "primaryKey": false,
3282
+ "notNull": true,
3283
+ "autoincrement": false
3284
+ },
3285
+ "expires_at": {
3286
+ "name": "expires_at",
3287
+ "type": "integer",
3288
+ "primaryKey": false,
3289
+ "notNull": true,
3290
+ "autoincrement": false
3291
+ },
3292
+ "decided_at": {
3293
+ "name": "decided_at",
3294
+ "type": "integer",
3295
+ "primaryKey": false,
3296
+ "notNull": false,
3297
+ "autoincrement": false
3298
+ },
3299
+ "decided_by": {
3300
+ "name": "decided_by",
3301
+ "type": "text",
3302
+ "primaryKey": false,
3303
+ "notNull": false,
3304
+ "autoincrement": false
3305
+ },
3306
+ "consumed_at": {
3307
+ "name": "consumed_at",
3308
+ "type": "integer",
3309
+ "primaryKey": false,
3310
+ "notNull": false,
3311
+ "autoincrement": false
3312
+ },
3313
+ "consume_key": {
3314
+ "name": "consume_key",
3315
+ "type": "text",
3316
+ "primaryKey": false,
3317
+ "notNull": false,
3318
+ "autoincrement": false
3319
+ },
3320
+ "reason_code": {
3321
+ "name": "reason_code",
3322
+ "type": "text",
3323
+ "primaryKey": false,
3324
+ "notNull": false,
3325
+ "autoincrement": false
3326
+ },
3327
+ "created_at": {
3328
+ "name": "created_at",
3329
+ "type": "integer",
3330
+ "primaryKey": false,
3331
+ "notNull": true,
3332
+ "autoincrement": false
3333
+ }
3334
+ },
3335
+ "indexes": {
3336
+ "service_action_authorizations_request": {
3337
+ "name": "service_action_authorizations_request",
3338
+ "columns": ["request_key"],
3339
+ "isUnique": true
3340
+ },
3341
+ "service_action_authorizations_target_status": {
3342
+ "name": "service_action_authorizations_target_status",
3343
+ "columns": ["target_id", "status"],
3344
+ "isUnique": false
3345
+ },
3346
+ "service_action_authorizations_status_expires": {
3347
+ "name": "service_action_authorizations_status_expires",
3348
+ "columns": ["status", "expires_at"],
3349
+ "isUnique": false
3350
+ }
3351
+ },
3352
+ "foreignKeys": {
3353
+ "service_action_authorizations_target_id_deployment_targets_id_fk": {
3354
+ "name": "service_action_authorizations_target_id_deployment_targets_id_fk",
3355
+ "tableFrom": "service_action_authorizations",
3356
+ "tableTo": "deployment_targets",
3357
+ "columnsFrom": ["target_id"],
3358
+ "columnsTo": ["id"],
3359
+ "onDelete": "no action",
3360
+ "onUpdate": "no action"
3361
+ },
3362
+ "service_action_authorizations_project_id_projects_id_fk": {
3363
+ "name": "service_action_authorizations_project_id_projects_id_fk",
3364
+ "tableFrom": "service_action_authorizations",
3365
+ "tableTo": "projects",
3366
+ "columnsFrom": ["project_id"],
3367
+ "columnsTo": ["id"],
3368
+ "onDelete": "no action",
3369
+ "onUpdate": "no action"
3370
+ }
3371
+ },
3372
+ "compositePrimaryKeys": {},
3373
+ "uniqueConstraints": {},
3374
+ "checkConstraints": {
3375
+ "service_action_authorizations_action": {
3376
+ "name": "service_action_authorizations_action",
3377
+ "value": "\"service_action_authorizations\".\"action\" IN ('start', 'stop', 'restart', 'recover')"
3378
+ },
3379
+ "service_action_authorizations_status": {
3380
+ "name": "service_action_authorizations_status",
3381
+ "value": "\"service_action_authorizations\".\"status\" IN ('PENDING', 'AUTHORIZED', 'DENIED', 'EXPIRED', 'REVOKED', 'CONSUMED')"
3382
+ },
3383
+ "service_action_authorizations_artifact_hash": {
3384
+ "name": "service_action_authorizations_artifact_hash",
3385
+ "value": "length(\"service_action_authorizations\".\"artifact_hash\") = 64"
3386
+ },
3387
+ "service_action_authorizations_scope_hash": {
3388
+ "name": "service_action_authorizations_scope_hash",
3389
+ "value": "length(\"service_action_authorizations\".\"scope_hash\") = 64"
3390
+ }
3391
+ }
3392
+ },
3393
+ "service_ops_deployments": {
3394
+ "name": "service_ops_deployments",
3395
+ "columns": {
3396
+ "id": {
3397
+ "name": "id",
3398
+ "type": "text",
3399
+ "primaryKey": true,
3400
+ "notNull": true,
3401
+ "autoincrement": false
3402
+ },
3403
+ "target_id": {
3404
+ "name": "target_id",
3405
+ "type": "text",
3406
+ "primaryKey": false,
3407
+ "notNull": true,
3408
+ "autoincrement": false
3409
+ },
3410
+ "project_id": {
3411
+ "name": "project_id",
3412
+ "type": "text",
3413
+ "primaryKey": false,
3414
+ "notNull": true,
3415
+ "autoincrement": false
3416
+ },
3417
+ "plan_id": {
3418
+ "name": "plan_id",
3419
+ "type": "text",
3420
+ "primaryKey": false,
3421
+ "notNull": true,
3422
+ "autoincrement": false
3423
+ },
3424
+ "authorization_id": {
3425
+ "name": "authorization_id",
3426
+ "type": "text",
3427
+ "primaryKey": false,
3428
+ "notNull": true,
3429
+ "autoincrement": false
3430
+ },
3431
+ "artifact_id": {
3432
+ "name": "artifact_id",
3433
+ "type": "text",
3434
+ "primaryKey": false,
3435
+ "notNull": true,
3436
+ "autoincrement": false
3437
+ },
3438
+ "previous_artifact_id": {
3439
+ "name": "previous_artifact_id",
3440
+ "type": "text",
3441
+ "primaryKey": false,
3442
+ "notNull": false,
3443
+ "autoincrement": false
3444
+ },
3445
+ "previous_version": {
3446
+ "name": "previous_version",
3447
+ "type": "text",
3448
+ "primaryKey": false,
3449
+ "notNull": false,
3450
+ "autoincrement": false
3451
+ },
3452
+ "version": {
3453
+ "name": "version",
3454
+ "type": "text",
3455
+ "primaryKey": false,
3456
+ "notNull": true,
3457
+ "autoincrement": false
3458
+ },
3459
+ "status": {
3460
+ "name": "status",
3461
+ "type": "text",
3462
+ "primaryKey": false,
3463
+ "notNull": true,
3464
+ "autoincrement": false
3465
+ },
3466
+ "plan_hash": {
3467
+ "name": "plan_hash",
3468
+ "type": "text",
3469
+ "primaryKey": false,
3470
+ "notNull": true,
3471
+ "autoincrement": false
3472
+ },
3473
+ "artifact_hash": {
3474
+ "name": "artifact_hash",
3475
+ "type": "text",
3476
+ "primaryKey": false,
3477
+ "notNull": true,
3478
+ "autoincrement": false
3479
+ },
3480
+ "actor_type": {
3481
+ "name": "actor_type",
3482
+ "type": "text",
3483
+ "primaryKey": false,
3484
+ "notNull": true,
3485
+ "autoincrement": false
3486
+ },
3487
+ "actor_id": {
3488
+ "name": "actor_id",
3489
+ "type": "text",
3490
+ "primaryKey": false,
3491
+ "notNull": true,
3492
+ "autoincrement": false
3493
+ },
3494
+ "policy": {
3495
+ "name": "policy",
3496
+ "type": "text",
3497
+ "primaryKey": false,
3498
+ "notNull": true,
3499
+ "autoincrement": false
3500
+ },
3501
+ "policy_snapshot_id": {
3502
+ "name": "policy_snapshot_id",
3503
+ "type": "text",
3504
+ "primaryKey": false,
3505
+ "notNull": true,
3506
+ "autoincrement": false
3507
+ },
3508
+ "reason_code": {
3509
+ "name": "reason_code",
3510
+ "type": "text",
3511
+ "primaryKey": false,
3512
+ "notNull": false,
3513
+ "autoincrement": false
3514
+ },
3515
+ "health_json": {
3516
+ "name": "health_json",
3517
+ "type": "text",
3518
+ "primaryKey": false,
3519
+ "notNull": false,
3520
+ "autoincrement": false
3521
+ },
3522
+ "result_json": {
3523
+ "name": "result_json",
3524
+ "type": "text",
3525
+ "primaryKey": false,
3526
+ "notNull": false,
3527
+ "autoincrement": false
3528
+ },
3529
+ "started_at": {
3530
+ "name": "started_at",
3531
+ "type": "integer",
3532
+ "primaryKey": false,
3533
+ "notNull": true,
3534
+ "autoincrement": false
3535
+ },
3536
+ "ended_at": {
3537
+ "name": "ended_at",
3538
+ "type": "integer",
3539
+ "primaryKey": false,
3540
+ "notNull": false,
3541
+ "autoincrement": false
3542
+ },
3543
+ "created_at": {
3544
+ "name": "created_at",
3545
+ "type": "integer",
3546
+ "primaryKey": false,
3547
+ "notNull": true,
3548
+ "autoincrement": false
3549
+ }
3550
+ },
3551
+ "indexes": {
3552
+ "service_ops_deployments_plan": {
3553
+ "name": "service_ops_deployments_plan",
3554
+ "columns": ["plan_id"],
3555
+ "isUnique": true
3556
+ },
3557
+ "service_ops_deployments_authorization": {
3558
+ "name": "service_ops_deployments_authorization",
3559
+ "columns": ["authorization_id"],
3560
+ "isUnique": true
3561
+ },
3562
+ "service_ops_deployments_target_created": {
3563
+ "name": "service_ops_deployments_target_created",
3564
+ "columns": ["target_id", "created_at"],
3565
+ "isUnique": false
3566
+ },
3567
+ "service_ops_deployments_status": {
3568
+ "name": "service_ops_deployments_status",
3569
+ "columns": ["status"],
3570
+ "isUnique": false
3571
+ }
3572
+ },
3573
+ "foreignKeys": {
3574
+ "service_ops_deployments_target_id_deployment_targets_id_fk": {
3575
+ "name": "service_ops_deployments_target_id_deployment_targets_id_fk",
3576
+ "tableFrom": "service_ops_deployments",
3577
+ "tableTo": "deployment_targets",
3578
+ "columnsFrom": ["target_id"],
3579
+ "columnsTo": ["id"],
3580
+ "onDelete": "no action",
3581
+ "onUpdate": "no action"
3582
+ },
3583
+ "service_ops_deployments_project_id_projects_id_fk": {
3584
+ "name": "service_ops_deployments_project_id_projects_id_fk",
3585
+ "tableFrom": "service_ops_deployments",
3586
+ "tableTo": "projects",
3587
+ "columnsFrom": ["project_id"],
3588
+ "columnsTo": ["id"],
3589
+ "onDelete": "no action",
3590
+ "onUpdate": "no action"
3591
+ },
3592
+ "service_ops_deployments_plan_id_deployment_plans_id_fk": {
3593
+ "name": "service_ops_deployments_plan_id_deployment_plans_id_fk",
3594
+ "tableFrom": "service_ops_deployments",
3595
+ "tableTo": "deployment_plans",
3596
+ "columnsFrom": ["plan_id"],
3597
+ "columnsTo": ["id"],
3598
+ "onDelete": "no action",
3599
+ "onUpdate": "no action"
3600
+ },
3601
+ "service_ops_deployments_authorization_id_deployment_authorizations_id_fk": {
3602
+ "name": "service_ops_deployments_authorization_id_deployment_authorizations_id_fk",
3603
+ "tableFrom": "service_ops_deployments",
3604
+ "tableTo": "deployment_authorizations",
3605
+ "columnsFrom": ["authorization_id"],
3606
+ "columnsTo": ["id"],
3607
+ "onDelete": "no action",
3608
+ "onUpdate": "no action"
3609
+ },
3610
+ "service_ops_deployments_artifact_id_deployment_artifacts_id_fk": {
3611
+ "name": "service_ops_deployments_artifact_id_deployment_artifacts_id_fk",
3612
+ "tableFrom": "service_ops_deployments",
3613
+ "tableTo": "deployment_artifacts",
3614
+ "columnsFrom": ["artifact_id"],
3615
+ "columnsTo": ["id"],
3616
+ "onDelete": "no action",
3617
+ "onUpdate": "no action"
3618
+ },
3619
+ "service_ops_deployments_previous_artifact_id_deployment_artifacts_id_fk": {
3620
+ "name": "service_ops_deployments_previous_artifact_id_deployment_artifacts_id_fk",
3621
+ "tableFrom": "service_ops_deployments",
3622
+ "tableTo": "deployment_artifacts",
3623
+ "columnsFrom": ["previous_artifact_id"],
3624
+ "columnsTo": ["id"],
3625
+ "onDelete": "no action",
3626
+ "onUpdate": "no action"
3627
+ }
3628
+ },
3629
+ "compositePrimaryKeys": {},
3630
+ "uniqueConstraints": {},
3631
+ "checkConstraints": {
3632
+ "service_ops_deployments_status": {
3633
+ "name": "service_ops_deployments_status",
3634
+ "value": "\"service_ops_deployments\".\"status\" IN ('APPLYING', 'HEALTH_CHECK', 'SUCCEEDED', 'FAILED', 'UNKNOWN')"
3635
+ },
3636
+ "service_ops_deployments_plan_hash": {
3637
+ "name": "service_ops_deployments_plan_hash",
3638
+ "value": "length(\"service_ops_deployments\".\"plan_hash\") = 64"
3639
+ },
3640
+ "service_ops_deployments_artifact_hash": {
3641
+ "name": "service_ops_deployments_artifact_hash",
3642
+ "value": "length(\"service_ops_deployments\".\"artifact_hash\") = 64"
3643
+ },
3644
+ "service_ops_deployments_previous": {
3645
+ "name": "service_ops_deployments_previous",
3646
+ "value": "(\"service_ops_deployments\".\"previous_artifact_id\" IS NULL) = (\"service_ops_deployments\".\"previous_version\" IS NULL)"
3647
+ }
3648
+ }
3649
+ },
3650
+ "service_ops_services": {
3651
+ "name": "service_ops_services",
3652
+ "columns": {
3653
+ "target_id": {
3654
+ "name": "target_id",
3655
+ "type": "text",
3656
+ "primaryKey": true,
3657
+ "notNull": true,
3658
+ "autoincrement": false
3659
+ },
3660
+ "project_id": {
3661
+ "name": "project_id",
3662
+ "type": "text",
3663
+ "primaryKey": false,
3664
+ "notNull": true,
3665
+ "autoincrement": false
3666
+ },
3667
+ "name": {
3668
+ "name": "name",
3669
+ "type": "text",
3670
+ "primaryKey": false,
3671
+ "notNull": true,
3672
+ "autoincrement": false
3673
+ },
3674
+ "namespace": {
3675
+ "name": "namespace",
3676
+ "type": "text",
3677
+ "primaryKey": false,
3678
+ "notNull": true,
3679
+ "autoincrement": false
3680
+ },
3681
+ "pm2_name": {
3682
+ "name": "pm2_name",
3683
+ "type": "text",
3684
+ "primaryKey": false,
3685
+ "notNull": true,
3686
+ "autoincrement": false
3687
+ },
3688
+ "desired_state": {
3689
+ "name": "desired_state",
3690
+ "type": "text",
3691
+ "primaryKey": false,
3692
+ "notNull": true,
3693
+ "autoincrement": false
3694
+ },
3695
+ "observed_state": {
3696
+ "name": "observed_state",
3697
+ "type": "text",
3698
+ "primaryKey": false,
3699
+ "notNull": true,
3700
+ "autoincrement": false
3701
+ },
3702
+ "current_artifact_id": {
3703
+ "name": "current_artifact_id",
3704
+ "type": "text",
3705
+ "primaryKey": false,
3706
+ "notNull": false,
3707
+ "autoincrement": false
3708
+ },
3709
+ "current_version": {
3710
+ "name": "current_version",
3711
+ "type": "text",
3712
+ "primaryKey": false,
3713
+ "notNull": false,
3714
+ "autoincrement": false
3715
+ },
3716
+ "config_json": {
3717
+ "name": "config_json",
3718
+ "type": "text",
3719
+ "primaryKey": false,
3720
+ "notNull": true,
3721
+ "autoincrement": false
3722
+ },
3723
+ "pid": {
3724
+ "name": "pid",
3725
+ "type": "integer",
3726
+ "primaryKey": false,
3727
+ "notNull": false,
3728
+ "autoincrement": false
3729
+ },
3730
+ "last_health_at": {
3731
+ "name": "last_health_at",
3732
+ "type": "integer",
3733
+ "primaryKey": false,
3734
+ "notNull": false,
3735
+ "autoincrement": false
3736
+ },
3737
+ "reason_code": {
3738
+ "name": "reason_code",
3739
+ "type": "text",
3740
+ "primaryKey": false,
3741
+ "notNull": false,
3742
+ "autoincrement": false
3743
+ },
3744
+ "created_at": {
3745
+ "name": "created_at",
3746
+ "type": "integer",
3747
+ "primaryKey": false,
3748
+ "notNull": true,
3749
+ "autoincrement": false
3750
+ },
3751
+ "updated_at": {
3752
+ "name": "updated_at",
3753
+ "type": "integer",
3754
+ "primaryKey": false,
3755
+ "notNull": true,
3756
+ "autoincrement": false
3757
+ }
3758
+ },
3759
+ "indexes": {
3760
+ "service_ops_services_pm2_name_unique": {
3761
+ "name": "service_ops_services_pm2_name_unique",
3762
+ "columns": ["pm2_name"],
3763
+ "isUnique": true
3764
+ },
3765
+ "service_ops_services_project": {
3766
+ "name": "service_ops_services_project",
3767
+ "columns": ["project_id", "updated_at"],
3768
+ "isUnique": false
3769
+ }
3770
+ },
3771
+ "foreignKeys": {
3772
+ "service_ops_services_target_id_deployment_targets_id_fk": {
3773
+ "name": "service_ops_services_target_id_deployment_targets_id_fk",
3774
+ "tableFrom": "service_ops_services",
3775
+ "tableTo": "deployment_targets",
3776
+ "columnsFrom": ["target_id"],
3777
+ "columnsTo": ["id"],
3778
+ "onDelete": "no action",
3779
+ "onUpdate": "no action"
3780
+ },
3781
+ "service_ops_services_project_id_projects_id_fk": {
3782
+ "name": "service_ops_services_project_id_projects_id_fk",
3783
+ "tableFrom": "service_ops_services",
3784
+ "tableTo": "projects",
3785
+ "columnsFrom": ["project_id"],
3786
+ "columnsTo": ["id"],
3787
+ "onDelete": "no action",
3788
+ "onUpdate": "no action"
3789
+ },
3790
+ "service_ops_services_current_artifact_id_deployment_artifacts_id_fk": {
3791
+ "name": "service_ops_services_current_artifact_id_deployment_artifacts_id_fk",
3792
+ "tableFrom": "service_ops_services",
3793
+ "tableTo": "deployment_artifacts",
3794
+ "columnsFrom": ["current_artifact_id"],
3795
+ "columnsTo": ["id"],
3796
+ "onDelete": "no action",
3797
+ "onUpdate": "no action"
3798
+ }
3799
+ },
3800
+ "compositePrimaryKeys": {},
3801
+ "uniqueConstraints": {},
3802
+ "checkConstraints": {
3803
+ "service_ops_services_desired": {
3804
+ "name": "service_ops_services_desired",
3805
+ "value": "\"service_ops_services\".\"desired_state\" IN ('running', 'stopped')"
3806
+ },
3807
+ "service_ops_services_observed": {
3808
+ "name": "service_ops_services_observed",
3809
+ "value": "\"service_ops_services\".\"observed_state\" IN ('stopped', 'starting', 'running', 'unhealthy', 'stopping', 'failed', 'unknown')"
3810
+ }
3811
+ }
3812
+ },
3813
+ "services": {
3814
+ "name": "services",
3815
+ "columns": {
3816
+ "id": {
3817
+ "name": "id",
3818
+ "type": "text",
3819
+ "primaryKey": true,
3820
+ "notNull": true,
3821
+ "autoincrement": false
3822
+ },
3823
+ "operation_id": {
3824
+ "name": "operation_id",
3825
+ "type": "text",
3826
+ "primaryKey": false,
3827
+ "notNull": true,
3828
+ "autoincrement": false
3829
+ },
3830
+ "project_id": {
3831
+ "name": "project_id",
3832
+ "type": "text",
3833
+ "primaryKey": false,
3834
+ "notNull": true,
3835
+ "autoincrement": false
3836
+ },
3837
+ "source_session_id": {
3838
+ "name": "source_session_id",
3839
+ "type": "text",
3840
+ "primaryKey": false,
3841
+ "notNull": false,
3842
+ "autoincrement": false
3843
+ },
3844
+ "terminal_id": {
3845
+ "name": "terminal_id",
3846
+ "type": "text",
3847
+ "primaryKey": false,
3848
+ "notNull": true,
3849
+ "autoincrement": false
3850
+ },
3851
+ "name": {
3852
+ "name": "name",
3853
+ "type": "text",
3854
+ "primaryKey": false,
3855
+ "notNull": true,
3856
+ "autoincrement": false
3857
+ },
3858
+ "kind": {
3859
+ "name": "kind",
3860
+ "type": "text",
3861
+ "primaryKey": false,
3862
+ "notNull": true,
3863
+ "autoincrement": false
3864
+ },
3865
+ "status": {
3866
+ "name": "status",
3867
+ "type": "text",
3868
+ "primaryKey": false,
3869
+ "notNull": true,
3870
+ "autoincrement": false
3871
+ },
3872
+ "terminal_execution_id": {
3873
+ "name": "terminal_execution_id",
3874
+ "type": "text",
3875
+ "primaryKey": false,
3876
+ "notNull": true,
3877
+ "autoincrement": false
3878
+ },
3879
+ "endpoint_generation": {
3880
+ "name": "endpoint_generation",
3881
+ "type": "integer",
3882
+ "primaryKey": false,
3883
+ "notNull": true,
3884
+ "autoincrement": false
3885
+ },
3886
+ "endpoint_host": {
3887
+ "name": "endpoint_host",
3888
+ "type": "text",
3889
+ "primaryKey": false,
3890
+ "notNull": true,
3891
+ "autoincrement": false
3892
+ },
3893
+ "endpoint_port": {
3894
+ "name": "endpoint_port",
3895
+ "type": "integer",
3896
+ "primaryKey": false,
3897
+ "notNull": true,
3898
+ "autoincrement": false
3899
+ },
3900
+ "endpoint_protocol": {
3901
+ "name": "endpoint_protocol",
3902
+ "type": "text",
3903
+ "primaryKey": false,
3904
+ "notNull": true,
3905
+ "autoincrement": false
3906
+ },
3907
+ "identity_json": {
3908
+ "name": "identity_json",
3909
+ "type": "text",
3910
+ "primaryKey": false,
3911
+ "notNull": true,
3912
+ "autoincrement": false
3913
+ },
3914
+ "reason_code": {
3915
+ "name": "reason_code",
3916
+ "type": "text",
3917
+ "primaryKey": false,
3918
+ "notNull": false,
3919
+ "autoincrement": false
3920
+ },
3921
+ "created_at": {
3922
+ "name": "created_at",
3923
+ "type": "integer",
3924
+ "primaryKey": false,
3925
+ "notNull": true,
3926
+ "autoincrement": false
3927
+ },
3928
+ "updated_at": {
3929
+ "name": "updated_at",
3930
+ "type": "integer",
3931
+ "primaryKey": false,
3932
+ "notNull": true,
3933
+ "autoincrement": false
3934
+ },
3935
+ "ended_at": {
3936
+ "name": "ended_at",
3937
+ "type": "integer",
3938
+ "primaryKey": false,
3939
+ "notNull": false,
3940
+ "autoincrement": false
3941
+ }
3942
+ },
3943
+ "indexes": {
3944
+ "services_operation": {
3945
+ "name": "services_operation",
3946
+ "columns": ["operation_id"],
3947
+ "isUnique": true
3948
+ },
3949
+ "services_project_status": {
3950
+ "name": "services_project_status",
3951
+ "columns": ["project_id", "status"],
3952
+ "isUnique": false
3953
+ },
3954
+ "services_terminal": {
3955
+ "name": "services_terminal",
3956
+ "columns": ["terminal_id"],
3957
+ "isUnique": false
3958
+ },
3959
+ "services_active_endpoint": {
3960
+ "name": "services_active_endpoint",
3961
+ "columns": ["terminal_id", "endpoint_host", "endpoint_port"],
3962
+ "isUnique": true,
3963
+ "where": "\"services\".\"status\" IN ('REGISTERING', 'STARTING', 'RUNNING')"
3964
+ }
3965
+ },
3966
+ "foreignKeys": {
3967
+ "services_operation_id_resource_operations_id_fk": {
3968
+ "name": "services_operation_id_resource_operations_id_fk",
3969
+ "tableFrom": "services",
3970
+ "tableTo": "resource_operations",
3971
+ "columnsFrom": ["operation_id"],
3972
+ "columnsTo": ["id"],
3973
+ "onDelete": "no action",
3974
+ "onUpdate": "no action"
3975
+ },
3976
+ "services_project_id_projects_id_fk": {
3977
+ "name": "services_project_id_projects_id_fk",
3978
+ "tableFrom": "services",
3979
+ "tableTo": "projects",
3980
+ "columnsFrom": ["project_id"],
3981
+ "columnsTo": ["id"],
3982
+ "onDelete": "no action",
3983
+ "onUpdate": "no action"
3984
+ },
3985
+ "services_terminal_id_terminals_id_fk": {
3986
+ "name": "services_terminal_id_terminals_id_fk",
3987
+ "tableFrom": "services",
3988
+ "tableTo": "terminals",
3989
+ "columnsFrom": ["terminal_id"],
3990
+ "columnsTo": ["id"],
3991
+ "onDelete": "no action",
3992
+ "onUpdate": "no action"
3993
+ }
3994
+ },
3995
+ "compositePrimaryKeys": {},
3996
+ "uniqueConstraints": {},
3997
+ "checkConstraints": {
3998
+ "services_status": {
3999
+ "name": "services_status",
4000
+ "value": "\"services\".\"status\" IN ('REGISTERING', 'STARTING', 'RUNNING', 'UNKNOWN', 'UNREGISTERED')"
4001
+ },
4002
+ "services_host": {
4003
+ "name": "services_host",
4004
+ "value": "\"services\".\"endpoint_host\" IN ('127.0.0.1', '::1')"
4005
+ },
4006
+ "services_port": {
4007
+ "name": "services_port",
4008
+ "value": "\"services\".\"endpoint_port\" BETWEEN 1 AND 65535"
4009
+ },
4010
+ "services_protocol": {
4011
+ "name": "services_protocol",
4012
+ "value": "\"services\".\"endpoint_protocol\" = 'http'"
4013
+ }
4014
+ }
4015
+ },
4016
+ "session_context_summaries": {
4017
+ "name": "session_context_summaries",
4018
+ "columns": {
4019
+ "id": {
4020
+ "name": "id",
4021
+ "type": "text",
4022
+ "primaryKey": true,
4023
+ "notNull": true,
4024
+ "autoincrement": false
4025
+ },
4026
+ "session_id": {
4027
+ "name": "session_id",
4028
+ "type": "text",
4029
+ "primaryKey": false,
4030
+ "notNull": true,
4031
+ "autoincrement": false
4032
+ },
4033
+ "covered_up_to_seq": {
4034
+ "name": "covered_up_to_seq",
4035
+ "type": "integer",
4036
+ "primaryKey": false,
4037
+ "notNull": true,
4038
+ "autoincrement": false
4039
+ },
4040
+ "summary": {
4041
+ "name": "summary",
4042
+ "type": "text",
4043
+ "primaryKey": false,
4044
+ "notNull": true,
4045
+ "autoincrement": false
4046
+ },
4047
+ "tokens_before": {
4048
+ "name": "tokens_before",
4049
+ "type": "integer",
4050
+ "primaryKey": false,
4051
+ "notNull": true,
4052
+ "autoincrement": false
4053
+ },
4054
+ "tokens_after": {
4055
+ "name": "tokens_after",
4056
+ "type": "integer",
4057
+ "primaryKey": false,
4058
+ "notNull": true,
4059
+ "autoincrement": false
4060
+ },
4061
+ "degraded": {
4062
+ "name": "degraded",
4063
+ "type": "integer",
4064
+ "primaryKey": false,
4065
+ "notNull": true,
4066
+ "autoincrement": false,
4067
+ "default": 0
4068
+ },
4069
+ "created_at": {
4070
+ "name": "created_at",
4071
+ "type": "integer",
4072
+ "primaryKey": false,
4073
+ "notNull": true,
4074
+ "autoincrement": false
4075
+ }
4076
+ },
4077
+ "indexes": {
4078
+ "idx_context_summaries_session": {
4079
+ "name": "idx_context_summaries_session",
4080
+ "columns": ["session_id", "created_at"],
4081
+ "isUnique": false
4082
+ }
4083
+ },
4084
+ "foreignKeys": {
4085
+ "session_context_summaries_session_id_sessions_id_fk": {
4086
+ "name": "session_context_summaries_session_id_sessions_id_fk",
4087
+ "tableFrom": "session_context_summaries",
4088
+ "tableTo": "sessions",
4089
+ "columnsFrom": ["session_id"],
4090
+ "columnsTo": ["id"],
4091
+ "onDelete": "cascade",
4092
+ "onUpdate": "no action"
4093
+ }
4094
+ },
4095
+ "compositePrimaryKeys": {},
4096
+ "uniqueConstraints": {},
4097
+ "checkConstraints": {}
4098
+ },
4099
+ "sessions": {
4100
+ "name": "sessions",
4101
+ "columns": {
4102
+ "id": {
4103
+ "name": "id",
4104
+ "type": "text",
4105
+ "primaryKey": true,
4106
+ "notNull": true,
4107
+ "autoincrement": false
4108
+ },
4109
+ "project_id": {
4110
+ "name": "project_id",
4111
+ "type": "text",
4112
+ "primaryKey": false,
4113
+ "notNull": false,
4114
+ "autoincrement": false
4115
+ },
4116
+ "workspace_path": {
4117
+ "name": "workspace_path",
4118
+ "type": "text",
4119
+ "primaryKey": false,
4120
+ "notNull": true,
4121
+ "autoincrement": false
4122
+ },
4123
+ "title": {
4124
+ "name": "title",
4125
+ "type": "text",
4126
+ "primaryKey": false,
4127
+ "notNull": true,
4128
+ "autoincrement": false
4129
+ },
4130
+ "status": {
4131
+ "name": "status",
4132
+ "type": "text",
4133
+ "primaryKey": false,
4134
+ "notNull": true,
4135
+ "autoincrement": false,
4136
+ "default": "'active'"
4137
+ },
4138
+ "origin": {
4139
+ "name": "origin",
4140
+ "type": "text",
4141
+ "primaryKey": false,
4142
+ "notNull": true,
4143
+ "autoincrement": false,
4144
+ "default": "'user'"
4145
+ },
4146
+ "model_profile_id": {
4147
+ "name": "model_profile_id",
4148
+ "type": "text",
4149
+ "primaryKey": false,
4150
+ "notNull": false,
4151
+ "autoincrement": false
4152
+ },
4153
+ "credential_profile_id": {
4154
+ "name": "credential_profile_id",
4155
+ "type": "text",
4156
+ "primaryKey": false,
4157
+ "notNull": false,
4158
+ "autoincrement": false
4159
+ },
4160
+ "model": {
4161
+ "name": "model",
4162
+ "type": "text",
4163
+ "primaryKey": false,
4164
+ "notNull": false,
4165
+ "autoincrement": false
4166
+ },
4167
+ "thinking": {
4168
+ "name": "thinking",
4169
+ "type": "text",
4170
+ "primaryKey": false,
4171
+ "notNull": false,
4172
+ "autoincrement": false
4173
+ },
4174
+ "approval_policy_id": {
4175
+ "name": "approval_policy_id",
4176
+ "type": "text",
4177
+ "primaryKey": false,
4178
+ "notNull": true,
4179
+ "autoincrement": false,
4180
+ "default": "'standard'"
4181
+ },
4182
+ "created_at": {
4183
+ "name": "created_at",
4184
+ "type": "integer",
4185
+ "primaryKey": false,
4186
+ "notNull": true,
4187
+ "autoincrement": false
4188
+ },
4189
+ "updated_at": {
4190
+ "name": "updated_at",
4191
+ "type": "integer",
4192
+ "primaryKey": false,
4193
+ "notNull": true,
4194
+ "autoincrement": false
4195
+ },
4196
+ "last_activity_at": {
4197
+ "name": "last_activity_at",
4198
+ "type": "integer",
4199
+ "primaryKey": false,
4200
+ "notNull": true,
4201
+ "autoincrement": false
4202
+ }
4203
+ },
4204
+ "indexes": {
4205
+ "idx_sessions_project_updated": {
4206
+ "name": "idx_sessions_project_updated",
4207
+ "columns": ["project_id", "updated_at"],
4208
+ "isUnique": false
4209
+ },
4210
+ "idx_sessions_updated": {
4211
+ "name": "idx_sessions_updated",
4212
+ "columns": ["updated_at"],
4213
+ "isUnique": false
4214
+ },
4215
+ "idx_sessions_origin": {
4216
+ "name": "idx_sessions_origin",
4217
+ "columns": ["origin", "updated_at"],
4218
+ "isUnique": false
4219
+ }
4220
+ },
4221
+ "foreignKeys": {
4222
+ "sessions_project_id_projects_id_fk": {
4223
+ "name": "sessions_project_id_projects_id_fk",
4224
+ "tableFrom": "sessions",
4225
+ "tableTo": "projects",
4226
+ "columnsFrom": ["project_id"],
4227
+ "columnsTo": ["id"],
4228
+ "onDelete": "set null",
4229
+ "onUpdate": "no action"
4230
+ }
4231
+ },
4232
+ "compositePrimaryKeys": {},
4233
+ "uniqueConstraints": {},
4234
+ "checkConstraints": {}
4235
+ },
4236
+ "terminal_leases": {
4237
+ "name": "terminal_leases",
4238
+ "columns": {
4239
+ "terminal_id": {
4240
+ "name": "terminal_id",
4241
+ "type": "text",
4242
+ "primaryKey": true,
4243
+ "notNull": true,
4244
+ "autoincrement": false
4245
+ },
4246
+ "generation": {
4247
+ "name": "generation",
4248
+ "type": "integer",
4249
+ "primaryKey": false,
4250
+ "notNull": true,
4251
+ "autoincrement": false,
4252
+ "default": 0
4253
+ },
4254
+ "owner_type": {
4255
+ "name": "owner_type",
4256
+ "type": "text",
4257
+ "primaryKey": false,
4258
+ "notNull": false,
4259
+ "autoincrement": false
4260
+ },
4261
+ "owner_client_session_id": {
4262
+ "name": "owner_client_session_id",
4263
+ "type": "text",
4264
+ "primaryKey": false,
4265
+ "notNull": false,
4266
+ "autoincrement": false
4267
+ },
4268
+ "owner_connection_id": {
4269
+ "name": "owner_connection_id",
4270
+ "type": "text",
4271
+ "primaryKey": false,
4272
+ "notNull": false,
4273
+ "autoincrement": false
4274
+ },
4275
+ "owner_session_id": {
4276
+ "name": "owner_session_id",
4277
+ "type": "text",
4278
+ "primaryKey": false,
4279
+ "notNull": false,
4280
+ "autoincrement": false
4281
+ },
4282
+ "owner_turn_id": {
4283
+ "name": "owner_turn_id",
4284
+ "type": "text",
4285
+ "primaryKey": false,
4286
+ "notNull": false,
4287
+ "autoincrement": false
4288
+ },
4289
+ "owner_execution_id": {
4290
+ "name": "owner_execution_id",
4291
+ "type": "text",
4292
+ "primaryKey": false,
4293
+ "notNull": false,
4294
+ "autoincrement": false
4295
+ },
4296
+ "expires_at": {
4297
+ "name": "expires_at",
4298
+ "type": "integer",
4299
+ "primaryKey": false,
4300
+ "notNull": true,
4301
+ "autoincrement": false,
4302
+ "default": 0
4303
+ },
4304
+ "heartbeat_at": {
4305
+ "name": "heartbeat_at",
4306
+ "type": "integer",
4307
+ "primaryKey": false,
4308
+ "notNull": true,
4309
+ "autoincrement": false,
4310
+ "default": 0
4311
+ },
4312
+ "input_sequence": {
4313
+ "name": "input_sequence",
4314
+ "type": "integer",
4315
+ "primaryKey": false,
4316
+ "notNull": true,
4317
+ "autoincrement": false,
4318
+ "default": 0
4319
+ }
4320
+ },
4321
+ "indexes": {},
4322
+ "foreignKeys": {
4323
+ "terminal_leases_terminal_id_terminals_id_fk": {
4324
+ "name": "terminal_leases_terminal_id_terminals_id_fk",
4325
+ "tableFrom": "terminal_leases",
4326
+ "tableTo": "terminals",
4327
+ "columnsFrom": ["terminal_id"],
4328
+ "columnsTo": ["id"],
4329
+ "onDelete": "no action",
4330
+ "onUpdate": "no action"
4331
+ }
4332
+ },
4333
+ "compositePrimaryKeys": {},
4334
+ "uniqueConstraints": {},
4335
+ "checkConstraints": {}
4336
+ },
4337
+ "terminals": {
4338
+ "name": "terminals",
4339
+ "columns": {
4340
+ "id": {
4341
+ "name": "id",
4342
+ "type": "text",
4343
+ "primaryKey": true,
4344
+ "notNull": true,
4345
+ "autoincrement": false
4346
+ },
4347
+ "operation_id": {
4348
+ "name": "operation_id",
4349
+ "type": "text",
4350
+ "primaryKey": false,
4351
+ "notNull": true,
4352
+ "autoincrement": false
4353
+ },
4354
+ "project_id": {
4355
+ "name": "project_id",
4356
+ "type": "text",
4357
+ "primaryKey": false,
4358
+ "notNull": false,
4359
+ "autoincrement": false
4360
+ },
4361
+ "workspace_session_id": {
4362
+ "name": "workspace_session_id",
4363
+ "type": "text",
4364
+ "primaryKey": false,
4365
+ "notNull": false,
4366
+ "autoincrement": false
4367
+ },
4368
+ "source_session_id": {
4369
+ "name": "source_session_id",
4370
+ "type": "text",
4371
+ "primaryKey": false,
4372
+ "notNull": false,
4373
+ "autoincrement": false
4374
+ },
4375
+ "cwd": {
4376
+ "name": "cwd",
4377
+ "type": "text",
4378
+ "primaryKey": false,
4379
+ "notNull": true,
4380
+ "autoincrement": false
4381
+ },
4382
+ "shell": {
4383
+ "name": "shell",
4384
+ "type": "text",
4385
+ "primaryKey": false,
4386
+ "notNull": true,
4387
+ "autoincrement": false
4388
+ },
4389
+ "mode": {
4390
+ "name": "mode",
4391
+ "type": "text",
4392
+ "primaryKey": false,
4393
+ "notNull": true,
4394
+ "autoincrement": false
4395
+ },
4396
+ "role": {
4397
+ "name": "role",
4398
+ "type": "text",
4399
+ "primaryKey": false,
4400
+ "notNull": false,
4401
+ "autoincrement": false
4402
+ },
4403
+ "title": {
4404
+ "name": "title",
4405
+ "type": "text",
4406
+ "primaryKey": false,
4407
+ "notNull": false,
4408
+ "autoincrement": false
4409
+ },
4410
+ "launch_params_json": {
4411
+ "name": "launch_params_json",
4412
+ "type": "text",
4413
+ "primaryKey": false,
4414
+ "notNull": false,
4415
+ "autoincrement": false
4416
+ },
4417
+ "launch_params_hash": {
4418
+ "name": "launch_params_hash",
4419
+ "type": "text",
4420
+ "primaryKey": false,
4421
+ "notNull": false,
4422
+ "autoincrement": false
4423
+ },
4424
+ "created_by_turn_id": {
4425
+ "name": "created_by_turn_id",
4426
+ "type": "text",
4427
+ "primaryKey": false,
4428
+ "notNull": false,
4429
+ "autoincrement": false
4430
+ },
4431
+ "status": {
4432
+ "name": "status",
4433
+ "type": "text",
4434
+ "primaryKey": false,
4435
+ "notNull": true,
4436
+ "autoincrement": false
4437
+ },
4438
+ "process_identity_json": {
4439
+ "name": "process_identity_json",
4440
+ "type": "text",
4441
+ "primaryKey": false,
4442
+ "notNull": false,
4443
+ "autoincrement": false
4444
+ },
4445
+ "reason_code": {
4446
+ "name": "reason_code",
4447
+ "type": "text",
4448
+ "primaryKey": false,
4449
+ "notNull": false,
4450
+ "autoincrement": false
4451
+ },
4452
+ "output_cursor": {
4453
+ "name": "output_cursor",
4454
+ "type": "integer",
4455
+ "primaryKey": false,
4456
+ "notNull": true,
4457
+ "autoincrement": false,
4458
+ "default": 0
4459
+ },
4460
+ "created_at": {
4461
+ "name": "created_at",
4462
+ "type": "integer",
4463
+ "primaryKey": false,
4464
+ "notNull": true,
4465
+ "autoincrement": false
4466
+ },
4467
+ "started_at": {
4468
+ "name": "started_at",
4469
+ "type": "integer",
4470
+ "primaryKey": false,
4471
+ "notNull": false,
4472
+ "autoincrement": false
4473
+ },
4474
+ "ended_at": {
4475
+ "name": "ended_at",
4476
+ "type": "integer",
4477
+ "primaryKey": false,
4478
+ "notNull": false,
4479
+ "autoincrement": false
4480
+ },
4481
+ "exit_code": {
4482
+ "name": "exit_code",
4483
+ "type": "integer",
4484
+ "primaryKey": false,
4485
+ "notNull": false,
4486
+ "autoincrement": false
4487
+ }
4488
+ },
4489
+ "indexes": {
4490
+ "terminals_operation": {
4491
+ "name": "terminals_operation",
4492
+ "columns": ["operation_id"],
4493
+ "isUnique": true
4494
+ },
4495
+ "terminals_status": {
4496
+ "name": "terminals_status",
4497
+ "columns": ["status"],
4498
+ "isUnique": false
4499
+ },
4500
+ "terminals_active_role": {
4501
+ "name": "terminals_active_role",
4502
+ "columns": ["project_id", "role"],
4503
+ "isUnique": true,
4504
+ "where": "\"terminals\".\"mode\" = 'dev' AND \"terminals\".\"status\" IN ('CREATED', 'RUNNING', 'STOPPING')"
4505
+ }
4506
+ },
4507
+ "foreignKeys": {
4508
+ "terminals_operation_id_resource_operations_id_fk": {
4509
+ "name": "terminals_operation_id_resource_operations_id_fk",
4510
+ "tableFrom": "terminals",
4511
+ "tableTo": "resource_operations",
4512
+ "columnsFrom": ["operation_id"],
4513
+ "columnsTo": ["id"],
4514
+ "onDelete": "no action",
4515
+ "onUpdate": "no action"
4516
+ }
4517
+ },
4518
+ "compositePrimaryKeys": {},
4519
+ "uniqueConstraints": {},
4520
+ "checkConstraints": {}
4521
+ },
4522
+ "trusted_devices": {
4523
+ "name": "trusted_devices",
4524
+ "columns": {
4525
+ "id": {
4526
+ "name": "id",
4527
+ "type": "text",
4528
+ "primaryKey": true,
4529
+ "notNull": true,
4530
+ "autoincrement": false
4531
+ },
4532
+ "label": {
4533
+ "name": "label",
4534
+ "type": "text",
4535
+ "primaryKey": false,
4536
+ "notNull": true,
4537
+ "autoincrement": false
4538
+ },
4539
+ "created_by_request_id": {
4540
+ "name": "created_by_request_id",
4541
+ "type": "text",
4542
+ "primaryKey": false,
4543
+ "notNull": false,
4544
+ "autoincrement": false
4545
+ },
4546
+ "user_agent": {
4547
+ "name": "user_agent",
4548
+ "type": "text",
4549
+ "primaryKey": false,
4550
+ "notNull": false,
4551
+ "autoincrement": false
4552
+ },
4553
+ "created_at": {
4554
+ "name": "created_at",
4555
+ "type": "integer",
4556
+ "primaryKey": false,
4557
+ "notNull": true,
4558
+ "autoincrement": false
4559
+ },
4560
+ "last_seen_at": {
4561
+ "name": "last_seen_at",
4562
+ "type": "integer",
4563
+ "primaryKey": false,
4564
+ "notNull": false,
4565
+ "autoincrement": false
4566
+ },
4567
+ "revoked_at": {
4568
+ "name": "revoked_at",
4569
+ "type": "integer",
4570
+ "primaryKey": false,
4571
+ "notNull": false,
4572
+ "autoincrement": false
4573
+ }
4574
+ },
4575
+ "indexes": {},
4576
+ "foreignKeys": {
4577
+ "trusted_devices_created_by_request_id_device_requests_id_fk": {
4578
+ "name": "trusted_devices_created_by_request_id_device_requests_id_fk",
4579
+ "tableFrom": "trusted_devices",
4580
+ "tableTo": "device_requests",
4581
+ "columnsFrom": ["created_by_request_id"],
4582
+ "columnsTo": ["id"],
4583
+ "onDelete": "no action",
4584
+ "onUpdate": "no action"
4585
+ }
4586
+ },
4587
+ "compositePrimaryKeys": {},
4588
+ "uniqueConstraints": {},
4589
+ "checkConstraints": {}
4590
+ },
4591
+ "turns": {
4592
+ "name": "turns",
4593
+ "columns": {
4594
+ "id": {
4595
+ "name": "id",
4596
+ "type": "text",
4597
+ "primaryKey": true,
4598
+ "notNull": true,
4599
+ "autoincrement": false
4600
+ },
4601
+ "session_id": {
4602
+ "name": "session_id",
4603
+ "type": "text",
4604
+ "primaryKey": false,
4605
+ "notNull": true,
4606
+ "autoincrement": false
4607
+ },
4608
+ "model_profile_id": {
4609
+ "name": "model_profile_id",
4610
+ "type": "text",
4611
+ "primaryKey": false,
4612
+ "notNull": false,
4613
+ "autoincrement": false
4614
+ },
4615
+ "credential_profile_id": {
4616
+ "name": "credential_profile_id",
4617
+ "type": "text",
4618
+ "primaryKey": false,
4619
+ "notNull": false,
4620
+ "autoincrement": false
4621
+ },
4622
+ "provider": {
4623
+ "name": "provider",
4624
+ "type": "text",
4625
+ "primaryKey": false,
4626
+ "notNull": false,
4627
+ "autoincrement": false
4628
+ },
4629
+ "model": {
4630
+ "name": "model",
4631
+ "type": "text",
4632
+ "primaryKey": false,
4633
+ "notNull": false,
4634
+ "autoincrement": false
4635
+ },
4636
+ "thinking": {
4637
+ "name": "thinking",
4638
+ "type": "text",
4639
+ "primaryKey": false,
4640
+ "notNull": false,
4641
+ "autoincrement": false
4642
+ },
4643
+ "context_window": {
4644
+ "name": "context_window",
4645
+ "type": "integer",
4646
+ "primaryKey": false,
4647
+ "notNull": false,
4648
+ "autoincrement": false
4649
+ },
4650
+ "status": {
4651
+ "name": "status",
4652
+ "type": "text",
4653
+ "primaryKey": false,
4654
+ "notNull": true,
4655
+ "autoincrement": false
4656
+ },
4657
+ "input_json": {
4658
+ "name": "input_json",
4659
+ "type": "text",
4660
+ "primaryKey": false,
4661
+ "notNull": true,
4662
+ "autoincrement": false
4663
+ },
4664
+ "usage_json": {
4665
+ "name": "usage_json",
4666
+ "type": "text",
4667
+ "primaryKey": false,
4668
+ "notNull": false,
4669
+ "autoincrement": false
4670
+ },
4671
+ "error_json": {
4672
+ "name": "error_json",
4673
+ "type": "text",
4674
+ "primaryKey": false,
4675
+ "notNull": false,
4676
+ "autoincrement": false
4677
+ },
4678
+ "idempotency_key": {
4679
+ "name": "idempotency_key",
4680
+ "type": "text",
4681
+ "primaryKey": false,
4682
+ "notNull": false,
4683
+ "autoincrement": false
4684
+ },
4685
+ "created_at": {
4686
+ "name": "created_at",
4687
+ "type": "integer",
4688
+ "primaryKey": false,
4689
+ "notNull": true,
4690
+ "autoincrement": false
4691
+ },
4692
+ "started_at": {
4693
+ "name": "started_at",
4694
+ "type": "integer",
4695
+ "primaryKey": false,
4696
+ "notNull": false,
4697
+ "autoincrement": false
4698
+ },
4699
+ "ended_at": {
4700
+ "name": "ended_at",
4701
+ "type": "integer",
4702
+ "primaryKey": false,
4703
+ "notNull": false,
4704
+ "autoincrement": false
4705
+ }
4706
+ },
4707
+ "indexes": {
4708
+ "turns_session_idempotency_unique": {
4709
+ "name": "turns_session_idempotency_unique",
4710
+ "columns": ["session_id", "idempotency_key"],
4711
+ "isUnique": true
4712
+ },
4713
+ "idx_turns_session_created": {
4714
+ "name": "idx_turns_session_created",
4715
+ "columns": ["session_id", "created_at"],
4716
+ "isUnique": false
4717
+ },
4718
+ "idx_turns_session_status": {
4719
+ "name": "idx_turns_session_status",
4720
+ "columns": ["session_id", "status"],
4721
+ "isUnique": false
4722
+ }
4723
+ },
4724
+ "foreignKeys": {
4725
+ "turns_session_id_sessions_id_fk": {
4726
+ "name": "turns_session_id_sessions_id_fk",
4727
+ "tableFrom": "turns",
4728
+ "tableTo": "sessions",
4729
+ "columnsFrom": ["session_id"],
4730
+ "columnsTo": ["id"],
4731
+ "onDelete": "cascade",
4732
+ "onUpdate": "no action"
4733
+ }
4734
+ },
4735
+ "compositePrimaryKeys": {},
4736
+ "uniqueConstraints": {},
4737
+ "checkConstraints": {}
4738
+ },
4739
+ "webauthn_challenges": {
4740
+ "name": "webauthn_challenges",
4741
+ "columns": {
4742
+ "id": {
4743
+ "name": "id",
4744
+ "type": "text",
4745
+ "primaryKey": true,
4746
+ "notNull": true,
4747
+ "autoincrement": false
4748
+ },
4749
+ "type": {
4750
+ "name": "type",
4751
+ "type": "text",
4752
+ "primaryKey": false,
4753
+ "notNull": true,
4754
+ "autoincrement": false
4755
+ },
4756
+ "challenge": {
4757
+ "name": "challenge",
4758
+ "type": "text",
4759
+ "primaryKey": false,
4760
+ "notNull": true,
4761
+ "autoincrement": false
4762
+ },
4763
+ "request_id": {
4764
+ "name": "request_id",
4765
+ "type": "text",
4766
+ "primaryKey": false,
4767
+ "notNull": false,
4768
+ "autoincrement": false
4769
+ },
4770
+ "device_id": {
4771
+ "name": "device_id",
4772
+ "type": "text",
4773
+ "primaryKey": false,
4774
+ "notNull": false,
4775
+ "autoincrement": false
4776
+ },
4777
+ "created_at": {
4778
+ "name": "created_at",
4779
+ "type": "integer",
4780
+ "primaryKey": false,
4781
+ "notNull": true,
4782
+ "autoincrement": false
4783
+ },
4784
+ "expires_at": {
4785
+ "name": "expires_at",
4786
+ "type": "integer",
4787
+ "primaryKey": false,
4788
+ "notNull": true,
4789
+ "autoincrement": false
4790
+ },
4791
+ "consumed_at": {
4792
+ "name": "consumed_at",
4793
+ "type": "integer",
4794
+ "primaryKey": false,
4795
+ "notNull": false,
4796
+ "autoincrement": false
4797
+ }
4798
+ },
4799
+ "indexes": {
4800
+ "idx_webauthn_challenges_expiry": {
4801
+ "name": "idx_webauthn_challenges_expiry",
4802
+ "columns": ["expires_at"],
4803
+ "isUnique": false
4804
+ }
4805
+ },
4806
+ "foreignKeys": {
4807
+ "webauthn_challenges_request_id_device_requests_id_fk": {
4808
+ "name": "webauthn_challenges_request_id_device_requests_id_fk",
4809
+ "tableFrom": "webauthn_challenges",
4810
+ "tableTo": "device_requests",
4811
+ "columnsFrom": ["request_id"],
4812
+ "columnsTo": ["id"],
4813
+ "onDelete": "no action",
4814
+ "onUpdate": "no action"
4815
+ },
4816
+ "webauthn_challenges_device_id_trusted_devices_id_fk": {
4817
+ "name": "webauthn_challenges_device_id_trusted_devices_id_fk",
4818
+ "tableFrom": "webauthn_challenges",
4819
+ "tableTo": "trusted_devices",
4820
+ "columnsFrom": ["device_id"],
4821
+ "columnsTo": ["id"],
4822
+ "onDelete": "no action",
4823
+ "onUpdate": "no action"
4824
+ }
4825
+ },
4826
+ "compositePrimaryKeys": {},
4827
+ "uniqueConstraints": {},
4828
+ "checkConstraints": {}
4829
+ },
4830
+ "webauthn_credentials": {
4831
+ "name": "webauthn_credentials",
4832
+ "columns": {
4833
+ "id": {
4834
+ "name": "id",
4835
+ "type": "text",
4836
+ "primaryKey": true,
4837
+ "notNull": true,
4838
+ "autoincrement": false
4839
+ },
4840
+ "device_id": {
4841
+ "name": "device_id",
4842
+ "type": "text",
4843
+ "primaryKey": false,
4844
+ "notNull": true,
4845
+ "autoincrement": false
4846
+ },
4847
+ "credential_id": {
4848
+ "name": "credential_id",
4849
+ "type": "text",
4850
+ "primaryKey": false,
4851
+ "notNull": true,
4852
+ "autoincrement": false
4853
+ },
4854
+ "public_key": {
4855
+ "name": "public_key",
4856
+ "type": "text",
4857
+ "primaryKey": false,
4858
+ "notNull": true,
4859
+ "autoincrement": false
4860
+ },
4861
+ "counter": {
4862
+ "name": "counter",
4863
+ "type": "integer",
4864
+ "primaryKey": false,
4865
+ "notNull": true,
4866
+ "autoincrement": false,
4867
+ "default": 0
4868
+ },
4869
+ "transports_json": {
4870
+ "name": "transports_json",
4871
+ "type": "text",
4872
+ "primaryKey": false,
4873
+ "notNull": true,
4874
+ "autoincrement": false,
4875
+ "default": "'[]'"
4876
+ },
4877
+ "aaguid": {
4878
+ "name": "aaguid",
4879
+ "type": "text",
4880
+ "primaryKey": false,
4881
+ "notNull": false,
4882
+ "autoincrement": false
4883
+ },
4884
+ "backup_eligible": {
4885
+ "name": "backup_eligible",
4886
+ "type": "integer",
4887
+ "primaryKey": false,
4888
+ "notNull": true,
4889
+ "autoincrement": false,
4890
+ "default": false
4891
+ },
4892
+ "backup_state": {
4893
+ "name": "backup_state",
4894
+ "type": "integer",
4895
+ "primaryKey": false,
4896
+ "notNull": true,
4897
+ "autoincrement": false,
4898
+ "default": false
4899
+ },
4900
+ "created_at": {
4901
+ "name": "created_at",
4902
+ "type": "integer",
4903
+ "primaryKey": false,
4904
+ "notNull": true,
4905
+ "autoincrement": false
4906
+ },
4907
+ "last_used_at": {
4908
+ "name": "last_used_at",
4909
+ "type": "integer",
4910
+ "primaryKey": false,
4911
+ "notNull": false,
4912
+ "autoincrement": false
4913
+ },
4914
+ "revoked_at": {
4915
+ "name": "revoked_at",
4916
+ "type": "integer",
4917
+ "primaryKey": false,
4918
+ "notNull": false,
4919
+ "autoincrement": false
4920
+ }
4921
+ },
4922
+ "indexes": {
4923
+ "webauthn_credentials_credential_id_unique": {
4924
+ "name": "webauthn_credentials_credential_id_unique",
4925
+ "columns": ["credential_id"],
4926
+ "isUnique": true
4927
+ },
4928
+ "idx_webauthn_credentials_device": {
4929
+ "name": "idx_webauthn_credentials_device",
4930
+ "columns": ["device_id"],
4931
+ "isUnique": false
4932
+ }
4933
+ },
4934
+ "foreignKeys": {
4935
+ "webauthn_credentials_device_id_trusted_devices_id_fk": {
4936
+ "name": "webauthn_credentials_device_id_trusted_devices_id_fk",
4937
+ "tableFrom": "webauthn_credentials",
4938
+ "tableTo": "trusted_devices",
4939
+ "columnsFrom": ["device_id"],
4940
+ "columnsTo": ["id"],
4941
+ "onDelete": "no action",
4942
+ "onUpdate": "no action"
4943
+ }
4944
+ },
4945
+ "compositePrimaryKeys": {},
4946
+ "uniqueConstraints": {},
4947
+ "checkConstraints": {}
4948
+ }
4949
+ },
4950
+ "views": {},
4951
+ "enums": {},
4952
+ "_meta": {
4953
+ "schemas": {},
4954
+ "tables": {},
4955
+ "columns": {}
4956
+ },
4957
+ "internal": {
4958
+ "indexes": {}
4959
+ }
4960
+ }