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