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,4408 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "3f86a836-7b9c-40fc-bf18-5ee1a0f5995e",
5
+ "prevId": "61f8487d-f850-404f-8073-f8f5c6c14178",
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
+ "created_at": {
660
+ "name": "created_at",
661
+ "type": "integer",
662
+ "primaryKey": false,
663
+ "notNull": true,
664
+ "autoincrement": false
665
+ }
666
+ },
667
+ "indexes": {
668
+ "idx_credential_profiles_provider": {
669
+ "name": "idx_credential_profiles_provider",
670
+ "columns": ["provider"],
671
+ "isUnique": false
672
+ }
673
+ },
674
+ "foreignKeys": {
675
+ "credential_profiles_secret_ref_secrets_id_fk": {
676
+ "name": "credential_profiles_secret_ref_secrets_id_fk",
677
+ "tableFrom": "credential_profiles",
678
+ "tableTo": "secrets",
679
+ "columnsFrom": ["secret_ref"],
680
+ "columnsTo": ["id"],
681
+ "onDelete": "cascade",
682
+ "onUpdate": "no action"
683
+ }
684
+ },
685
+ "compositePrimaryKeys": {},
686
+ "uniqueConstraints": {},
687
+ "checkConstraints": {}
688
+ },
689
+ "deployment_approvals": {
690
+ "name": "deployment_approvals",
691
+ "columns": {
692
+ "id": {
693
+ "name": "id",
694
+ "type": "text",
695
+ "primaryKey": true,
696
+ "notNull": true,
697
+ "autoincrement": false
698
+ },
699
+ "authorization_id": {
700
+ "name": "authorization_id",
701
+ "type": "text",
702
+ "primaryKey": false,
703
+ "notNull": true,
704
+ "autoincrement": false
705
+ },
706
+ "plan_id": {
707
+ "name": "plan_id",
708
+ "type": "text",
709
+ "primaryKey": false,
710
+ "notNull": true,
711
+ "autoincrement": false
712
+ },
713
+ "target_id": {
714
+ "name": "target_id",
715
+ "type": "text",
716
+ "primaryKey": false,
717
+ "notNull": true,
718
+ "autoincrement": false
719
+ },
720
+ "project_id": {
721
+ "name": "project_id",
722
+ "type": "text",
723
+ "primaryKey": false,
724
+ "notNull": true,
725
+ "autoincrement": false
726
+ },
727
+ "status": {
728
+ "name": "status",
729
+ "type": "text",
730
+ "primaryKey": false,
731
+ "notNull": true,
732
+ "autoincrement": false
733
+ },
734
+ "plan_hash": {
735
+ "name": "plan_hash",
736
+ "type": "text",
737
+ "primaryKey": false,
738
+ "notNull": true,
739
+ "autoincrement": false
740
+ },
741
+ "artifact_hash": {
742
+ "name": "artifact_hash",
743
+ "type": "text",
744
+ "primaryKey": false,
745
+ "notNull": true,
746
+ "autoincrement": false
747
+ },
748
+ "requested_by": {
749
+ "name": "requested_by",
750
+ "type": "text",
751
+ "primaryKey": false,
752
+ "notNull": true,
753
+ "autoincrement": false
754
+ },
755
+ "decided_by": {
756
+ "name": "decided_by",
757
+ "type": "text",
758
+ "primaryKey": false,
759
+ "notNull": false,
760
+ "autoincrement": false
761
+ },
762
+ "expires_at": {
763
+ "name": "expires_at",
764
+ "type": "integer",
765
+ "primaryKey": false,
766
+ "notNull": true,
767
+ "autoincrement": false
768
+ },
769
+ "decided_at": {
770
+ "name": "decided_at",
771
+ "type": "integer",
772
+ "primaryKey": false,
773
+ "notNull": false,
774
+ "autoincrement": false
775
+ },
776
+ "created_at": {
777
+ "name": "created_at",
778
+ "type": "integer",
779
+ "primaryKey": false,
780
+ "notNull": true,
781
+ "autoincrement": false
782
+ }
783
+ },
784
+ "indexes": {
785
+ "deployment_approvals_authorization": {
786
+ "name": "deployment_approvals_authorization",
787
+ "columns": ["authorization_id"],
788
+ "isUnique": true
789
+ },
790
+ "deployment_approvals_status_expires": {
791
+ "name": "deployment_approvals_status_expires",
792
+ "columns": ["status", "expires_at"],
793
+ "isUnique": false
794
+ }
795
+ },
796
+ "foreignKeys": {
797
+ "deployment_approvals_authorization_id_deployment_authorizations_id_fk": {
798
+ "name": "deployment_approvals_authorization_id_deployment_authorizations_id_fk",
799
+ "tableFrom": "deployment_approvals",
800
+ "tableTo": "deployment_authorizations",
801
+ "columnsFrom": ["authorization_id"],
802
+ "columnsTo": ["id"],
803
+ "onDelete": "no action",
804
+ "onUpdate": "no action"
805
+ },
806
+ "deployment_approvals_plan_id_deployment_plans_id_fk": {
807
+ "name": "deployment_approvals_plan_id_deployment_plans_id_fk",
808
+ "tableFrom": "deployment_approvals",
809
+ "tableTo": "deployment_plans",
810
+ "columnsFrom": ["plan_id"],
811
+ "columnsTo": ["id"],
812
+ "onDelete": "no action",
813
+ "onUpdate": "no action"
814
+ },
815
+ "deployment_approvals_target_id_deployment_targets_id_fk": {
816
+ "name": "deployment_approvals_target_id_deployment_targets_id_fk",
817
+ "tableFrom": "deployment_approvals",
818
+ "tableTo": "deployment_targets",
819
+ "columnsFrom": ["target_id"],
820
+ "columnsTo": ["id"],
821
+ "onDelete": "no action",
822
+ "onUpdate": "no action"
823
+ },
824
+ "deployment_approvals_project_id_projects_id_fk": {
825
+ "name": "deployment_approvals_project_id_projects_id_fk",
826
+ "tableFrom": "deployment_approvals",
827
+ "tableTo": "projects",
828
+ "columnsFrom": ["project_id"],
829
+ "columnsTo": ["id"],
830
+ "onDelete": "no action",
831
+ "onUpdate": "no action"
832
+ }
833
+ },
834
+ "compositePrimaryKeys": {},
835
+ "uniqueConstraints": {},
836
+ "checkConstraints": {
837
+ "deployment_approvals_status": {
838
+ "name": "deployment_approvals_status",
839
+ "value": "\"deployment_approvals\".\"status\" IN ('PENDING', 'APPROVED', 'DENIED', 'EXPIRED', 'REVOKED')"
840
+ },
841
+ "deployment_approvals_plan_hash": {
842
+ "name": "deployment_approvals_plan_hash",
843
+ "value": "length(\"deployment_approvals\".\"plan_hash\") = 64"
844
+ },
845
+ "deployment_approvals_artifact_hash": {
846
+ "name": "deployment_approvals_artifact_hash",
847
+ "value": "length(\"deployment_approvals\".\"artifact_hash\") = 64"
848
+ }
849
+ }
850
+ },
851
+ "deployment_artifacts": {
852
+ "name": "deployment_artifacts",
853
+ "columns": {
854
+ "id": {
855
+ "name": "id",
856
+ "type": "text",
857
+ "primaryKey": true,
858
+ "notNull": true,
859
+ "autoincrement": false
860
+ },
861
+ "build_id": {
862
+ "name": "build_id",
863
+ "type": "text",
864
+ "primaryKey": false,
865
+ "notNull": true,
866
+ "autoincrement": false
867
+ },
868
+ "target_id": {
869
+ "name": "target_id",
870
+ "type": "text",
871
+ "primaryKey": false,
872
+ "notNull": true,
873
+ "autoincrement": false
874
+ },
875
+ "project_id": {
876
+ "name": "project_id",
877
+ "type": "text",
878
+ "primaryKey": false,
879
+ "notNull": true,
880
+ "autoincrement": false
881
+ },
882
+ "version": {
883
+ "name": "version",
884
+ "type": "text",
885
+ "primaryKey": false,
886
+ "notNull": true,
887
+ "autoincrement": false
888
+ },
889
+ "artifact_hash": {
890
+ "name": "artifact_hash",
891
+ "type": "text",
892
+ "primaryKey": false,
893
+ "notNull": true,
894
+ "autoincrement": false
895
+ },
896
+ "artifact_path": {
897
+ "name": "artifact_path",
898
+ "type": "text",
899
+ "primaryKey": false,
900
+ "notNull": true,
901
+ "autoincrement": false
902
+ },
903
+ "size_bytes": {
904
+ "name": "size_bytes",
905
+ "type": "integer",
906
+ "primaryKey": false,
907
+ "notNull": true,
908
+ "autoincrement": false
909
+ },
910
+ "file_count": {
911
+ "name": "file_count",
912
+ "type": "integer",
913
+ "primaryKey": false,
914
+ "notNull": true,
915
+ "autoincrement": false
916
+ },
917
+ "spec_json": {
918
+ "name": "spec_json",
919
+ "type": "text",
920
+ "primaryKey": false,
921
+ "notNull": true,
922
+ "autoincrement": false
923
+ },
924
+ "spec_hash": {
925
+ "name": "spec_hash",
926
+ "type": "text",
927
+ "primaryKey": false,
928
+ "notNull": true,
929
+ "autoincrement": false
930
+ },
931
+ "source_json": {
932
+ "name": "source_json",
933
+ "type": "text",
934
+ "primaryKey": false,
935
+ "notNull": true,
936
+ "autoincrement": false
937
+ },
938
+ "created_at": {
939
+ "name": "created_at",
940
+ "type": "integer",
941
+ "primaryKey": false,
942
+ "notNull": true,
943
+ "autoincrement": false
944
+ }
945
+ },
946
+ "indexes": {
947
+ "deployment_artifacts_build": {
948
+ "name": "deployment_artifacts_build",
949
+ "columns": ["build_id"],
950
+ "isUnique": true
951
+ },
952
+ "deployment_artifacts_target_version": {
953
+ "name": "deployment_artifacts_target_version",
954
+ "columns": ["target_id", "version"],
955
+ "isUnique": true
956
+ },
957
+ "deployment_artifacts_target_created": {
958
+ "name": "deployment_artifacts_target_created",
959
+ "columns": ["target_id", "created_at"],
960
+ "isUnique": false
961
+ }
962
+ },
963
+ "foreignKeys": {
964
+ "deployment_artifacts_build_id_deployment_builds_id_fk": {
965
+ "name": "deployment_artifacts_build_id_deployment_builds_id_fk",
966
+ "tableFrom": "deployment_artifacts",
967
+ "tableTo": "deployment_builds",
968
+ "columnsFrom": ["build_id"],
969
+ "columnsTo": ["id"],
970
+ "onDelete": "no action",
971
+ "onUpdate": "no action"
972
+ },
973
+ "deployment_artifacts_target_id_deployment_targets_id_fk": {
974
+ "name": "deployment_artifacts_target_id_deployment_targets_id_fk",
975
+ "tableFrom": "deployment_artifacts",
976
+ "tableTo": "deployment_targets",
977
+ "columnsFrom": ["target_id"],
978
+ "columnsTo": ["id"],
979
+ "onDelete": "no action",
980
+ "onUpdate": "no action"
981
+ },
982
+ "deployment_artifacts_project_id_projects_id_fk": {
983
+ "name": "deployment_artifacts_project_id_projects_id_fk",
984
+ "tableFrom": "deployment_artifacts",
985
+ "tableTo": "projects",
986
+ "columnsFrom": ["project_id"],
987
+ "columnsTo": ["id"],
988
+ "onDelete": "no action",
989
+ "onUpdate": "no action"
990
+ }
991
+ },
992
+ "compositePrimaryKeys": {},
993
+ "uniqueConstraints": {},
994
+ "checkConstraints": {
995
+ "deployment_artifacts_hash": {
996
+ "name": "deployment_artifacts_hash",
997
+ "value": "length(\"deployment_artifacts\".\"artifact_hash\") = 64"
998
+ },
999
+ "deployment_artifacts_size": {
1000
+ "name": "deployment_artifacts_size",
1001
+ "value": "\"deployment_artifacts\".\"size_bytes\" >= 0"
1002
+ },
1003
+ "deployment_artifacts_count": {
1004
+ "name": "deployment_artifacts_count",
1005
+ "value": "\"deployment_artifacts\".\"file_count\" >= 0"
1006
+ }
1007
+ }
1008
+ },
1009
+ "deployment_authorizations": {
1010
+ "name": "deployment_authorizations",
1011
+ "columns": {
1012
+ "id": {
1013
+ "name": "id",
1014
+ "type": "text",
1015
+ "primaryKey": true,
1016
+ "notNull": true,
1017
+ "autoincrement": false
1018
+ },
1019
+ "plan_id": {
1020
+ "name": "plan_id",
1021
+ "type": "text",
1022
+ "primaryKey": false,
1023
+ "notNull": true,
1024
+ "autoincrement": false
1025
+ },
1026
+ "target_id": {
1027
+ "name": "target_id",
1028
+ "type": "text",
1029
+ "primaryKey": false,
1030
+ "notNull": true,
1031
+ "autoincrement": false
1032
+ },
1033
+ "project_id": {
1034
+ "name": "project_id",
1035
+ "type": "text",
1036
+ "primaryKey": false,
1037
+ "notNull": true,
1038
+ "autoincrement": false
1039
+ },
1040
+ "action": {
1041
+ "name": "action",
1042
+ "type": "text",
1043
+ "primaryKey": false,
1044
+ "notNull": true,
1045
+ "autoincrement": false
1046
+ },
1047
+ "actor_type": {
1048
+ "name": "actor_type",
1049
+ "type": "text",
1050
+ "primaryKey": false,
1051
+ "notNull": true,
1052
+ "autoincrement": false
1053
+ },
1054
+ "actor_id": {
1055
+ "name": "actor_id",
1056
+ "type": "text",
1057
+ "primaryKey": false,
1058
+ "notNull": true,
1059
+ "autoincrement": false
1060
+ },
1061
+ "client_session_id": {
1062
+ "name": "client_session_id",
1063
+ "type": "text",
1064
+ "primaryKey": false,
1065
+ "notNull": false,
1066
+ "autoincrement": false
1067
+ },
1068
+ "session_id": {
1069
+ "name": "session_id",
1070
+ "type": "text",
1071
+ "primaryKey": false,
1072
+ "notNull": false,
1073
+ "autoincrement": false
1074
+ },
1075
+ "turn_id": {
1076
+ "name": "turn_id",
1077
+ "type": "text",
1078
+ "primaryKey": false,
1079
+ "notNull": false,
1080
+ "autoincrement": false
1081
+ },
1082
+ "policy": {
1083
+ "name": "policy",
1084
+ "type": "text",
1085
+ "primaryKey": false,
1086
+ "notNull": true,
1087
+ "autoincrement": false
1088
+ },
1089
+ "policy_snapshot_id": {
1090
+ "name": "policy_snapshot_id",
1091
+ "type": "text",
1092
+ "primaryKey": false,
1093
+ "notNull": true,
1094
+ "autoincrement": false
1095
+ },
1096
+ "status": {
1097
+ "name": "status",
1098
+ "type": "text",
1099
+ "primaryKey": false,
1100
+ "notNull": true,
1101
+ "autoincrement": false
1102
+ },
1103
+ "plan_hash": {
1104
+ "name": "plan_hash",
1105
+ "type": "text",
1106
+ "primaryKey": false,
1107
+ "notNull": true,
1108
+ "autoincrement": false
1109
+ },
1110
+ "artifact_hash": {
1111
+ "name": "artifact_hash",
1112
+ "type": "text",
1113
+ "primaryKey": false,
1114
+ "notNull": true,
1115
+ "autoincrement": false
1116
+ },
1117
+ "scope_json": {
1118
+ "name": "scope_json",
1119
+ "type": "text",
1120
+ "primaryKey": false,
1121
+ "notNull": true,
1122
+ "autoincrement": false
1123
+ },
1124
+ "scope_hash": {
1125
+ "name": "scope_hash",
1126
+ "type": "text",
1127
+ "primaryKey": false,
1128
+ "notNull": true,
1129
+ "autoincrement": false
1130
+ },
1131
+ "approval_id": {
1132
+ "name": "approval_id",
1133
+ "type": "text",
1134
+ "primaryKey": false,
1135
+ "notNull": false,
1136
+ "autoincrement": false
1137
+ },
1138
+ "request_key": {
1139
+ "name": "request_key",
1140
+ "type": "text",
1141
+ "primaryKey": false,
1142
+ "notNull": true,
1143
+ "autoincrement": false
1144
+ },
1145
+ "expires_at": {
1146
+ "name": "expires_at",
1147
+ "type": "integer",
1148
+ "primaryKey": false,
1149
+ "notNull": true,
1150
+ "autoincrement": false
1151
+ },
1152
+ "decided_at": {
1153
+ "name": "decided_at",
1154
+ "type": "integer",
1155
+ "primaryKey": false,
1156
+ "notNull": false,
1157
+ "autoincrement": false
1158
+ },
1159
+ "consumed_at": {
1160
+ "name": "consumed_at",
1161
+ "type": "integer",
1162
+ "primaryKey": false,
1163
+ "notNull": false,
1164
+ "autoincrement": false
1165
+ },
1166
+ "consume_key": {
1167
+ "name": "consume_key",
1168
+ "type": "text",
1169
+ "primaryKey": false,
1170
+ "notNull": false,
1171
+ "autoincrement": false
1172
+ },
1173
+ "reason_code": {
1174
+ "name": "reason_code",
1175
+ "type": "text",
1176
+ "primaryKey": false,
1177
+ "notNull": false,
1178
+ "autoincrement": false
1179
+ },
1180
+ "created_at": {
1181
+ "name": "created_at",
1182
+ "type": "integer",
1183
+ "primaryKey": false,
1184
+ "notNull": true,
1185
+ "autoincrement": false
1186
+ }
1187
+ },
1188
+ "indexes": {
1189
+ "deployment_authorizations_request": {
1190
+ "name": "deployment_authorizations_request",
1191
+ "columns": ["request_key"],
1192
+ "isUnique": true
1193
+ },
1194
+ "deployment_authorizations_plan_status": {
1195
+ "name": "deployment_authorizations_plan_status",
1196
+ "columns": ["plan_id", "status"],
1197
+ "isUnique": false
1198
+ },
1199
+ "deployment_authorizations_target_status": {
1200
+ "name": "deployment_authorizations_target_status",
1201
+ "columns": ["target_id", "status"],
1202
+ "isUnique": false
1203
+ },
1204
+ "deployment_authorizations_status_expires": {
1205
+ "name": "deployment_authorizations_status_expires",
1206
+ "columns": ["status", "expires_at"],
1207
+ "isUnique": false
1208
+ }
1209
+ },
1210
+ "foreignKeys": {
1211
+ "deployment_authorizations_plan_id_deployment_plans_id_fk": {
1212
+ "name": "deployment_authorizations_plan_id_deployment_plans_id_fk",
1213
+ "tableFrom": "deployment_authorizations",
1214
+ "tableTo": "deployment_plans",
1215
+ "columnsFrom": ["plan_id"],
1216
+ "columnsTo": ["id"],
1217
+ "onDelete": "no action",
1218
+ "onUpdate": "no action"
1219
+ },
1220
+ "deployment_authorizations_target_id_deployment_targets_id_fk": {
1221
+ "name": "deployment_authorizations_target_id_deployment_targets_id_fk",
1222
+ "tableFrom": "deployment_authorizations",
1223
+ "tableTo": "deployment_targets",
1224
+ "columnsFrom": ["target_id"],
1225
+ "columnsTo": ["id"],
1226
+ "onDelete": "no action",
1227
+ "onUpdate": "no action"
1228
+ },
1229
+ "deployment_authorizations_project_id_projects_id_fk": {
1230
+ "name": "deployment_authorizations_project_id_projects_id_fk",
1231
+ "tableFrom": "deployment_authorizations",
1232
+ "tableTo": "projects",
1233
+ "columnsFrom": ["project_id"],
1234
+ "columnsTo": ["id"],
1235
+ "onDelete": "no action",
1236
+ "onUpdate": "no action"
1237
+ }
1238
+ },
1239
+ "compositePrimaryKeys": {},
1240
+ "uniqueConstraints": {},
1241
+ "checkConstraints": {
1242
+ "deployment_authorizations_action": {
1243
+ "name": "deployment_authorizations_action",
1244
+ "value": "\"deployment_authorizations\".\"action\" = 'apply'"
1245
+ },
1246
+ "deployment_authorizations_actor": {
1247
+ "name": "deployment_authorizations_actor",
1248
+ "value": "\"deployment_authorizations\".\"actor_type\" IN ('human', 'agent')"
1249
+ },
1250
+ "deployment_authorizations_policy": {
1251
+ "name": "deployment_authorizations_policy",
1252
+ "value": "\"deployment_authorizations\".\"policy\" IN ('standard', 'strict', 'readonly', 'autonomous')"
1253
+ },
1254
+ "deployment_authorizations_status": {
1255
+ "name": "deployment_authorizations_status",
1256
+ "value": "\"deployment_authorizations\".\"status\" IN ('PENDING', 'AUTHORIZED', 'DENIED', 'EXPIRED', 'REVOKED', 'CONSUMED', 'INVALIDATED')"
1257
+ },
1258
+ "deployment_authorizations_plan_hash": {
1259
+ "name": "deployment_authorizations_plan_hash",
1260
+ "value": "length(\"deployment_authorizations\".\"plan_hash\") = 64"
1261
+ },
1262
+ "deployment_authorizations_artifact_hash": {
1263
+ "name": "deployment_authorizations_artifact_hash",
1264
+ "value": "length(\"deployment_authorizations\".\"artifact_hash\") = 64"
1265
+ },
1266
+ "deployment_authorizations_scope_hash": {
1267
+ "name": "deployment_authorizations_scope_hash",
1268
+ "value": "length(\"deployment_authorizations\".\"scope_hash\") = 64"
1269
+ }
1270
+ }
1271
+ },
1272
+ "deployment_builds": {
1273
+ "name": "deployment_builds",
1274
+ "columns": {
1275
+ "id": {
1276
+ "name": "id",
1277
+ "type": "text",
1278
+ "primaryKey": true,
1279
+ "notNull": true,
1280
+ "autoincrement": false
1281
+ },
1282
+ "target_id": {
1283
+ "name": "target_id",
1284
+ "type": "text",
1285
+ "primaryKey": false,
1286
+ "notNull": true,
1287
+ "autoincrement": false
1288
+ },
1289
+ "project_id": {
1290
+ "name": "project_id",
1291
+ "type": "text",
1292
+ "primaryKey": false,
1293
+ "notNull": true,
1294
+ "autoincrement": false
1295
+ },
1296
+ "request_key": {
1297
+ "name": "request_key",
1298
+ "type": "text",
1299
+ "primaryKey": false,
1300
+ "notNull": true,
1301
+ "autoincrement": false
1302
+ },
1303
+ "requested_by": {
1304
+ "name": "requested_by",
1305
+ "type": "text",
1306
+ "primaryKey": false,
1307
+ "notNull": true,
1308
+ "autoincrement": false
1309
+ },
1310
+ "status": {
1311
+ "name": "status",
1312
+ "type": "text",
1313
+ "primaryKey": false,
1314
+ "notNull": true,
1315
+ "autoincrement": false
1316
+ },
1317
+ "spec_json": {
1318
+ "name": "spec_json",
1319
+ "type": "text",
1320
+ "primaryKey": false,
1321
+ "notNull": true,
1322
+ "autoincrement": false
1323
+ },
1324
+ "spec_hash": {
1325
+ "name": "spec_hash",
1326
+ "type": "text",
1327
+ "primaryKey": false,
1328
+ "notNull": true,
1329
+ "autoincrement": false
1330
+ },
1331
+ "reason_code": {
1332
+ "name": "reason_code",
1333
+ "type": "text",
1334
+ "primaryKey": false,
1335
+ "notNull": false,
1336
+ "autoincrement": false
1337
+ },
1338
+ "log_ref": {
1339
+ "name": "log_ref",
1340
+ "type": "text",
1341
+ "primaryKey": false,
1342
+ "notNull": true,
1343
+ "autoincrement": false
1344
+ },
1345
+ "started_at": {
1346
+ "name": "started_at",
1347
+ "type": "integer",
1348
+ "primaryKey": false,
1349
+ "notNull": false,
1350
+ "autoincrement": false
1351
+ },
1352
+ "ended_at": {
1353
+ "name": "ended_at",
1354
+ "type": "integer",
1355
+ "primaryKey": false,
1356
+ "notNull": false,
1357
+ "autoincrement": false
1358
+ },
1359
+ "created_at": {
1360
+ "name": "created_at",
1361
+ "type": "integer",
1362
+ "primaryKey": false,
1363
+ "notNull": true,
1364
+ "autoincrement": false
1365
+ }
1366
+ },
1367
+ "indexes": {
1368
+ "deployment_builds_request": {
1369
+ "name": "deployment_builds_request",
1370
+ "columns": ["request_key"],
1371
+ "isUnique": true
1372
+ },
1373
+ "deployment_builds_target_created": {
1374
+ "name": "deployment_builds_target_created",
1375
+ "columns": ["target_id", "created_at"],
1376
+ "isUnique": false
1377
+ },
1378
+ "deployment_builds_status": {
1379
+ "name": "deployment_builds_status",
1380
+ "columns": ["status"],
1381
+ "isUnique": false
1382
+ }
1383
+ },
1384
+ "foreignKeys": {
1385
+ "deployment_builds_target_id_deployment_targets_id_fk": {
1386
+ "name": "deployment_builds_target_id_deployment_targets_id_fk",
1387
+ "tableFrom": "deployment_builds",
1388
+ "tableTo": "deployment_targets",
1389
+ "columnsFrom": ["target_id"],
1390
+ "columnsTo": ["id"],
1391
+ "onDelete": "no action",
1392
+ "onUpdate": "no action"
1393
+ },
1394
+ "deployment_builds_project_id_projects_id_fk": {
1395
+ "name": "deployment_builds_project_id_projects_id_fk",
1396
+ "tableFrom": "deployment_builds",
1397
+ "tableTo": "projects",
1398
+ "columnsFrom": ["project_id"],
1399
+ "columnsTo": ["id"],
1400
+ "onDelete": "no action",
1401
+ "onUpdate": "no action"
1402
+ }
1403
+ },
1404
+ "compositePrimaryKeys": {},
1405
+ "uniqueConstraints": {},
1406
+ "checkConstraints": {
1407
+ "deployment_builds_status": {
1408
+ "name": "deployment_builds_status",
1409
+ "value": "\"deployment_builds\".\"status\" IN ('RUNNING', 'SUCCEEDED', 'FAILED', 'CANCELLED')"
1410
+ }
1411
+ }
1412
+ },
1413
+ "deployment_plans": {
1414
+ "name": "deployment_plans",
1415
+ "columns": {
1416
+ "id": {
1417
+ "name": "id",
1418
+ "type": "text",
1419
+ "primaryKey": true,
1420
+ "notNull": true,
1421
+ "autoincrement": false
1422
+ },
1423
+ "target_id": {
1424
+ "name": "target_id",
1425
+ "type": "text",
1426
+ "primaryKey": false,
1427
+ "notNull": true,
1428
+ "autoincrement": false
1429
+ },
1430
+ "project_id": {
1431
+ "name": "project_id",
1432
+ "type": "text",
1433
+ "primaryKey": false,
1434
+ "notNull": true,
1435
+ "autoincrement": false
1436
+ },
1437
+ "artifact_id": {
1438
+ "name": "artifact_id",
1439
+ "type": "text",
1440
+ "primaryKey": false,
1441
+ "notNull": true,
1442
+ "autoincrement": false
1443
+ },
1444
+ "previous_artifact_id": {
1445
+ "name": "previous_artifact_id",
1446
+ "type": "text",
1447
+ "primaryKey": false,
1448
+ "notNull": false,
1449
+ "autoincrement": false
1450
+ },
1451
+ "previous_version": {
1452
+ "name": "previous_version",
1453
+ "type": "text",
1454
+ "primaryKey": false,
1455
+ "notNull": false,
1456
+ "autoincrement": false
1457
+ },
1458
+ "version": {
1459
+ "name": "version",
1460
+ "type": "text",
1461
+ "primaryKey": false,
1462
+ "notNull": true,
1463
+ "autoincrement": false
1464
+ },
1465
+ "plan_json": {
1466
+ "name": "plan_json",
1467
+ "type": "text",
1468
+ "primaryKey": false,
1469
+ "notNull": true,
1470
+ "autoincrement": false
1471
+ },
1472
+ "plan_hash": {
1473
+ "name": "plan_hash",
1474
+ "type": "text",
1475
+ "primaryKey": false,
1476
+ "notNull": true,
1477
+ "autoincrement": false
1478
+ },
1479
+ "status": {
1480
+ "name": "status",
1481
+ "type": "text",
1482
+ "primaryKey": false,
1483
+ "notNull": true,
1484
+ "autoincrement": false
1485
+ },
1486
+ "expires_at": {
1487
+ "name": "expires_at",
1488
+ "type": "integer",
1489
+ "primaryKey": false,
1490
+ "notNull": true,
1491
+ "autoincrement": false
1492
+ },
1493
+ "request_key": {
1494
+ "name": "request_key",
1495
+ "type": "text",
1496
+ "primaryKey": false,
1497
+ "notNull": true,
1498
+ "autoincrement": false
1499
+ },
1500
+ "requested_by": {
1501
+ "name": "requested_by",
1502
+ "type": "text",
1503
+ "primaryKey": false,
1504
+ "notNull": true,
1505
+ "autoincrement": false
1506
+ },
1507
+ "created_at": {
1508
+ "name": "created_at",
1509
+ "type": "integer",
1510
+ "primaryKey": false,
1511
+ "notNull": true,
1512
+ "autoincrement": false
1513
+ }
1514
+ },
1515
+ "indexes": {
1516
+ "deployment_plans_request": {
1517
+ "name": "deployment_plans_request",
1518
+ "columns": ["request_key"],
1519
+ "isUnique": true
1520
+ },
1521
+ "deployment_plans_target_created": {
1522
+ "name": "deployment_plans_target_created",
1523
+ "columns": ["target_id", "created_at"],
1524
+ "isUnique": false
1525
+ },
1526
+ "deployment_plans_status_expires": {
1527
+ "name": "deployment_plans_status_expires",
1528
+ "columns": ["status", "expires_at"],
1529
+ "isUnique": false
1530
+ }
1531
+ },
1532
+ "foreignKeys": {
1533
+ "deployment_plans_target_id_deployment_targets_id_fk": {
1534
+ "name": "deployment_plans_target_id_deployment_targets_id_fk",
1535
+ "tableFrom": "deployment_plans",
1536
+ "tableTo": "deployment_targets",
1537
+ "columnsFrom": ["target_id"],
1538
+ "columnsTo": ["id"],
1539
+ "onDelete": "no action",
1540
+ "onUpdate": "no action"
1541
+ },
1542
+ "deployment_plans_project_id_projects_id_fk": {
1543
+ "name": "deployment_plans_project_id_projects_id_fk",
1544
+ "tableFrom": "deployment_plans",
1545
+ "tableTo": "projects",
1546
+ "columnsFrom": ["project_id"],
1547
+ "columnsTo": ["id"],
1548
+ "onDelete": "no action",
1549
+ "onUpdate": "no action"
1550
+ },
1551
+ "deployment_plans_artifact_id_deployment_artifacts_id_fk": {
1552
+ "name": "deployment_plans_artifact_id_deployment_artifacts_id_fk",
1553
+ "tableFrom": "deployment_plans",
1554
+ "tableTo": "deployment_artifacts",
1555
+ "columnsFrom": ["artifact_id"],
1556
+ "columnsTo": ["id"],
1557
+ "onDelete": "no action",
1558
+ "onUpdate": "no action"
1559
+ },
1560
+ "deployment_plans_previous_artifact_id_deployment_artifacts_id_fk": {
1561
+ "name": "deployment_plans_previous_artifact_id_deployment_artifacts_id_fk",
1562
+ "tableFrom": "deployment_plans",
1563
+ "tableTo": "deployment_artifacts",
1564
+ "columnsFrom": ["previous_artifact_id"],
1565
+ "columnsTo": ["id"],
1566
+ "onDelete": "no action",
1567
+ "onUpdate": "no action"
1568
+ }
1569
+ },
1570
+ "compositePrimaryKeys": {},
1571
+ "uniqueConstraints": {},
1572
+ "checkConstraints": {
1573
+ "deployment_plans_status": {
1574
+ "name": "deployment_plans_status",
1575
+ "value": "\"deployment_plans\".\"status\" IN ('READY', 'WAITING_APPROVAL', 'AUTHORIZED', 'APPLYING', 'HEALTH_CHECK', 'SUCCEEDED', 'FAILED', 'CANCELLED', 'EXPIRED', 'INVALIDATED', 'UNKNOWN')"
1576
+ },
1577
+ "deployment_plans_hash": {
1578
+ "name": "deployment_plans_hash",
1579
+ "value": "length(\"deployment_plans\".\"plan_hash\") = 64"
1580
+ },
1581
+ "deployment_plans_previous": {
1582
+ "name": "deployment_plans_previous",
1583
+ "value": "(\"deployment_plans\".\"previous_artifact_id\" IS NULL) = (\"deployment_plans\".\"previous_version\" IS NULL)"
1584
+ }
1585
+ }
1586
+ },
1587
+ "deployment_targets": {
1588
+ "name": "deployment_targets",
1589
+ "columns": {
1590
+ "id": {
1591
+ "name": "id",
1592
+ "type": "text",
1593
+ "primaryKey": true,
1594
+ "notNull": true,
1595
+ "autoincrement": false
1596
+ },
1597
+ "project_id": {
1598
+ "name": "project_id",
1599
+ "type": "text",
1600
+ "primaryKey": false,
1601
+ "notNull": true,
1602
+ "autoincrement": false
1603
+ },
1604
+ "name": {
1605
+ "name": "name",
1606
+ "type": "text",
1607
+ "primaryKey": false,
1608
+ "notNull": true,
1609
+ "autoincrement": false
1610
+ },
1611
+ "current_artifact_id": {
1612
+ "name": "current_artifact_id",
1613
+ "type": "text",
1614
+ "primaryKey": false,
1615
+ "notNull": false,
1616
+ "autoincrement": false
1617
+ },
1618
+ "current_version": {
1619
+ "name": "current_version",
1620
+ "type": "text",
1621
+ "primaryKey": false,
1622
+ "notNull": false,
1623
+ "autoincrement": false
1624
+ },
1625
+ "created_at": {
1626
+ "name": "created_at",
1627
+ "type": "integer",
1628
+ "primaryKey": false,
1629
+ "notNull": true,
1630
+ "autoincrement": false
1631
+ },
1632
+ "updated_at": {
1633
+ "name": "updated_at",
1634
+ "type": "integer",
1635
+ "primaryKey": false,
1636
+ "notNull": true,
1637
+ "autoincrement": false
1638
+ }
1639
+ },
1640
+ "indexes": {
1641
+ "deployment_targets_project_name": {
1642
+ "name": "deployment_targets_project_name",
1643
+ "columns": ["project_id", "name"],
1644
+ "isUnique": true
1645
+ },
1646
+ "deployment_targets_project_updated": {
1647
+ "name": "deployment_targets_project_updated",
1648
+ "columns": ["project_id", "updated_at"],
1649
+ "isUnique": false
1650
+ }
1651
+ },
1652
+ "foreignKeys": {
1653
+ "deployment_targets_project_id_projects_id_fk": {
1654
+ "name": "deployment_targets_project_id_projects_id_fk",
1655
+ "tableFrom": "deployment_targets",
1656
+ "tableTo": "projects",
1657
+ "columnsFrom": ["project_id"],
1658
+ "columnsTo": ["id"],
1659
+ "onDelete": "no action",
1660
+ "onUpdate": "no action"
1661
+ }
1662
+ },
1663
+ "compositePrimaryKeys": {},
1664
+ "uniqueConstraints": {},
1665
+ "checkConstraints": {
1666
+ "deployment_targets_current": {
1667
+ "name": "deployment_targets_current",
1668
+ "value": "(\"deployment_targets\".\"current_artifact_id\" IS NULL) = (\"deployment_targets\".\"current_version\" IS NULL)"
1669
+ }
1670
+ }
1671
+ },
1672
+ "device_requests": {
1673
+ "name": "device_requests",
1674
+ "columns": {
1675
+ "id": {
1676
+ "name": "id",
1677
+ "type": "text",
1678
+ "primaryKey": true,
1679
+ "notNull": true,
1680
+ "autoincrement": false
1681
+ },
1682
+ "short_code": {
1683
+ "name": "short_code",
1684
+ "type": "text",
1685
+ "primaryKey": false,
1686
+ "notNull": true,
1687
+ "autoincrement": false
1688
+ },
1689
+ "status": {
1690
+ "name": "status",
1691
+ "type": "text",
1692
+ "primaryKey": false,
1693
+ "notNull": true,
1694
+ "autoincrement": false
1695
+ },
1696
+ "decision": {
1697
+ "name": "decision",
1698
+ "type": "text",
1699
+ "primaryKey": false,
1700
+ "notNull": false,
1701
+ "autoincrement": false
1702
+ },
1703
+ "client_label": {
1704
+ "name": "client_label",
1705
+ "type": "text",
1706
+ "primaryKey": false,
1707
+ "notNull": false,
1708
+ "autoincrement": false
1709
+ },
1710
+ "user_agent": {
1711
+ "name": "user_agent",
1712
+ "type": "text",
1713
+ "primaryKey": false,
1714
+ "notNull": false,
1715
+ "autoincrement": false
1716
+ },
1717
+ "ip": {
1718
+ "name": "ip",
1719
+ "type": "text",
1720
+ "primaryKey": false,
1721
+ "notNull": false,
1722
+ "autoincrement": false
1723
+ },
1724
+ "client_origin": {
1725
+ "name": "client_origin",
1726
+ "type": "text",
1727
+ "primaryKey": false,
1728
+ "notNull": false,
1729
+ "autoincrement": false
1730
+ },
1731
+ "poll_token_hash": {
1732
+ "name": "poll_token_hash",
1733
+ "type": "text",
1734
+ "primaryKey": false,
1735
+ "notNull": true,
1736
+ "autoincrement": false
1737
+ },
1738
+ "code_hash": {
1739
+ "name": "code_hash",
1740
+ "type": "text",
1741
+ "primaryKey": false,
1742
+ "notNull": false,
1743
+ "autoincrement": false
1744
+ },
1745
+ "code_expires_at": {
1746
+ "name": "code_expires_at",
1747
+ "type": "integer",
1748
+ "primaryKey": false,
1749
+ "notNull": false,
1750
+ "autoincrement": false
1751
+ },
1752
+ "attempts": {
1753
+ "name": "attempts",
1754
+ "type": "integer",
1755
+ "primaryKey": false,
1756
+ "notNull": true,
1757
+ "autoincrement": false,
1758
+ "default": 0
1759
+ },
1760
+ "enrollment_token_hash": {
1761
+ "name": "enrollment_token_hash",
1762
+ "type": "text",
1763
+ "primaryKey": false,
1764
+ "notNull": false,
1765
+ "autoincrement": false
1766
+ },
1767
+ "enrollment_expires_at": {
1768
+ "name": "enrollment_expires_at",
1769
+ "type": "integer",
1770
+ "primaryKey": false,
1771
+ "notNull": false,
1772
+ "autoincrement": false
1773
+ },
1774
+ "created_at": {
1775
+ "name": "created_at",
1776
+ "type": "integer",
1777
+ "primaryKey": false,
1778
+ "notNull": true,
1779
+ "autoincrement": false
1780
+ },
1781
+ "expires_at": {
1782
+ "name": "expires_at",
1783
+ "type": "integer",
1784
+ "primaryKey": false,
1785
+ "notNull": true,
1786
+ "autoincrement": false
1787
+ },
1788
+ "decided_at": {
1789
+ "name": "decided_at",
1790
+ "type": "integer",
1791
+ "primaryKey": false,
1792
+ "notNull": false,
1793
+ "autoincrement": false
1794
+ },
1795
+ "redeemed_at": {
1796
+ "name": "redeemed_at",
1797
+ "type": "integer",
1798
+ "primaryKey": false,
1799
+ "notNull": false,
1800
+ "autoincrement": false
1801
+ }
1802
+ },
1803
+ "indexes": {
1804
+ "device_requests_short_code_unique": {
1805
+ "name": "device_requests_short_code_unique",
1806
+ "columns": ["short_code"],
1807
+ "isUnique": true
1808
+ },
1809
+ "idx_device_requests_status": {
1810
+ "name": "idx_device_requests_status",
1811
+ "columns": ["status", "expires_at"],
1812
+ "isUnique": false
1813
+ }
1814
+ },
1815
+ "foreignKeys": {},
1816
+ "compositePrimaryKeys": {},
1817
+ "uniqueConstraints": {},
1818
+ "checkConstraints": {}
1819
+ },
1820
+ "file_versions": {
1821
+ "name": "file_versions",
1822
+ "columns": {
1823
+ "scope_key": {
1824
+ "name": "scope_key",
1825
+ "type": "text",
1826
+ "primaryKey": false,
1827
+ "notNull": true,
1828
+ "autoincrement": false
1829
+ },
1830
+ "path": {
1831
+ "name": "path",
1832
+ "type": "text",
1833
+ "primaryKey": false,
1834
+ "notNull": true,
1835
+ "autoincrement": false
1836
+ },
1837
+ "real_path": {
1838
+ "name": "real_path",
1839
+ "type": "text",
1840
+ "primaryKey": false,
1841
+ "notNull": true,
1842
+ "autoincrement": false
1843
+ },
1844
+ "version_hash": {
1845
+ "name": "version_hash",
1846
+ "type": "text",
1847
+ "primaryKey": false,
1848
+ "notNull": true,
1849
+ "autoincrement": false
1850
+ },
1851
+ "size": {
1852
+ "name": "size",
1853
+ "type": "integer",
1854
+ "primaryKey": false,
1855
+ "notNull": true,
1856
+ "autoincrement": false
1857
+ },
1858
+ "mtime": {
1859
+ "name": "mtime",
1860
+ "type": "integer",
1861
+ "primaryKey": false,
1862
+ "notNull": true,
1863
+ "autoincrement": false
1864
+ },
1865
+ "updated_at": {
1866
+ "name": "updated_at",
1867
+ "type": "integer",
1868
+ "primaryKey": false,
1869
+ "notNull": true,
1870
+ "autoincrement": false
1871
+ }
1872
+ },
1873
+ "indexes": {
1874
+ "file_versions_scope_path": {
1875
+ "name": "file_versions_scope_path",
1876
+ "columns": ["scope_key", "path"],
1877
+ "isUnique": true
1878
+ }
1879
+ },
1880
+ "foreignKeys": {},
1881
+ "compositePrimaryKeys": {},
1882
+ "uniqueConstraints": {},
1883
+ "checkConstraints": {}
1884
+ },
1885
+ "model_catalog_cache": {
1886
+ "name": "model_catalog_cache",
1887
+ "columns": {
1888
+ "credential_profile_id": {
1889
+ "name": "credential_profile_id",
1890
+ "type": "text",
1891
+ "primaryKey": true,
1892
+ "notNull": true,
1893
+ "autoincrement": false
1894
+ },
1895
+ "provider": {
1896
+ "name": "provider",
1897
+ "type": "text",
1898
+ "primaryKey": false,
1899
+ "notNull": true,
1900
+ "autoincrement": false
1901
+ },
1902
+ "endpoint": {
1903
+ "name": "endpoint",
1904
+ "type": "text",
1905
+ "primaryKey": false,
1906
+ "notNull": true,
1907
+ "autoincrement": false
1908
+ },
1909
+ "models_json": {
1910
+ "name": "models_json",
1911
+ "type": "text",
1912
+ "primaryKey": false,
1913
+ "notNull": true,
1914
+ "autoincrement": false,
1915
+ "default": "'[]'"
1916
+ },
1917
+ "synced_at": {
1918
+ "name": "synced_at",
1919
+ "type": "integer",
1920
+ "primaryKey": false,
1921
+ "notNull": false,
1922
+ "autoincrement": false
1923
+ },
1924
+ "last_attempt_at": {
1925
+ "name": "last_attempt_at",
1926
+ "type": "integer",
1927
+ "primaryKey": false,
1928
+ "notNull": false,
1929
+ "autoincrement": false
1930
+ },
1931
+ "last_error_code": {
1932
+ "name": "last_error_code",
1933
+ "type": "text",
1934
+ "primaryKey": false,
1935
+ "notNull": false,
1936
+ "autoincrement": false
1937
+ }
1938
+ },
1939
+ "indexes": {},
1940
+ "foreignKeys": {
1941
+ "model_catalog_cache_credential_profile_id_credential_profiles_id_fk": {
1942
+ "name": "model_catalog_cache_credential_profile_id_credential_profiles_id_fk",
1943
+ "tableFrom": "model_catalog_cache",
1944
+ "tableTo": "credential_profiles",
1945
+ "columnsFrom": ["credential_profile_id"],
1946
+ "columnsTo": ["id"],
1947
+ "onDelete": "cascade",
1948
+ "onUpdate": "no action"
1949
+ }
1950
+ },
1951
+ "compositePrimaryKeys": {},
1952
+ "uniqueConstraints": {},
1953
+ "checkConstraints": {}
1954
+ },
1955
+ "model_profiles": {
1956
+ "name": "model_profiles",
1957
+ "columns": {
1958
+ "id": {
1959
+ "name": "id",
1960
+ "type": "text",
1961
+ "primaryKey": true,
1962
+ "notNull": true,
1963
+ "autoincrement": false
1964
+ },
1965
+ "label": {
1966
+ "name": "label",
1967
+ "type": "text",
1968
+ "primaryKey": false,
1969
+ "notNull": true,
1970
+ "autoincrement": false
1971
+ },
1972
+ "provider": {
1973
+ "name": "provider",
1974
+ "type": "text",
1975
+ "primaryKey": false,
1976
+ "notNull": true,
1977
+ "autoincrement": false
1978
+ },
1979
+ "model": {
1980
+ "name": "model",
1981
+ "type": "text",
1982
+ "primaryKey": false,
1983
+ "notNull": true,
1984
+ "autoincrement": false
1985
+ },
1986
+ "credential_profile_id": {
1987
+ "name": "credential_profile_id",
1988
+ "type": "text",
1989
+ "primaryKey": false,
1990
+ "notNull": false,
1991
+ "autoincrement": false
1992
+ },
1993
+ "endpoint": {
1994
+ "name": "endpoint",
1995
+ "type": "text",
1996
+ "primaryKey": false,
1997
+ "notNull": false,
1998
+ "autoincrement": false
1999
+ },
2000
+ "capabilities_json": {
2001
+ "name": "capabilities_json",
2002
+ "type": "text",
2003
+ "primaryKey": false,
2004
+ "notNull": true,
2005
+ "autoincrement": false,
2006
+ "default": "'{}'"
2007
+ },
2008
+ "created_at": {
2009
+ "name": "created_at",
2010
+ "type": "integer",
2011
+ "primaryKey": false,
2012
+ "notNull": true,
2013
+ "autoincrement": false
2014
+ }
2015
+ },
2016
+ "indexes": {
2017
+ "idx_model_profiles_provider": {
2018
+ "name": "idx_model_profiles_provider",
2019
+ "columns": ["provider"],
2020
+ "isUnique": false
2021
+ }
2022
+ },
2023
+ "foreignKeys": {
2024
+ "model_profiles_credential_profile_id_credential_profiles_id_fk": {
2025
+ "name": "model_profiles_credential_profile_id_credential_profiles_id_fk",
2026
+ "tableFrom": "model_profiles",
2027
+ "tableTo": "credential_profiles",
2028
+ "columnsFrom": ["credential_profile_id"],
2029
+ "columnsTo": ["id"],
2030
+ "onDelete": "set null",
2031
+ "onUpdate": "no action"
2032
+ }
2033
+ },
2034
+ "compositePrimaryKeys": {},
2035
+ "uniqueConstraints": {},
2036
+ "checkConstraints": {}
2037
+ },
2038
+ "model_visibility": {
2039
+ "name": "model_visibility",
2040
+ "columns": {
2041
+ "id": {
2042
+ "name": "id",
2043
+ "type": "text",
2044
+ "primaryKey": true,
2045
+ "notNull": true,
2046
+ "autoincrement": false
2047
+ },
2048
+ "credential_profile_id": {
2049
+ "name": "credential_profile_id",
2050
+ "type": "text",
2051
+ "primaryKey": false,
2052
+ "notNull": true,
2053
+ "autoincrement": false
2054
+ },
2055
+ "model_id": {
2056
+ "name": "model_id",
2057
+ "type": "text",
2058
+ "primaryKey": false,
2059
+ "notNull": true,
2060
+ "autoincrement": false
2061
+ },
2062
+ "visible": {
2063
+ "name": "visible",
2064
+ "type": "integer",
2065
+ "primaryKey": false,
2066
+ "notNull": true,
2067
+ "autoincrement": false,
2068
+ "default": 1
2069
+ },
2070
+ "updated_at": {
2071
+ "name": "updated_at",
2072
+ "type": "integer",
2073
+ "primaryKey": false,
2074
+ "notNull": true,
2075
+ "autoincrement": false
2076
+ }
2077
+ },
2078
+ "indexes": {
2079
+ "model_visibility_credential_model": {
2080
+ "name": "model_visibility_credential_model",
2081
+ "columns": ["credential_profile_id", "model_id"],
2082
+ "isUnique": true
2083
+ }
2084
+ },
2085
+ "foreignKeys": {
2086
+ "model_visibility_credential_profile_id_credential_profiles_id_fk": {
2087
+ "name": "model_visibility_credential_profile_id_credential_profiles_id_fk",
2088
+ "tableFrom": "model_visibility",
2089
+ "tableTo": "credential_profiles",
2090
+ "columnsFrom": ["credential_profile_id"],
2091
+ "columnsTo": ["id"],
2092
+ "onDelete": "cascade",
2093
+ "onUpdate": "no action"
2094
+ }
2095
+ },
2096
+ "compositePrimaryKeys": {},
2097
+ "uniqueConstraints": {},
2098
+ "checkConstraints": {}
2099
+ },
2100
+ "projects": {
2101
+ "name": "projects",
2102
+ "columns": {
2103
+ "id": {
2104
+ "name": "id",
2105
+ "type": "text",
2106
+ "primaryKey": true,
2107
+ "notNull": true,
2108
+ "autoincrement": false
2109
+ },
2110
+ "name": {
2111
+ "name": "name",
2112
+ "type": "text",
2113
+ "primaryKey": false,
2114
+ "notNull": true,
2115
+ "autoincrement": false
2116
+ },
2117
+ "root_path": {
2118
+ "name": "root_path",
2119
+ "type": "text",
2120
+ "primaryKey": false,
2121
+ "notNull": true,
2122
+ "autoincrement": false
2123
+ },
2124
+ "real_path": {
2125
+ "name": "real_path",
2126
+ "type": "text",
2127
+ "primaryKey": false,
2128
+ "notNull": true,
2129
+ "autoincrement": false
2130
+ },
2131
+ "settings_json": {
2132
+ "name": "settings_json",
2133
+ "type": "text",
2134
+ "primaryKey": false,
2135
+ "notNull": true,
2136
+ "autoincrement": false,
2137
+ "default": "'{}'"
2138
+ },
2139
+ "git_detected": {
2140
+ "name": "git_detected",
2141
+ "type": "integer",
2142
+ "primaryKey": false,
2143
+ "notNull": true,
2144
+ "autoincrement": false,
2145
+ "default": false
2146
+ },
2147
+ "created_at": {
2148
+ "name": "created_at",
2149
+ "type": "integer",
2150
+ "primaryKey": false,
2151
+ "notNull": true,
2152
+ "autoincrement": false
2153
+ },
2154
+ "updated_at": {
2155
+ "name": "updated_at",
2156
+ "type": "integer",
2157
+ "primaryKey": false,
2158
+ "notNull": true,
2159
+ "autoincrement": false
2160
+ }
2161
+ },
2162
+ "indexes": {
2163
+ "projects_real_path_unique": {
2164
+ "name": "projects_real_path_unique",
2165
+ "columns": ["real_path"],
2166
+ "isUnique": true
2167
+ },
2168
+ "idx_projects_updated": {
2169
+ "name": "idx_projects_updated",
2170
+ "columns": ["updated_at"],
2171
+ "isUnique": false
2172
+ }
2173
+ },
2174
+ "foreignKeys": {},
2175
+ "compositePrimaryKeys": {},
2176
+ "uniqueConstraints": {},
2177
+ "checkConstraints": {}
2178
+ },
2179
+ "resource_actions": {
2180
+ "name": "resource_actions",
2181
+ "columns": {
2182
+ "id": {
2183
+ "name": "id",
2184
+ "type": "text",
2185
+ "primaryKey": true,
2186
+ "notNull": true,
2187
+ "autoincrement": false
2188
+ },
2189
+ "operation_id": {
2190
+ "name": "operation_id",
2191
+ "type": "text",
2192
+ "primaryKey": false,
2193
+ "notNull": true,
2194
+ "autoincrement": false
2195
+ },
2196
+ "project_id": {
2197
+ "name": "project_id",
2198
+ "type": "text",
2199
+ "primaryKey": false,
2200
+ "notNull": true,
2201
+ "autoincrement": false
2202
+ },
2203
+ "kind": {
2204
+ "name": "kind",
2205
+ "type": "text",
2206
+ "primaryKey": false,
2207
+ "notNull": true,
2208
+ "autoincrement": false
2209
+ },
2210
+ "risk": {
2211
+ "name": "risk",
2212
+ "type": "text",
2213
+ "primaryKey": false,
2214
+ "notNull": true,
2215
+ "autoincrement": false
2216
+ },
2217
+ "status": {
2218
+ "name": "status",
2219
+ "type": "text",
2220
+ "primaryKey": false,
2221
+ "notNull": true,
2222
+ "autoincrement": false
2223
+ },
2224
+ "params_json": {
2225
+ "name": "params_json",
2226
+ "type": "text",
2227
+ "primaryKey": false,
2228
+ "notNull": true,
2229
+ "autoincrement": false
2230
+ },
2231
+ "params_hash": {
2232
+ "name": "params_hash",
2233
+ "type": "text",
2234
+ "primaryKey": false,
2235
+ "notNull": true,
2236
+ "autoincrement": false
2237
+ },
2238
+ "snapshot_hash": {
2239
+ "name": "snapshot_hash",
2240
+ "type": "text",
2241
+ "primaryKey": false,
2242
+ "notNull": true,
2243
+ "autoincrement": false
2244
+ },
2245
+ "requested_by": {
2246
+ "name": "requested_by",
2247
+ "type": "text",
2248
+ "primaryKey": false,
2249
+ "notNull": true,
2250
+ "autoincrement": false
2251
+ },
2252
+ "decided_by": {
2253
+ "name": "decided_by",
2254
+ "type": "text",
2255
+ "primaryKey": false,
2256
+ "notNull": false,
2257
+ "autoincrement": false
2258
+ },
2259
+ "expires_at": {
2260
+ "name": "expires_at",
2261
+ "type": "integer",
2262
+ "primaryKey": false,
2263
+ "notNull": true,
2264
+ "autoincrement": false
2265
+ },
2266
+ "decided_at": {
2267
+ "name": "decided_at",
2268
+ "type": "integer",
2269
+ "primaryKey": false,
2270
+ "notNull": false,
2271
+ "autoincrement": false
2272
+ },
2273
+ "started_at": {
2274
+ "name": "started_at",
2275
+ "type": "integer",
2276
+ "primaryKey": false,
2277
+ "notNull": false,
2278
+ "autoincrement": false
2279
+ },
2280
+ "ended_at": {
2281
+ "name": "ended_at",
2282
+ "type": "integer",
2283
+ "primaryKey": false,
2284
+ "notNull": false,
2285
+ "autoincrement": false
2286
+ },
2287
+ "result_json": {
2288
+ "name": "result_json",
2289
+ "type": "text",
2290
+ "primaryKey": false,
2291
+ "notNull": false,
2292
+ "autoincrement": false
2293
+ },
2294
+ "created_at": {
2295
+ "name": "created_at",
2296
+ "type": "integer",
2297
+ "primaryKey": false,
2298
+ "notNull": true,
2299
+ "autoincrement": false
2300
+ }
2301
+ },
2302
+ "indexes": {
2303
+ "resource_actions_operation": {
2304
+ "name": "resource_actions_operation",
2305
+ "columns": ["operation_id"],
2306
+ "isUnique": true
2307
+ },
2308
+ "resource_actions_project_status": {
2309
+ "name": "resource_actions_project_status",
2310
+ "columns": ["project_id", "status"],
2311
+ "isUnique": false
2312
+ }
2313
+ },
2314
+ "foreignKeys": {
2315
+ "resource_actions_operation_id_resource_operations_id_fk": {
2316
+ "name": "resource_actions_operation_id_resource_operations_id_fk",
2317
+ "tableFrom": "resource_actions",
2318
+ "tableTo": "resource_operations",
2319
+ "columnsFrom": ["operation_id"],
2320
+ "columnsTo": ["id"],
2321
+ "onDelete": "no action",
2322
+ "onUpdate": "no action"
2323
+ },
2324
+ "resource_actions_project_id_projects_id_fk": {
2325
+ "name": "resource_actions_project_id_projects_id_fk",
2326
+ "tableFrom": "resource_actions",
2327
+ "tableTo": "projects",
2328
+ "columnsFrom": ["project_id"],
2329
+ "columnsTo": ["id"],
2330
+ "onDelete": "no action",
2331
+ "onUpdate": "no action"
2332
+ }
2333
+ },
2334
+ "compositePrimaryKeys": {},
2335
+ "uniqueConstraints": {},
2336
+ "checkConstraints": {}
2337
+ },
2338
+ "resource_events": {
2339
+ "name": "resource_events",
2340
+ "columns": {
2341
+ "id": {
2342
+ "name": "id",
2343
+ "type": "text",
2344
+ "primaryKey": true,
2345
+ "notNull": true,
2346
+ "autoincrement": false
2347
+ },
2348
+ "stream_id": {
2349
+ "name": "stream_id",
2350
+ "type": "text",
2351
+ "primaryKey": false,
2352
+ "notNull": true,
2353
+ "autoincrement": false
2354
+ },
2355
+ "seq": {
2356
+ "name": "seq",
2357
+ "type": "integer",
2358
+ "primaryKey": false,
2359
+ "notNull": true,
2360
+ "autoincrement": false
2361
+ },
2362
+ "type": {
2363
+ "name": "type",
2364
+ "type": "text",
2365
+ "primaryKey": false,
2366
+ "notNull": true,
2367
+ "autoincrement": false
2368
+ },
2369
+ "payload_json": {
2370
+ "name": "payload_json",
2371
+ "type": "text",
2372
+ "primaryKey": false,
2373
+ "notNull": true,
2374
+ "autoincrement": false
2375
+ },
2376
+ "created_at": {
2377
+ "name": "created_at",
2378
+ "type": "integer",
2379
+ "primaryKey": false,
2380
+ "notNull": true,
2381
+ "autoincrement": false
2382
+ }
2383
+ },
2384
+ "indexes": {
2385
+ "resource_events_stream_seq": {
2386
+ "name": "resource_events_stream_seq",
2387
+ "columns": ["stream_id", "seq"],
2388
+ "isUnique": true
2389
+ }
2390
+ },
2391
+ "foreignKeys": {
2392
+ "resource_events_stream_id_resource_streams_stream_id_fk": {
2393
+ "name": "resource_events_stream_id_resource_streams_stream_id_fk",
2394
+ "tableFrom": "resource_events",
2395
+ "tableTo": "resource_streams",
2396
+ "columnsFrom": ["stream_id"],
2397
+ "columnsTo": ["stream_id"],
2398
+ "onDelete": "no action",
2399
+ "onUpdate": "no action"
2400
+ }
2401
+ },
2402
+ "compositePrimaryKeys": {},
2403
+ "uniqueConstraints": {},
2404
+ "checkConstraints": {}
2405
+ },
2406
+ "resource_locks": {
2407
+ "name": "resource_locks",
2408
+ "columns": {
2409
+ "id": {
2410
+ "name": "id",
2411
+ "type": "text",
2412
+ "primaryKey": true,
2413
+ "notNull": true,
2414
+ "autoincrement": false
2415
+ },
2416
+ "resource_type": {
2417
+ "name": "resource_type",
2418
+ "type": "text",
2419
+ "primaryKey": false,
2420
+ "notNull": true,
2421
+ "autoincrement": false
2422
+ },
2423
+ "resource_id": {
2424
+ "name": "resource_id",
2425
+ "type": "text",
2426
+ "primaryKey": false,
2427
+ "notNull": true,
2428
+ "autoincrement": false
2429
+ },
2430
+ "root_real_path": {
2431
+ "name": "root_real_path",
2432
+ "type": "text",
2433
+ "primaryKey": false,
2434
+ "notNull": false,
2435
+ "autoincrement": false
2436
+ },
2437
+ "owner": {
2438
+ "name": "owner",
2439
+ "type": "text",
2440
+ "primaryKey": false,
2441
+ "notNull": true,
2442
+ "autoincrement": false
2443
+ },
2444
+ "execution_id": {
2445
+ "name": "execution_id",
2446
+ "type": "text",
2447
+ "primaryKey": false,
2448
+ "notNull": true,
2449
+ "autoincrement": false
2450
+ },
2451
+ "fencing_token": {
2452
+ "name": "fencing_token",
2453
+ "type": "integer",
2454
+ "primaryKey": false,
2455
+ "notNull": true,
2456
+ "autoincrement": false
2457
+ },
2458
+ "expires_at": {
2459
+ "name": "expires_at",
2460
+ "type": "integer",
2461
+ "primaryKey": false,
2462
+ "notNull": true,
2463
+ "autoincrement": false
2464
+ },
2465
+ "heartbeat_at": {
2466
+ "name": "heartbeat_at",
2467
+ "type": "integer",
2468
+ "primaryKey": false,
2469
+ "notNull": true,
2470
+ "autoincrement": false
2471
+ },
2472
+ "created_at": {
2473
+ "name": "created_at",
2474
+ "type": "integer",
2475
+ "primaryKey": false,
2476
+ "notNull": true,
2477
+ "autoincrement": false
2478
+ }
2479
+ },
2480
+ "indexes": {
2481
+ "resource_locks_resource_unique": {
2482
+ "name": "resource_locks_resource_unique",
2483
+ "columns": ["resource_type", "resource_id"],
2484
+ "isUnique": true
2485
+ },
2486
+ "idx_resource_locks_expiry": {
2487
+ "name": "idx_resource_locks_expiry",
2488
+ "columns": ["expires_at"],
2489
+ "isUnique": false
2490
+ }
2491
+ },
2492
+ "foreignKeys": {},
2493
+ "compositePrimaryKeys": {},
2494
+ "uniqueConstraints": {},
2495
+ "checkConstraints": {}
2496
+ },
2497
+ "resource_operations": {
2498
+ "name": "resource_operations",
2499
+ "columns": {
2500
+ "id": {
2501
+ "name": "id",
2502
+ "type": "text",
2503
+ "primaryKey": true,
2504
+ "notNull": true,
2505
+ "autoincrement": false
2506
+ },
2507
+ "scope_key": {
2508
+ "name": "scope_key",
2509
+ "type": "text",
2510
+ "primaryKey": false,
2511
+ "notNull": true,
2512
+ "autoincrement": false
2513
+ },
2514
+ "root_real_path": {
2515
+ "name": "root_real_path",
2516
+ "type": "text",
2517
+ "primaryKey": false,
2518
+ "notNull": true,
2519
+ "autoincrement": false
2520
+ },
2521
+ "kind": {
2522
+ "name": "kind",
2523
+ "type": "text",
2524
+ "primaryKey": false,
2525
+ "notNull": true,
2526
+ "autoincrement": false
2527
+ },
2528
+ "status": {
2529
+ "name": "status",
2530
+ "type": "text",
2531
+ "primaryKey": false,
2532
+ "notNull": true,
2533
+ "autoincrement": false
2534
+ },
2535
+ "params_hash": {
2536
+ "name": "params_hash",
2537
+ "type": "text",
2538
+ "primaryKey": false,
2539
+ "notNull": true,
2540
+ "autoincrement": false
2541
+ },
2542
+ "idempotency_key": {
2543
+ "name": "idempotency_key",
2544
+ "type": "text",
2545
+ "primaryKey": false,
2546
+ "notNull": true,
2547
+ "autoincrement": false
2548
+ },
2549
+ "client_session_id": {
2550
+ "name": "client_session_id",
2551
+ "type": "text",
2552
+ "primaryKey": false,
2553
+ "notNull": true,
2554
+ "autoincrement": false
2555
+ },
2556
+ "path": {
2557
+ "name": "path",
2558
+ "type": "text",
2559
+ "primaryKey": false,
2560
+ "notNull": true,
2561
+ "autoincrement": false
2562
+ },
2563
+ "expected_version": {
2564
+ "name": "expected_version",
2565
+ "type": "text",
2566
+ "primaryKey": false,
2567
+ "notNull": true,
2568
+ "autoincrement": false
2569
+ },
2570
+ "target_version": {
2571
+ "name": "target_version",
2572
+ "type": "text",
2573
+ "primaryKey": false,
2574
+ "notNull": true,
2575
+ "autoincrement": false
2576
+ },
2577
+ "lock_id": {
2578
+ "name": "lock_id",
2579
+ "type": "text",
2580
+ "primaryKey": false,
2581
+ "notNull": true,
2582
+ "autoincrement": false
2583
+ },
2584
+ "fencing_token": {
2585
+ "name": "fencing_token",
2586
+ "type": "integer",
2587
+ "primaryKey": false,
2588
+ "notNull": true,
2589
+ "autoincrement": false
2590
+ },
2591
+ "result_json": {
2592
+ "name": "result_json",
2593
+ "type": "text",
2594
+ "primaryKey": false,
2595
+ "notNull": false,
2596
+ "autoincrement": false
2597
+ },
2598
+ "error_code": {
2599
+ "name": "error_code",
2600
+ "type": "text",
2601
+ "primaryKey": false,
2602
+ "notNull": false,
2603
+ "autoincrement": false
2604
+ },
2605
+ "created_at": {
2606
+ "name": "created_at",
2607
+ "type": "integer",
2608
+ "primaryKey": false,
2609
+ "notNull": true,
2610
+ "autoincrement": false
2611
+ },
2612
+ "updated_at": {
2613
+ "name": "updated_at",
2614
+ "type": "integer",
2615
+ "primaryKey": false,
2616
+ "notNull": true,
2617
+ "autoincrement": false
2618
+ }
2619
+ },
2620
+ "indexes": {
2621
+ "resource_operations_client_kind_key": {
2622
+ "name": "resource_operations_client_kind_key",
2623
+ "columns": ["client_session_id", "kind", "idempotency_key"],
2624
+ "isUnique": true
2625
+ },
2626
+ "resource_operations_status": {
2627
+ "name": "resource_operations_status",
2628
+ "columns": ["status"],
2629
+ "isUnique": false
2630
+ }
2631
+ },
2632
+ "foreignKeys": {},
2633
+ "compositePrimaryKeys": {},
2634
+ "uniqueConstraints": {},
2635
+ "checkConstraints": {}
2636
+ },
2637
+ "resource_streams": {
2638
+ "name": "resource_streams",
2639
+ "columns": {
2640
+ "stream_id": {
2641
+ "name": "stream_id",
2642
+ "type": "text",
2643
+ "primaryKey": true,
2644
+ "notNull": true,
2645
+ "autoincrement": false
2646
+ },
2647
+ "last_seq": {
2648
+ "name": "last_seq",
2649
+ "type": "integer",
2650
+ "primaryKey": false,
2651
+ "notNull": true,
2652
+ "autoincrement": false,
2653
+ "default": 0
2654
+ }
2655
+ },
2656
+ "indexes": {},
2657
+ "foreignKeys": {},
2658
+ "compositePrimaryKeys": {},
2659
+ "uniqueConstraints": {},
2660
+ "checkConstraints": {}
2661
+ },
2662
+ "secrets": {
2663
+ "name": "secrets",
2664
+ "columns": {
2665
+ "id": {
2666
+ "name": "id",
2667
+ "type": "text",
2668
+ "primaryKey": true,
2669
+ "notNull": true,
2670
+ "autoincrement": false
2671
+ },
2672
+ "ciphertext": {
2673
+ "name": "ciphertext",
2674
+ "type": "text",
2675
+ "primaryKey": false,
2676
+ "notNull": true,
2677
+ "autoincrement": false
2678
+ },
2679
+ "nonce": {
2680
+ "name": "nonce",
2681
+ "type": "text",
2682
+ "primaryKey": false,
2683
+ "notNull": true,
2684
+ "autoincrement": false
2685
+ },
2686
+ "tag": {
2687
+ "name": "tag",
2688
+ "type": "text",
2689
+ "primaryKey": false,
2690
+ "notNull": true,
2691
+ "autoincrement": false
2692
+ },
2693
+ "created_at": {
2694
+ "name": "created_at",
2695
+ "type": "integer",
2696
+ "primaryKey": false,
2697
+ "notNull": true,
2698
+ "autoincrement": false
2699
+ }
2700
+ },
2701
+ "indexes": {},
2702
+ "foreignKeys": {},
2703
+ "compositePrimaryKeys": {},
2704
+ "uniqueConstraints": {},
2705
+ "checkConstraints": {}
2706
+ },
2707
+ "service_action_authorizations": {
2708
+ "name": "service_action_authorizations",
2709
+ "columns": {
2710
+ "id": {
2711
+ "name": "id",
2712
+ "type": "text",
2713
+ "primaryKey": true,
2714
+ "notNull": true,
2715
+ "autoincrement": false
2716
+ },
2717
+ "target_id": {
2718
+ "name": "target_id",
2719
+ "type": "text",
2720
+ "primaryKey": false,
2721
+ "notNull": true,
2722
+ "autoincrement": false
2723
+ },
2724
+ "project_id": {
2725
+ "name": "project_id",
2726
+ "type": "text",
2727
+ "primaryKey": false,
2728
+ "notNull": true,
2729
+ "autoincrement": false
2730
+ },
2731
+ "action": {
2732
+ "name": "action",
2733
+ "type": "text",
2734
+ "primaryKey": false,
2735
+ "notNull": true,
2736
+ "autoincrement": false
2737
+ },
2738
+ "actor_type": {
2739
+ "name": "actor_type",
2740
+ "type": "text",
2741
+ "primaryKey": false,
2742
+ "notNull": true,
2743
+ "autoincrement": false
2744
+ },
2745
+ "actor_id": {
2746
+ "name": "actor_id",
2747
+ "type": "text",
2748
+ "primaryKey": false,
2749
+ "notNull": true,
2750
+ "autoincrement": false
2751
+ },
2752
+ "client_session_id": {
2753
+ "name": "client_session_id",
2754
+ "type": "text",
2755
+ "primaryKey": false,
2756
+ "notNull": false,
2757
+ "autoincrement": false
2758
+ },
2759
+ "session_id": {
2760
+ "name": "session_id",
2761
+ "type": "text",
2762
+ "primaryKey": false,
2763
+ "notNull": false,
2764
+ "autoincrement": false
2765
+ },
2766
+ "turn_id": {
2767
+ "name": "turn_id",
2768
+ "type": "text",
2769
+ "primaryKey": false,
2770
+ "notNull": false,
2771
+ "autoincrement": false
2772
+ },
2773
+ "policy": {
2774
+ "name": "policy",
2775
+ "type": "text",
2776
+ "primaryKey": false,
2777
+ "notNull": true,
2778
+ "autoincrement": false
2779
+ },
2780
+ "policy_snapshot_id": {
2781
+ "name": "policy_snapshot_id",
2782
+ "type": "text",
2783
+ "primaryKey": false,
2784
+ "notNull": true,
2785
+ "autoincrement": false
2786
+ },
2787
+ "status": {
2788
+ "name": "status",
2789
+ "type": "text",
2790
+ "primaryKey": false,
2791
+ "notNull": true,
2792
+ "autoincrement": false
2793
+ },
2794
+ "artifact_hash": {
2795
+ "name": "artifact_hash",
2796
+ "type": "text",
2797
+ "primaryKey": false,
2798
+ "notNull": true,
2799
+ "autoincrement": false
2800
+ },
2801
+ "version": {
2802
+ "name": "version",
2803
+ "type": "text",
2804
+ "primaryKey": false,
2805
+ "notNull": true,
2806
+ "autoincrement": false
2807
+ },
2808
+ "scope_json": {
2809
+ "name": "scope_json",
2810
+ "type": "text",
2811
+ "primaryKey": false,
2812
+ "notNull": true,
2813
+ "autoincrement": false
2814
+ },
2815
+ "scope_hash": {
2816
+ "name": "scope_hash",
2817
+ "type": "text",
2818
+ "primaryKey": false,
2819
+ "notNull": true,
2820
+ "autoincrement": false
2821
+ },
2822
+ "request_key": {
2823
+ "name": "request_key",
2824
+ "type": "text",
2825
+ "primaryKey": false,
2826
+ "notNull": true,
2827
+ "autoincrement": false
2828
+ },
2829
+ "expires_at": {
2830
+ "name": "expires_at",
2831
+ "type": "integer",
2832
+ "primaryKey": false,
2833
+ "notNull": true,
2834
+ "autoincrement": false
2835
+ },
2836
+ "decided_at": {
2837
+ "name": "decided_at",
2838
+ "type": "integer",
2839
+ "primaryKey": false,
2840
+ "notNull": false,
2841
+ "autoincrement": false
2842
+ },
2843
+ "decided_by": {
2844
+ "name": "decided_by",
2845
+ "type": "text",
2846
+ "primaryKey": false,
2847
+ "notNull": false,
2848
+ "autoincrement": false
2849
+ },
2850
+ "consumed_at": {
2851
+ "name": "consumed_at",
2852
+ "type": "integer",
2853
+ "primaryKey": false,
2854
+ "notNull": false,
2855
+ "autoincrement": false
2856
+ },
2857
+ "consume_key": {
2858
+ "name": "consume_key",
2859
+ "type": "text",
2860
+ "primaryKey": false,
2861
+ "notNull": false,
2862
+ "autoincrement": false
2863
+ },
2864
+ "reason_code": {
2865
+ "name": "reason_code",
2866
+ "type": "text",
2867
+ "primaryKey": false,
2868
+ "notNull": false,
2869
+ "autoincrement": false
2870
+ },
2871
+ "created_at": {
2872
+ "name": "created_at",
2873
+ "type": "integer",
2874
+ "primaryKey": false,
2875
+ "notNull": true,
2876
+ "autoincrement": false
2877
+ }
2878
+ },
2879
+ "indexes": {
2880
+ "service_action_authorizations_request": {
2881
+ "name": "service_action_authorizations_request",
2882
+ "columns": ["request_key"],
2883
+ "isUnique": true
2884
+ },
2885
+ "service_action_authorizations_target_status": {
2886
+ "name": "service_action_authorizations_target_status",
2887
+ "columns": ["target_id", "status"],
2888
+ "isUnique": false
2889
+ },
2890
+ "service_action_authorizations_status_expires": {
2891
+ "name": "service_action_authorizations_status_expires",
2892
+ "columns": ["status", "expires_at"],
2893
+ "isUnique": false
2894
+ }
2895
+ },
2896
+ "foreignKeys": {
2897
+ "service_action_authorizations_target_id_deployment_targets_id_fk": {
2898
+ "name": "service_action_authorizations_target_id_deployment_targets_id_fk",
2899
+ "tableFrom": "service_action_authorizations",
2900
+ "tableTo": "deployment_targets",
2901
+ "columnsFrom": ["target_id"],
2902
+ "columnsTo": ["id"],
2903
+ "onDelete": "no action",
2904
+ "onUpdate": "no action"
2905
+ },
2906
+ "service_action_authorizations_project_id_projects_id_fk": {
2907
+ "name": "service_action_authorizations_project_id_projects_id_fk",
2908
+ "tableFrom": "service_action_authorizations",
2909
+ "tableTo": "projects",
2910
+ "columnsFrom": ["project_id"],
2911
+ "columnsTo": ["id"],
2912
+ "onDelete": "no action",
2913
+ "onUpdate": "no action"
2914
+ }
2915
+ },
2916
+ "compositePrimaryKeys": {},
2917
+ "uniqueConstraints": {},
2918
+ "checkConstraints": {
2919
+ "service_action_authorizations_action": {
2920
+ "name": "service_action_authorizations_action",
2921
+ "value": "\"service_action_authorizations\".\"action\" IN ('start', 'stop', 'restart', 'recover')"
2922
+ },
2923
+ "service_action_authorizations_status": {
2924
+ "name": "service_action_authorizations_status",
2925
+ "value": "\"service_action_authorizations\".\"status\" IN ('PENDING', 'AUTHORIZED', 'DENIED', 'EXPIRED', 'REVOKED', 'CONSUMED')"
2926
+ },
2927
+ "service_action_authorizations_artifact_hash": {
2928
+ "name": "service_action_authorizations_artifact_hash",
2929
+ "value": "length(\"service_action_authorizations\".\"artifact_hash\") = 64"
2930
+ },
2931
+ "service_action_authorizations_scope_hash": {
2932
+ "name": "service_action_authorizations_scope_hash",
2933
+ "value": "length(\"service_action_authorizations\".\"scope_hash\") = 64"
2934
+ }
2935
+ }
2936
+ },
2937
+ "service_ops_deployments": {
2938
+ "name": "service_ops_deployments",
2939
+ "columns": {
2940
+ "id": {
2941
+ "name": "id",
2942
+ "type": "text",
2943
+ "primaryKey": true,
2944
+ "notNull": true,
2945
+ "autoincrement": false
2946
+ },
2947
+ "target_id": {
2948
+ "name": "target_id",
2949
+ "type": "text",
2950
+ "primaryKey": false,
2951
+ "notNull": true,
2952
+ "autoincrement": false
2953
+ },
2954
+ "project_id": {
2955
+ "name": "project_id",
2956
+ "type": "text",
2957
+ "primaryKey": false,
2958
+ "notNull": true,
2959
+ "autoincrement": false
2960
+ },
2961
+ "plan_id": {
2962
+ "name": "plan_id",
2963
+ "type": "text",
2964
+ "primaryKey": false,
2965
+ "notNull": true,
2966
+ "autoincrement": false
2967
+ },
2968
+ "authorization_id": {
2969
+ "name": "authorization_id",
2970
+ "type": "text",
2971
+ "primaryKey": false,
2972
+ "notNull": true,
2973
+ "autoincrement": false
2974
+ },
2975
+ "artifact_id": {
2976
+ "name": "artifact_id",
2977
+ "type": "text",
2978
+ "primaryKey": false,
2979
+ "notNull": true,
2980
+ "autoincrement": false
2981
+ },
2982
+ "previous_artifact_id": {
2983
+ "name": "previous_artifact_id",
2984
+ "type": "text",
2985
+ "primaryKey": false,
2986
+ "notNull": false,
2987
+ "autoincrement": false
2988
+ },
2989
+ "previous_version": {
2990
+ "name": "previous_version",
2991
+ "type": "text",
2992
+ "primaryKey": false,
2993
+ "notNull": false,
2994
+ "autoincrement": false
2995
+ },
2996
+ "version": {
2997
+ "name": "version",
2998
+ "type": "text",
2999
+ "primaryKey": false,
3000
+ "notNull": true,
3001
+ "autoincrement": false
3002
+ },
3003
+ "status": {
3004
+ "name": "status",
3005
+ "type": "text",
3006
+ "primaryKey": false,
3007
+ "notNull": true,
3008
+ "autoincrement": false
3009
+ },
3010
+ "plan_hash": {
3011
+ "name": "plan_hash",
3012
+ "type": "text",
3013
+ "primaryKey": false,
3014
+ "notNull": true,
3015
+ "autoincrement": false
3016
+ },
3017
+ "artifact_hash": {
3018
+ "name": "artifact_hash",
3019
+ "type": "text",
3020
+ "primaryKey": false,
3021
+ "notNull": true,
3022
+ "autoincrement": false
3023
+ },
3024
+ "actor_type": {
3025
+ "name": "actor_type",
3026
+ "type": "text",
3027
+ "primaryKey": false,
3028
+ "notNull": true,
3029
+ "autoincrement": false
3030
+ },
3031
+ "actor_id": {
3032
+ "name": "actor_id",
3033
+ "type": "text",
3034
+ "primaryKey": false,
3035
+ "notNull": true,
3036
+ "autoincrement": false
3037
+ },
3038
+ "policy": {
3039
+ "name": "policy",
3040
+ "type": "text",
3041
+ "primaryKey": false,
3042
+ "notNull": true,
3043
+ "autoincrement": false
3044
+ },
3045
+ "policy_snapshot_id": {
3046
+ "name": "policy_snapshot_id",
3047
+ "type": "text",
3048
+ "primaryKey": false,
3049
+ "notNull": true,
3050
+ "autoincrement": false
3051
+ },
3052
+ "reason_code": {
3053
+ "name": "reason_code",
3054
+ "type": "text",
3055
+ "primaryKey": false,
3056
+ "notNull": false,
3057
+ "autoincrement": false
3058
+ },
3059
+ "health_json": {
3060
+ "name": "health_json",
3061
+ "type": "text",
3062
+ "primaryKey": false,
3063
+ "notNull": false,
3064
+ "autoincrement": false
3065
+ },
3066
+ "result_json": {
3067
+ "name": "result_json",
3068
+ "type": "text",
3069
+ "primaryKey": false,
3070
+ "notNull": false,
3071
+ "autoincrement": false
3072
+ },
3073
+ "started_at": {
3074
+ "name": "started_at",
3075
+ "type": "integer",
3076
+ "primaryKey": false,
3077
+ "notNull": true,
3078
+ "autoincrement": false
3079
+ },
3080
+ "ended_at": {
3081
+ "name": "ended_at",
3082
+ "type": "integer",
3083
+ "primaryKey": false,
3084
+ "notNull": false,
3085
+ "autoincrement": false
3086
+ },
3087
+ "created_at": {
3088
+ "name": "created_at",
3089
+ "type": "integer",
3090
+ "primaryKey": false,
3091
+ "notNull": true,
3092
+ "autoincrement": false
3093
+ }
3094
+ },
3095
+ "indexes": {
3096
+ "service_ops_deployments_plan": {
3097
+ "name": "service_ops_deployments_plan",
3098
+ "columns": ["plan_id"],
3099
+ "isUnique": true
3100
+ },
3101
+ "service_ops_deployments_authorization": {
3102
+ "name": "service_ops_deployments_authorization",
3103
+ "columns": ["authorization_id"],
3104
+ "isUnique": true
3105
+ },
3106
+ "service_ops_deployments_target_created": {
3107
+ "name": "service_ops_deployments_target_created",
3108
+ "columns": ["target_id", "created_at"],
3109
+ "isUnique": false
3110
+ },
3111
+ "service_ops_deployments_status": {
3112
+ "name": "service_ops_deployments_status",
3113
+ "columns": ["status"],
3114
+ "isUnique": false
3115
+ }
3116
+ },
3117
+ "foreignKeys": {
3118
+ "service_ops_deployments_target_id_deployment_targets_id_fk": {
3119
+ "name": "service_ops_deployments_target_id_deployment_targets_id_fk",
3120
+ "tableFrom": "service_ops_deployments",
3121
+ "tableTo": "deployment_targets",
3122
+ "columnsFrom": ["target_id"],
3123
+ "columnsTo": ["id"],
3124
+ "onDelete": "no action",
3125
+ "onUpdate": "no action"
3126
+ },
3127
+ "service_ops_deployments_project_id_projects_id_fk": {
3128
+ "name": "service_ops_deployments_project_id_projects_id_fk",
3129
+ "tableFrom": "service_ops_deployments",
3130
+ "tableTo": "projects",
3131
+ "columnsFrom": ["project_id"],
3132
+ "columnsTo": ["id"],
3133
+ "onDelete": "no action",
3134
+ "onUpdate": "no action"
3135
+ },
3136
+ "service_ops_deployments_plan_id_deployment_plans_id_fk": {
3137
+ "name": "service_ops_deployments_plan_id_deployment_plans_id_fk",
3138
+ "tableFrom": "service_ops_deployments",
3139
+ "tableTo": "deployment_plans",
3140
+ "columnsFrom": ["plan_id"],
3141
+ "columnsTo": ["id"],
3142
+ "onDelete": "no action",
3143
+ "onUpdate": "no action"
3144
+ },
3145
+ "service_ops_deployments_authorization_id_deployment_authorizations_id_fk": {
3146
+ "name": "service_ops_deployments_authorization_id_deployment_authorizations_id_fk",
3147
+ "tableFrom": "service_ops_deployments",
3148
+ "tableTo": "deployment_authorizations",
3149
+ "columnsFrom": ["authorization_id"],
3150
+ "columnsTo": ["id"],
3151
+ "onDelete": "no action",
3152
+ "onUpdate": "no action"
3153
+ },
3154
+ "service_ops_deployments_artifact_id_deployment_artifacts_id_fk": {
3155
+ "name": "service_ops_deployments_artifact_id_deployment_artifacts_id_fk",
3156
+ "tableFrom": "service_ops_deployments",
3157
+ "tableTo": "deployment_artifacts",
3158
+ "columnsFrom": ["artifact_id"],
3159
+ "columnsTo": ["id"],
3160
+ "onDelete": "no action",
3161
+ "onUpdate": "no action"
3162
+ },
3163
+ "service_ops_deployments_previous_artifact_id_deployment_artifacts_id_fk": {
3164
+ "name": "service_ops_deployments_previous_artifact_id_deployment_artifacts_id_fk",
3165
+ "tableFrom": "service_ops_deployments",
3166
+ "tableTo": "deployment_artifacts",
3167
+ "columnsFrom": ["previous_artifact_id"],
3168
+ "columnsTo": ["id"],
3169
+ "onDelete": "no action",
3170
+ "onUpdate": "no action"
3171
+ }
3172
+ },
3173
+ "compositePrimaryKeys": {},
3174
+ "uniqueConstraints": {},
3175
+ "checkConstraints": {
3176
+ "service_ops_deployments_status": {
3177
+ "name": "service_ops_deployments_status",
3178
+ "value": "\"service_ops_deployments\".\"status\" IN ('APPLYING', 'HEALTH_CHECK', 'SUCCEEDED', 'FAILED', 'UNKNOWN')"
3179
+ },
3180
+ "service_ops_deployments_plan_hash": {
3181
+ "name": "service_ops_deployments_plan_hash",
3182
+ "value": "length(\"service_ops_deployments\".\"plan_hash\") = 64"
3183
+ },
3184
+ "service_ops_deployments_artifact_hash": {
3185
+ "name": "service_ops_deployments_artifact_hash",
3186
+ "value": "length(\"service_ops_deployments\".\"artifact_hash\") = 64"
3187
+ },
3188
+ "service_ops_deployments_previous": {
3189
+ "name": "service_ops_deployments_previous",
3190
+ "value": "(\"service_ops_deployments\".\"previous_artifact_id\" IS NULL) = (\"service_ops_deployments\".\"previous_version\" IS NULL)"
3191
+ }
3192
+ }
3193
+ },
3194
+ "service_ops_services": {
3195
+ "name": "service_ops_services",
3196
+ "columns": {
3197
+ "target_id": {
3198
+ "name": "target_id",
3199
+ "type": "text",
3200
+ "primaryKey": true,
3201
+ "notNull": true,
3202
+ "autoincrement": false
3203
+ },
3204
+ "project_id": {
3205
+ "name": "project_id",
3206
+ "type": "text",
3207
+ "primaryKey": false,
3208
+ "notNull": true,
3209
+ "autoincrement": false
3210
+ },
3211
+ "name": {
3212
+ "name": "name",
3213
+ "type": "text",
3214
+ "primaryKey": false,
3215
+ "notNull": true,
3216
+ "autoincrement": false
3217
+ },
3218
+ "namespace": {
3219
+ "name": "namespace",
3220
+ "type": "text",
3221
+ "primaryKey": false,
3222
+ "notNull": true,
3223
+ "autoincrement": false
3224
+ },
3225
+ "pm2_name": {
3226
+ "name": "pm2_name",
3227
+ "type": "text",
3228
+ "primaryKey": false,
3229
+ "notNull": true,
3230
+ "autoincrement": false
3231
+ },
3232
+ "desired_state": {
3233
+ "name": "desired_state",
3234
+ "type": "text",
3235
+ "primaryKey": false,
3236
+ "notNull": true,
3237
+ "autoincrement": false
3238
+ },
3239
+ "observed_state": {
3240
+ "name": "observed_state",
3241
+ "type": "text",
3242
+ "primaryKey": false,
3243
+ "notNull": true,
3244
+ "autoincrement": false
3245
+ },
3246
+ "current_artifact_id": {
3247
+ "name": "current_artifact_id",
3248
+ "type": "text",
3249
+ "primaryKey": false,
3250
+ "notNull": false,
3251
+ "autoincrement": false
3252
+ },
3253
+ "current_version": {
3254
+ "name": "current_version",
3255
+ "type": "text",
3256
+ "primaryKey": false,
3257
+ "notNull": false,
3258
+ "autoincrement": false
3259
+ },
3260
+ "config_json": {
3261
+ "name": "config_json",
3262
+ "type": "text",
3263
+ "primaryKey": false,
3264
+ "notNull": true,
3265
+ "autoincrement": false
3266
+ },
3267
+ "pid": {
3268
+ "name": "pid",
3269
+ "type": "integer",
3270
+ "primaryKey": false,
3271
+ "notNull": false,
3272
+ "autoincrement": false
3273
+ },
3274
+ "last_health_at": {
3275
+ "name": "last_health_at",
3276
+ "type": "integer",
3277
+ "primaryKey": false,
3278
+ "notNull": false,
3279
+ "autoincrement": false
3280
+ },
3281
+ "reason_code": {
3282
+ "name": "reason_code",
3283
+ "type": "text",
3284
+ "primaryKey": false,
3285
+ "notNull": false,
3286
+ "autoincrement": false
3287
+ },
3288
+ "created_at": {
3289
+ "name": "created_at",
3290
+ "type": "integer",
3291
+ "primaryKey": false,
3292
+ "notNull": true,
3293
+ "autoincrement": false
3294
+ },
3295
+ "updated_at": {
3296
+ "name": "updated_at",
3297
+ "type": "integer",
3298
+ "primaryKey": false,
3299
+ "notNull": true,
3300
+ "autoincrement": false
3301
+ }
3302
+ },
3303
+ "indexes": {
3304
+ "service_ops_services_pm2_name_unique": {
3305
+ "name": "service_ops_services_pm2_name_unique",
3306
+ "columns": ["pm2_name"],
3307
+ "isUnique": true
3308
+ },
3309
+ "service_ops_services_project": {
3310
+ "name": "service_ops_services_project",
3311
+ "columns": ["project_id", "updated_at"],
3312
+ "isUnique": false
3313
+ }
3314
+ },
3315
+ "foreignKeys": {
3316
+ "service_ops_services_target_id_deployment_targets_id_fk": {
3317
+ "name": "service_ops_services_target_id_deployment_targets_id_fk",
3318
+ "tableFrom": "service_ops_services",
3319
+ "tableTo": "deployment_targets",
3320
+ "columnsFrom": ["target_id"],
3321
+ "columnsTo": ["id"],
3322
+ "onDelete": "no action",
3323
+ "onUpdate": "no action"
3324
+ },
3325
+ "service_ops_services_project_id_projects_id_fk": {
3326
+ "name": "service_ops_services_project_id_projects_id_fk",
3327
+ "tableFrom": "service_ops_services",
3328
+ "tableTo": "projects",
3329
+ "columnsFrom": ["project_id"],
3330
+ "columnsTo": ["id"],
3331
+ "onDelete": "no action",
3332
+ "onUpdate": "no action"
3333
+ },
3334
+ "service_ops_services_current_artifact_id_deployment_artifacts_id_fk": {
3335
+ "name": "service_ops_services_current_artifact_id_deployment_artifacts_id_fk",
3336
+ "tableFrom": "service_ops_services",
3337
+ "tableTo": "deployment_artifacts",
3338
+ "columnsFrom": ["current_artifact_id"],
3339
+ "columnsTo": ["id"],
3340
+ "onDelete": "no action",
3341
+ "onUpdate": "no action"
3342
+ }
3343
+ },
3344
+ "compositePrimaryKeys": {},
3345
+ "uniqueConstraints": {},
3346
+ "checkConstraints": {
3347
+ "service_ops_services_desired": {
3348
+ "name": "service_ops_services_desired",
3349
+ "value": "\"service_ops_services\".\"desired_state\" IN ('running', 'stopped')"
3350
+ },
3351
+ "service_ops_services_observed": {
3352
+ "name": "service_ops_services_observed",
3353
+ "value": "\"service_ops_services\".\"observed_state\" IN ('stopped', 'starting', 'running', 'unhealthy', 'stopping', 'failed', 'unknown')"
3354
+ }
3355
+ }
3356
+ },
3357
+ "services": {
3358
+ "name": "services",
3359
+ "columns": {
3360
+ "id": {
3361
+ "name": "id",
3362
+ "type": "text",
3363
+ "primaryKey": true,
3364
+ "notNull": true,
3365
+ "autoincrement": false
3366
+ },
3367
+ "operation_id": {
3368
+ "name": "operation_id",
3369
+ "type": "text",
3370
+ "primaryKey": false,
3371
+ "notNull": true,
3372
+ "autoincrement": false
3373
+ },
3374
+ "project_id": {
3375
+ "name": "project_id",
3376
+ "type": "text",
3377
+ "primaryKey": false,
3378
+ "notNull": true,
3379
+ "autoincrement": false
3380
+ },
3381
+ "source_session_id": {
3382
+ "name": "source_session_id",
3383
+ "type": "text",
3384
+ "primaryKey": false,
3385
+ "notNull": false,
3386
+ "autoincrement": false
3387
+ },
3388
+ "terminal_id": {
3389
+ "name": "terminal_id",
3390
+ "type": "text",
3391
+ "primaryKey": false,
3392
+ "notNull": true,
3393
+ "autoincrement": false
3394
+ },
3395
+ "name": {
3396
+ "name": "name",
3397
+ "type": "text",
3398
+ "primaryKey": false,
3399
+ "notNull": true,
3400
+ "autoincrement": false
3401
+ },
3402
+ "kind": {
3403
+ "name": "kind",
3404
+ "type": "text",
3405
+ "primaryKey": false,
3406
+ "notNull": true,
3407
+ "autoincrement": false
3408
+ },
3409
+ "status": {
3410
+ "name": "status",
3411
+ "type": "text",
3412
+ "primaryKey": false,
3413
+ "notNull": true,
3414
+ "autoincrement": false
3415
+ },
3416
+ "terminal_execution_id": {
3417
+ "name": "terminal_execution_id",
3418
+ "type": "text",
3419
+ "primaryKey": false,
3420
+ "notNull": true,
3421
+ "autoincrement": false
3422
+ },
3423
+ "endpoint_generation": {
3424
+ "name": "endpoint_generation",
3425
+ "type": "integer",
3426
+ "primaryKey": false,
3427
+ "notNull": true,
3428
+ "autoincrement": false
3429
+ },
3430
+ "endpoint_host": {
3431
+ "name": "endpoint_host",
3432
+ "type": "text",
3433
+ "primaryKey": false,
3434
+ "notNull": true,
3435
+ "autoincrement": false
3436
+ },
3437
+ "endpoint_port": {
3438
+ "name": "endpoint_port",
3439
+ "type": "integer",
3440
+ "primaryKey": false,
3441
+ "notNull": true,
3442
+ "autoincrement": false
3443
+ },
3444
+ "endpoint_protocol": {
3445
+ "name": "endpoint_protocol",
3446
+ "type": "text",
3447
+ "primaryKey": false,
3448
+ "notNull": true,
3449
+ "autoincrement": false
3450
+ },
3451
+ "identity_json": {
3452
+ "name": "identity_json",
3453
+ "type": "text",
3454
+ "primaryKey": false,
3455
+ "notNull": true,
3456
+ "autoincrement": false
3457
+ },
3458
+ "reason_code": {
3459
+ "name": "reason_code",
3460
+ "type": "text",
3461
+ "primaryKey": false,
3462
+ "notNull": false,
3463
+ "autoincrement": false
3464
+ },
3465
+ "created_at": {
3466
+ "name": "created_at",
3467
+ "type": "integer",
3468
+ "primaryKey": false,
3469
+ "notNull": true,
3470
+ "autoincrement": false
3471
+ },
3472
+ "updated_at": {
3473
+ "name": "updated_at",
3474
+ "type": "integer",
3475
+ "primaryKey": false,
3476
+ "notNull": true,
3477
+ "autoincrement": false
3478
+ },
3479
+ "ended_at": {
3480
+ "name": "ended_at",
3481
+ "type": "integer",
3482
+ "primaryKey": false,
3483
+ "notNull": false,
3484
+ "autoincrement": false
3485
+ }
3486
+ },
3487
+ "indexes": {
3488
+ "services_operation": {
3489
+ "name": "services_operation",
3490
+ "columns": ["operation_id"],
3491
+ "isUnique": true
3492
+ },
3493
+ "services_project_status": {
3494
+ "name": "services_project_status",
3495
+ "columns": ["project_id", "status"],
3496
+ "isUnique": false
3497
+ },
3498
+ "services_terminal": {
3499
+ "name": "services_terminal",
3500
+ "columns": ["terminal_id"],
3501
+ "isUnique": false
3502
+ },
3503
+ "services_active_endpoint": {
3504
+ "name": "services_active_endpoint",
3505
+ "columns": ["terminal_id", "endpoint_host", "endpoint_port"],
3506
+ "isUnique": true,
3507
+ "where": "\"services\".\"status\" IN ('REGISTERING', 'STARTING', 'RUNNING')"
3508
+ }
3509
+ },
3510
+ "foreignKeys": {
3511
+ "services_operation_id_resource_operations_id_fk": {
3512
+ "name": "services_operation_id_resource_operations_id_fk",
3513
+ "tableFrom": "services",
3514
+ "tableTo": "resource_operations",
3515
+ "columnsFrom": ["operation_id"],
3516
+ "columnsTo": ["id"],
3517
+ "onDelete": "no action",
3518
+ "onUpdate": "no action"
3519
+ },
3520
+ "services_project_id_projects_id_fk": {
3521
+ "name": "services_project_id_projects_id_fk",
3522
+ "tableFrom": "services",
3523
+ "tableTo": "projects",
3524
+ "columnsFrom": ["project_id"],
3525
+ "columnsTo": ["id"],
3526
+ "onDelete": "no action",
3527
+ "onUpdate": "no action"
3528
+ },
3529
+ "services_terminal_id_terminals_id_fk": {
3530
+ "name": "services_terminal_id_terminals_id_fk",
3531
+ "tableFrom": "services",
3532
+ "tableTo": "terminals",
3533
+ "columnsFrom": ["terminal_id"],
3534
+ "columnsTo": ["id"],
3535
+ "onDelete": "no action",
3536
+ "onUpdate": "no action"
3537
+ }
3538
+ },
3539
+ "compositePrimaryKeys": {},
3540
+ "uniqueConstraints": {},
3541
+ "checkConstraints": {
3542
+ "services_status": {
3543
+ "name": "services_status",
3544
+ "value": "\"services\".\"status\" IN ('REGISTERING', 'STARTING', 'RUNNING', 'UNKNOWN', 'UNREGISTERED')"
3545
+ },
3546
+ "services_host": {
3547
+ "name": "services_host",
3548
+ "value": "\"services\".\"endpoint_host\" IN ('127.0.0.1', '::1')"
3549
+ },
3550
+ "services_port": {
3551
+ "name": "services_port",
3552
+ "value": "\"services\".\"endpoint_port\" BETWEEN 1 AND 65535"
3553
+ },
3554
+ "services_protocol": {
3555
+ "name": "services_protocol",
3556
+ "value": "\"services\".\"endpoint_protocol\" = 'http'"
3557
+ }
3558
+ }
3559
+ },
3560
+ "sessions": {
3561
+ "name": "sessions",
3562
+ "columns": {
3563
+ "id": {
3564
+ "name": "id",
3565
+ "type": "text",
3566
+ "primaryKey": true,
3567
+ "notNull": true,
3568
+ "autoincrement": false
3569
+ },
3570
+ "project_id": {
3571
+ "name": "project_id",
3572
+ "type": "text",
3573
+ "primaryKey": false,
3574
+ "notNull": false,
3575
+ "autoincrement": false
3576
+ },
3577
+ "workspace_path": {
3578
+ "name": "workspace_path",
3579
+ "type": "text",
3580
+ "primaryKey": false,
3581
+ "notNull": true,
3582
+ "autoincrement": false
3583
+ },
3584
+ "title": {
3585
+ "name": "title",
3586
+ "type": "text",
3587
+ "primaryKey": false,
3588
+ "notNull": true,
3589
+ "autoincrement": false
3590
+ },
3591
+ "status": {
3592
+ "name": "status",
3593
+ "type": "text",
3594
+ "primaryKey": false,
3595
+ "notNull": true,
3596
+ "autoincrement": false,
3597
+ "default": "'active'"
3598
+ },
3599
+ "model_profile_id": {
3600
+ "name": "model_profile_id",
3601
+ "type": "text",
3602
+ "primaryKey": false,
3603
+ "notNull": false,
3604
+ "autoincrement": false
3605
+ },
3606
+ "credential_profile_id": {
3607
+ "name": "credential_profile_id",
3608
+ "type": "text",
3609
+ "primaryKey": false,
3610
+ "notNull": false,
3611
+ "autoincrement": false
3612
+ },
3613
+ "model": {
3614
+ "name": "model",
3615
+ "type": "text",
3616
+ "primaryKey": false,
3617
+ "notNull": false,
3618
+ "autoincrement": false
3619
+ },
3620
+ "thinking": {
3621
+ "name": "thinking",
3622
+ "type": "text",
3623
+ "primaryKey": false,
3624
+ "notNull": false,
3625
+ "autoincrement": false
3626
+ },
3627
+ "approval_policy_id": {
3628
+ "name": "approval_policy_id",
3629
+ "type": "text",
3630
+ "primaryKey": false,
3631
+ "notNull": true,
3632
+ "autoincrement": false,
3633
+ "default": "'standard'"
3634
+ },
3635
+ "created_at": {
3636
+ "name": "created_at",
3637
+ "type": "integer",
3638
+ "primaryKey": false,
3639
+ "notNull": true,
3640
+ "autoincrement": false
3641
+ },
3642
+ "updated_at": {
3643
+ "name": "updated_at",
3644
+ "type": "integer",
3645
+ "primaryKey": false,
3646
+ "notNull": true,
3647
+ "autoincrement": false
3648
+ },
3649
+ "last_activity_at": {
3650
+ "name": "last_activity_at",
3651
+ "type": "integer",
3652
+ "primaryKey": false,
3653
+ "notNull": true,
3654
+ "autoincrement": false
3655
+ }
3656
+ },
3657
+ "indexes": {
3658
+ "idx_sessions_project_updated": {
3659
+ "name": "idx_sessions_project_updated",
3660
+ "columns": ["project_id", "updated_at"],
3661
+ "isUnique": false
3662
+ },
3663
+ "idx_sessions_updated": {
3664
+ "name": "idx_sessions_updated",
3665
+ "columns": ["updated_at"],
3666
+ "isUnique": false
3667
+ }
3668
+ },
3669
+ "foreignKeys": {
3670
+ "sessions_project_id_projects_id_fk": {
3671
+ "name": "sessions_project_id_projects_id_fk",
3672
+ "tableFrom": "sessions",
3673
+ "tableTo": "projects",
3674
+ "columnsFrom": ["project_id"],
3675
+ "columnsTo": ["id"],
3676
+ "onDelete": "set null",
3677
+ "onUpdate": "no action"
3678
+ }
3679
+ },
3680
+ "compositePrimaryKeys": {},
3681
+ "uniqueConstraints": {},
3682
+ "checkConstraints": {}
3683
+ },
3684
+ "terminal_leases": {
3685
+ "name": "terminal_leases",
3686
+ "columns": {
3687
+ "terminal_id": {
3688
+ "name": "terminal_id",
3689
+ "type": "text",
3690
+ "primaryKey": true,
3691
+ "notNull": true,
3692
+ "autoincrement": false
3693
+ },
3694
+ "generation": {
3695
+ "name": "generation",
3696
+ "type": "integer",
3697
+ "primaryKey": false,
3698
+ "notNull": true,
3699
+ "autoincrement": false,
3700
+ "default": 0
3701
+ },
3702
+ "owner_type": {
3703
+ "name": "owner_type",
3704
+ "type": "text",
3705
+ "primaryKey": false,
3706
+ "notNull": false,
3707
+ "autoincrement": false
3708
+ },
3709
+ "owner_client_session_id": {
3710
+ "name": "owner_client_session_id",
3711
+ "type": "text",
3712
+ "primaryKey": false,
3713
+ "notNull": false,
3714
+ "autoincrement": false
3715
+ },
3716
+ "owner_connection_id": {
3717
+ "name": "owner_connection_id",
3718
+ "type": "text",
3719
+ "primaryKey": false,
3720
+ "notNull": false,
3721
+ "autoincrement": false
3722
+ },
3723
+ "owner_session_id": {
3724
+ "name": "owner_session_id",
3725
+ "type": "text",
3726
+ "primaryKey": false,
3727
+ "notNull": false,
3728
+ "autoincrement": false
3729
+ },
3730
+ "owner_turn_id": {
3731
+ "name": "owner_turn_id",
3732
+ "type": "text",
3733
+ "primaryKey": false,
3734
+ "notNull": false,
3735
+ "autoincrement": false
3736
+ },
3737
+ "owner_execution_id": {
3738
+ "name": "owner_execution_id",
3739
+ "type": "text",
3740
+ "primaryKey": false,
3741
+ "notNull": false,
3742
+ "autoincrement": false
3743
+ },
3744
+ "expires_at": {
3745
+ "name": "expires_at",
3746
+ "type": "integer",
3747
+ "primaryKey": false,
3748
+ "notNull": true,
3749
+ "autoincrement": false,
3750
+ "default": 0
3751
+ },
3752
+ "heartbeat_at": {
3753
+ "name": "heartbeat_at",
3754
+ "type": "integer",
3755
+ "primaryKey": false,
3756
+ "notNull": true,
3757
+ "autoincrement": false,
3758
+ "default": 0
3759
+ },
3760
+ "input_sequence": {
3761
+ "name": "input_sequence",
3762
+ "type": "integer",
3763
+ "primaryKey": false,
3764
+ "notNull": true,
3765
+ "autoincrement": false,
3766
+ "default": 0
3767
+ }
3768
+ },
3769
+ "indexes": {},
3770
+ "foreignKeys": {
3771
+ "terminal_leases_terminal_id_terminals_id_fk": {
3772
+ "name": "terminal_leases_terminal_id_terminals_id_fk",
3773
+ "tableFrom": "terminal_leases",
3774
+ "tableTo": "terminals",
3775
+ "columnsFrom": ["terminal_id"],
3776
+ "columnsTo": ["id"],
3777
+ "onDelete": "no action",
3778
+ "onUpdate": "no action"
3779
+ }
3780
+ },
3781
+ "compositePrimaryKeys": {},
3782
+ "uniqueConstraints": {},
3783
+ "checkConstraints": {}
3784
+ },
3785
+ "terminals": {
3786
+ "name": "terminals",
3787
+ "columns": {
3788
+ "id": {
3789
+ "name": "id",
3790
+ "type": "text",
3791
+ "primaryKey": true,
3792
+ "notNull": true,
3793
+ "autoincrement": false
3794
+ },
3795
+ "operation_id": {
3796
+ "name": "operation_id",
3797
+ "type": "text",
3798
+ "primaryKey": false,
3799
+ "notNull": true,
3800
+ "autoincrement": false
3801
+ },
3802
+ "project_id": {
3803
+ "name": "project_id",
3804
+ "type": "text",
3805
+ "primaryKey": false,
3806
+ "notNull": false,
3807
+ "autoincrement": false
3808
+ },
3809
+ "workspace_session_id": {
3810
+ "name": "workspace_session_id",
3811
+ "type": "text",
3812
+ "primaryKey": false,
3813
+ "notNull": false,
3814
+ "autoincrement": false
3815
+ },
3816
+ "source_session_id": {
3817
+ "name": "source_session_id",
3818
+ "type": "text",
3819
+ "primaryKey": false,
3820
+ "notNull": false,
3821
+ "autoincrement": false
3822
+ },
3823
+ "cwd": {
3824
+ "name": "cwd",
3825
+ "type": "text",
3826
+ "primaryKey": false,
3827
+ "notNull": true,
3828
+ "autoincrement": false
3829
+ },
3830
+ "shell": {
3831
+ "name": "shell",
3832
+ "type": "text",
3833
+ "primaryKey": false,
3834
+ "notNull": true,
3835
+ "autoincrement": false
3836
+ },
3837
+ "mode": {
3838
+ "name": "mode",
3839
+ "type": "text",
3840
+ "primaryKey": false,
3841
+ "notNull": true,
3842
+ "autoincrement": false
3843
+ },
3844
+ "role": {
3845
+ "name": "role",
3846
+ "type": "text",
3847
+ "primaryKey": false,
3848
+ "notNull": false,
3849
+ "autoincrement": false
3850
+ },
3851
+ "title": {
3852
+ "name": "title",
3853
+ "type": "text",
3854
+ "primaryKey": false,
3855
+ "notNull": false,
3856
+ "autoincrement": false
3857
+ },
3858
+ "launch_params_json": {
3859
+ "name": "launch_params_json",
3860
+ "type": "text",
3861
+ "primaryKey": false,
3862
+ "notNull": false,
3863
+ "autoincrement": false
3864
+ },
3865
+ "launch_params_hash": {
3866
+ "name": "launch_params_hash",
3867
+ "type": "text",
3868
+ "primaryKey": false,
3869
+ "notNull": false,
3870
+ "autoincrement": false
3871
+ },
3872
+ "created_by_turn_id": {
3873
+ "name": "created_by_turn_id",
3874
+ "type": "text",
3875
+ "primaryKey": false,
3876
+ "notNull": false,
3877
+ "autoincrement": false
3878
+ },
3879
+ "status": {
3880
+ "name": "status",
3881
+ "type": "text",
3882
+ "primaryKey": false,
3883
+ "notNull": true,
3884
+ "autoincrement": false
3885
+ },
3886
+ "process_identity_json": {
3887
+ "name": "process_identity_json",
3888
+ "type": "text",
3889
+ "primaryKey": false,
3890
+ "notNull": false,
3891
+ "autoincrement": false
3892
+ },
3893
+ "reason_code": {
3894
+ "name": "reason_code",
3895
+ "type": "text",
3896
+ "primaryKey": false,
3897
+ "notNull": false,
3898
+ "autoincrement": false
3899
+ },
3900
+ "output_cursor": {
3901
+ "name": "output_cursor",
3902
+ "type": "integer",
3903
+ "primaryKey": false,
3904
+ "notNull": true,
3905
+ "autoincrement": false,
3906
+ "default": 0
3907
+ },
3908
+ "created_at": {
3909
+ "name": "created_at",
3910
+ "type": "integer",
3911
+ "primaryKey": false,
3912
+ "notNull": true,
3913
+ "autoincrement": false
3914
+ },
3915
+ "started_at": {
3916
+ "name": "started_at",
3917
+ "type": "integer",
3918
+ "primaryKey": false,
3919
+ "notNull": false,
3920
+ "autoincrement": false
3921
+ },
3922
+ "ended_at": {
3923
+ "name": "ended_at",
3924
+ "type": "integer",
3925
+ "primaryKey": false,
3926
+ "notNull": false,
3927
+ "autoincrement": false
3928
+ },
3929
+ "exit_code": {
3930
+ "name": "exit_code",
3931
+ "type": "integer",
3932
+ "primaryKey": false,
3933
+ "notNull": false,
3934
+ "autoincrement": false
3935
+ }
3936
+ },
3937
+ "indexes": {
3938
+ "terminals_operation": {
3939
+ "name": "terminals_operation",
3940
+ "columns": ["operation_id"],
3941
+ "isUnique": true
3942
+ },
3943
+ "terminals_status": {
3944
+ "name": "terminals_status",
3945
+ "columns": ["status"],
3946
+ "isUnique": false
3947
+ },
3948
+ "terminals_active_role": {
3949
+ "name": "terminals_active_role",
3950
+ "columns": ["project_id", "role"],
3951
+ "isUnique": true,
3952
+ "where": "\"terminals\".\"mode\" = 'dev' AND \"terminals\".\"status\" IN ('CREATED', 'RUNNING', 'STOPPING')"
3953
+ }
3954
+ },
3955
+ "foreignKeys": {
3956
+ "terminals_operation_id_resource_operations_id_fk": {
3957
+ "name": "terminals_operation_id_resource_operations_id_fk",
3958
+ "tableFrom": "terminals",
3959
+ "tableTo": "resource_operations",
3960
+ "columnsFrom": ["operation_id"],
3961
+ "columnsTo": ["id"],
3962
+ "onDelete": "no action",
3963
+ "onUpdate": "no action"
3964
+ }
3965
+ },
3966
+ "compositePrimaryKeys": {},
3967
+ "uniqueConstraints": {},
3968
+ "checkConstraints": {}
3969
+ },
3970
+ "trusted_devices": {
3971
+ "name": "trusted_devices",
3972
+ "columns": {
3973
+ "id": {
3974
+ "name": "id",
3975
+ "type": "text",
3976
+ "primaryKey": true,
3977
+ "notNull": true,
3978
+ "autoincrement": false
3979
+ },
3980
+ "label": {
3981
+ "name": "label",
3982
+ "type": "text",
3983
+ "primaryKey": false,
3984
+ "notNull": true,
3985
+ "autoincrement": false
3986
+ },
3987
+ "created_by_request_id": {
3988
+ "name": "created_by_request_id",
3989
+ "type": "text",
3990
+ "primaryKey": false,
3991
+ "notNull": false,
3992
+ "autoincrement": false
3993
+ },
3994
+ "user_agent": {
3995
+ "name": "user_agent",
3996
+ "type": "text",
3997
+ "primaryKey": false,
3998
+ "notNull": false,
3999
+ "autoincrement": false
4000
+ },
4001
+ "created_at": {
4002
+ "name": "created_at",
4003
+ "type": "integer",
4004
+ "primaryKey": false,
4005
+ "notNull": true,
4006
+ "autoincrement": false
4007
+ },
4008
+ "last_seen_at": {
4009
+ "name": "last_seen_at",
4010
+ "type": "integer",
4011
+ "primaryKey": false,
4012
+ "notNull": false,
4013
+ "autoincrement": false
4014
+ },
4015
+ "revoked_at": {
4016
+ "name": "revoked_at",
4017
+ "type": "integer",
4018
+ "primaryKey": false,
4019
+ "notNull": false,
4020
+ "autoincrement": false
4021
+ }
4022
+ },
4023
+ "indexes": {},
4024
+ "foreignKeys": {
4025
+ "trusted_devices_created_by_request_id_device_requests_id_fk": {
4026
+ "name": "trusted_devices_created_by_request_id_device_requests_id_fk",
4027
+ "tableFrom": "trusted_devices",
4028
+ "tableTo": "device_requests",
4029
+ "columnsFrom": ["created_by_request_id"],
4030
+ "columnsTo": ["id"],
4031
+ "onDelete": "no action",
4032
+ "onUpdate": "no action"
4033
+ }
4034
+ },
4035
+ "compositePrimaryKeys": {},
4036
+ "uniqueConstraints": {},
4037
+ "checkConstraints": {}
4038
+ },
4039
+ "turns": {
4040
+ "name": "turns",
4041
+ "columns": {
4042
+ "id": {
4043
+ "name": "id",
4044
+ "type": "text",
4045
+ "primaryKey": true,
4046
+ "notNull": true,
4047
+ "autoincrement": false
4048
+ },
4049
+ "session_id": {
4050
+ "name": "session_id",
4051
+ "type": "text",
4052
+ "primaryKey": false,
4053
+ "notNull": true,
4054
+ "autoincrement": false
4055
+ },
4056
+ "model_profile_id": {
4057
+ "name": "model_profile_id",
4058
+ "type": "text",
4059
+ "primaryKey": false,
4060
+ "notNull": false,
4061
+ "autoincrement": false
4062
+ },
4063
+ "credential_profile_id": {
4064
+ "name": "credential_profile_id",
4065
+ "type": "text",
4066
+ "primaryKey": false,
4067
+ "notNull": false,
4068
+ "autoincrement": false
4069
+ },
4070
+ "provider": {
4071
+ "name": "provider",
4072
+ "type": "text",
4073
+ "primaryKey": false,
4074
+ "notNull": false,
4075
+ "autoincrement": false
4076
+ },
4077
+ "model": {
4078
+ "name": "model",
4079
+ "type": "text",
4080
+ "primaryKey": false,
4081
+ "notNull": false,
4082
+ "autoincrement": false
4083
+ },
4084
+ "thinking": {
4085
+ "name": "thinking",
4086
+ "type": "text",
4087
+ "primaryKey": false,
4088
+ "notNull": false,
4089
+ "autoincrement": false
4090
+ },
4091
+ "context_window": {
4092
+ "name": "context_window",
4093
+ "type": "integer",
4094
+ "primaryKey": false,
4095
+ "notNull": false,
4096
+ "autoincrement": false
4097
+ },
4098
+ "status": {
4099
+ "name": "status",
4100
+ "type": "text",
4101
+ "primaryKey": false,
4102
+ "notNull": true,
4103
+ "autoincrement": false
4104
+ },
4105
+ "input_json": {
4106
+ "name": "input_json",
4107
+ "type": "text",
4108
+ "primaryKey": false,
4109
+ "notNull": true,
4110
+ "autoincrement": false
4111
+ },
4112
+ "usage_json": {
4113
+ "name": "usage_json",
4114
+ "type": "text",
4115
+ "primaryKey": false,
4116
+ "notNull": false,
4117
+ "autoincrement": false
4118
+ },
4119
+ "error_json": {
4120
+ "name": "error_json",
4121
+ "type": "text",
4122
+ "primaryKey": false,
4123
+ "notNull": false,
4124
+ "autoincrement": false
4125
+ },
4126
+ "idempotency_key": {
4127
+ "name": "idempotency_key",
4128
+ "type": "text",
4129
+ "primaryKey": false,
4130
+ "notNull": false,
4131
+ "autoincrement": false
4132
+ },
4133
+ "created_at": {
4134
+ "name": "created_at",
4135
+ "type": "integer",
4136
+ "primaryKey": false,
4137
+ "notNull": true,
4138
+ "autoincrement": false
4139
+ },
4140
+ "started_at": {
4141
+ "name": "started_at",
4142
+ "type": "integer",
4143
+ "primaryKey": false,
4144
+ "notNull": false,
4145
+ "autoincrement": false
4146
+ },
4147
+ "ended_at": {
4148
+ "name": "ended_at",
4149
+ "type": "integer",
4150
+ "primaryKey": false,
4151
+ "notNull": false,
4152
+ "autoincrement": false
4153
+ }
4154
+ },
4155
+ "indexes": {
4156
+ "turns_session_idempotency_unique": {
4157
+ "name": "turns_session_idempotency_unique",
4158
+ "columns": ["session_id", "idempotency_key"],
4159
+ "isUnique": true
4160
+ },
4161
+ "idx_turns_session_created": {
4162
+ "name": "idx_turns_session_created",
4163
+ "columns": ["session_id", "created_at"],
4164
+ "isUnique": false
4165
+ },
4166
+ "idx_turns_session_status": {
4167
+ "name": "idx_turns_session_status",
4168
+ "columns": ["session_id", "status"],
4169
+ "isUnique": false
4170
+ }
4171
+ },
4172
+ "foreignKeys": {
4173
+ "turns_session_id_sessions_id_fk": {
4174
+ "name": "turns_session_id_sessions_id_fk",
4175
+ "tableFrom": "turns",
4176
+ "tableTo": "sessions",
4177
+ "columnsFrom": ["session_id"],
4178
+ "columnsTo": ["id"],
4179
+ "onDelete": "cascade",
4180
+ "onUpdate": "no action"
4181
+ }
4182
+ },
4183
+ "compositePrimaryKeys": {},
4184
+ "uniqueConstraints": {},
4185
+ "checkConstraints": {}
4186
+ },
4187
+ "webauthn_challenges": {
4188
+ "name": "webauthn_challenges",
4189
+ "columns": {
4190
+ "id": {
4191
+ "name": "id",
4192
+ "type": "text",
4193
+ "primaryKey": true,
4194
+ "notNull": true,
4195
+ "autoincrement": false
4196
+ },
4197
+ "type": {
4198
+ "name": "type",
4199
+ "type": "text",
4200
+ "primaryKey": false,
4201
+ "notNull": true,
4202
+ "autoincrement": false
4203
+ },
4204
+ "challenge": {
4205
+ "name": "challenge",
4206
+ "type": "text",
4207
+ "primaryKey": false,
4208
+ "notNull": true,
4209
+ "autoincrement": false
4210
+ },
4211
+ "request_id": {
4212
+ "name": "request_id",
4213
+ "type": "text",
4214
+ "primaryKey": false,
4215
+ "notNull": false,
4216
+ "autoincrement": false
4217
+ },
4218
+ "device_id": {
4219
+ "name": "device_id",
4220
+ "type": "text",
4221
+ "primaryKey": false,
4222
+ "notNull": false,
4223
+ "autoincrement": false
4224
+ },
4225
+ "created_at": {
4226
+ "name": "created_at",
4227
+ "type": "integer",
4228
+ "primaryKey": false,
4229
+ "notNull": true,
4230
+ "autoincrement": false
4231
+ },
4232
+ "expires_at": {
4233
+ "name": "expires_at",
4234
+ "type": "integer",
4235
+ "primaryKey": false,
4236
+ "notNull": true,
4237
+ "autoincrement": false
4238
+ },
4239
+ "consumed_at": {
4240
+ "name": "consumed_at",
4241
+ "type": "integer",
4242
+ "primaryKey": false,
4243
+ "notNull": false,
4244
+ "autoincrement": false
4245
+ }
4246
+ },
4247
+ "indexes": {
4248
+ "idx_webauthn_challenges_expiry": {
4249
+ "name": "idx_webauthn_challenges_expiry",
4250
+ "columns": ["expires_at"],
4251
+ "isUnique": false
4252
+ }
4253
+ },
4254
+ "foreignKeys": {
4255
+ "webauthn_challenges_request_id_device_requests_id_fk": {
4256
+ "name": "webauthn_challenges_request_id_device_requests_id_fk",
4257
+ "tableFrom": "webauthn_challenges",
4258
+ "tableTo": "device_requests",
4259
+ "columnsFrom": ["request_id"],
4260
+ "columnsTo": ["id"],
4261
+ "onDelete": "no action",
4262
+ "onUpdate": "no action"
4263
+ },
4264
+ "webauthn_challenges_device_id_trusted_devices_id_fk": {
4265
+ "name": "webauthn_challenges_device_id_trusted_devices_id_fk",
4266
+ "tableFrom": "webauthn_challenges",
4267
+ "tableTo": "trusted_devices",
4268
+ "columnsFrom": ["device_id"],
4269
+ "columnsTo": ["id"],
4270
+ "onDelete": "no action",
4271
+ "onUpdate": "no action"
4272
+ }
4273
+ },
4274
+ "compositePrimaryKeys": {},
4275
+ "uniqueConstraints": {},
4276
+ "checkConstraints": {}
4277
+ },
4278
+ "webauthn_credentials": {
4279
+ "name": "webauthn_credentials",
4280
+ "columns": {
4281
+ "id": {
4282
+ "name": "id",
4283
+ "type": "text",
4284
+ "primaryKey": true,
4285
+ "notNull": true,
4286
+ "autoincrement": false
4287
+ },
4288
+ "device_id": {
4289
+ "name": "device_id",
4290
+ "type": "text",
4291
+ "primaryKey": false,
4292
+ "notNull": true,
4293
+ "autoincrement": false
4294
+ },
4295
+ "credential_id": {
4296
+ "name": "credential_id",
4297
+ "type": "text",
4298
+ "primaryKey": false,
4299
+ "notNull": true,
4300
+ "autoincrement": false
4301
+ },
4302
+ "public_key": {
4303
+ "name": "public_key",
4304
+ "type": "text",
4305
+ "primaryKey": false,
4306
+ "notNull": true,
4307
+ "autoincrement": false
4308
+ },
4309
+ "counter": {
4310
+ "name": "counter",
4311
+ "type": "integer",
4312
+ "primaryKey": false,
4313
+ "notNull": true,
4314
+ "autoincrement": false,
4315
+ "default": 0
4316
+ },
4317
+ "transports_json": {
4318
+ "name": "transports_json",
4319
+ "type": "text",
4320
+ "primaryKey": false,
4321
+ "notNull": true,
4322
+ "autoincrement": false,
4323
+ "default": "'[]'"
4324
+ },
4325
+ "aaguid": {
4326
+ "name": "aaguid",
4327
+ "type": "text",
4328
+ "primaryKey": false,
4329
+ "notNull": false,
4330
+ "autoincrement": false
4331
+ },
4332
+ "backup_eligible": {
4333
+ "name": "backup_eligible",
4334
+ "type": "integer",
4335
+ "primaryKey": false,
4336
+ "notNull": true,
4337
+ "autoincrement": false,
4338
+ "default": false
4339
+ },
4340
+ "backup_state": {
4341
+ "name": "backup_state",
4342
+ "type": "integer",
4343
+ "primaryKey": false,
4344
+ "notNull": true,
4345
+ "autoincrement": false,
4346
+ "default": false
4347
+ },
4348
+ "created_at": {
4349
+ "name": "created_at",
4350
+ "type": "integer",
4351
+ "primaryKey": false,
4352
+ "notNull": true,
4353
+ "autoincrement": false
4354
+ },
4355
+ "last_used_at": {
4356
+ "name": "last_used_at",
4357
+ "type": "integer",
4358
+ "primaryKey": false,
4359
+ "notNull": false,
4360
+ "autoincrement": false
4361
+ },
4362
+ "revoked_at": {
4363
+ "name": "revoked_at",
4364
+ "type": "integer",
4365
+ "primaryKey": false,
4366
+ "notNull": false,
4367
+ "autoincrement": false
4368
+ }
4369
+ },
4370
+ "indexes": {
4371
+ "webauthn_credentials_credential_id_unique": {
4372
+ "name": "webauthn_credentials_credential_id_unique",
4373
+ "columns": ["credential_id"],
4374
+ "isUnique": true
4375
+ },
4376
+ "idx_webauthn_credentials_device": {
4377
+ "name": "idx_webauthn_credentials_device",
4378
+ "columns": ["device_id"],
4379
+ "isUnique": false
4380
+ }
4381
+ },
4382
+ "foreignKeys": {
4383
+ "webauthn_credentials_device_id_trusted_devices_id_fk": {
4384
+ "name": "webauthn_credentials_device_id_trusted_devices_id_fk",
4385
+ "tableFrom": "webauthn_credentials",
4386
+ "tableTo": "trusted_devices",
4387
+ "columnsFrom": ["device_id"],
4388
+ "columnsTo": ["id"],
4389
+ "onDelete": "no action",
4390
+ "onUpdate": "no action"
4391
+ }
4392
+ },
4393
+ "compositePrimaryKeys": {},
4394
+ "uniqueConstraints": {},
4395
+ "checkConstraints": {}
4396
+ }
4397
+ },
4398
+ "views": {},
4399
+ "enums": {},
4400
+ "_meta": {
4401
+ "schemas": {},
4402
+ "tables": {},
4403
+ "columns": {}
4404
+ },
4405
+ "internal": {
4406
+ "indexes": {}
4407
+ }
4408
+ }