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