larness 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (160) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +205 -2
  3. package/app.js +131 -0
  4. package/apps/server/dist/address-UO6lb2Hx.js +95 -0
  5. package/apps/server/dist/client-DGXcZxzL.js +121 -0
  6. package/apps/server/dist/doctor-CTealIcx.js +131 -0
  7. package/apps/server/dist/doctor.js +13 -0
  8. package/apps/server/dist/index.js +25481 -0
  9. package/apps/server/dist/lock-8kmtcopF.js +102 -0
  10. package/apps/server/dist/managed-CHal_mk1.js +216 -0
  11. package/apps/server/dist/paths-Bp1nTSw3.js +2434 -0
  12. package/apps/server/dist/status-Dyecl2ni.js +50 -0
  13. package/apps/server/dist/status.js +31 -0
  14. package/apps/server/dist/tui.js +1628 -0
  15. package/apps/server/drizzle/0001_auth.sql +110 -0
  16. package/apps/server/drizzle/0002_projects.sql +13 -0
  17. package/apps/server/drizzle/0003_workspace.sql +81 -0
  18. package/apps/server/drizzle/0004_models.sql +30 -0
  19. package/apps/server/drizzle/0005_resources.sql +54 -0
  20. package/apps/server/drizzle/0006_commands.sql +24 -0
  21. package/apps/server/drizzle/0007_terminals.sql +42 -0
  22. package/apps/server/drizzle/0008_resource_actions.sql +24 -0
  23. package/apps/server/drizzle/0009_terminal_title.sql +1 -0
  24. package/apps/server/drizzle/0010_services.sql +32 -0
  25. package/apps/server/drizzle/0011_deployments.sql +88 -0
  26. package/apps/server/drizzle/0012_deployment_authorizations.sql +67 -0
  27. package/apps/server/drizzle/0013_service_ops.sql +64 -0
  28. package/apps/server/drizzle/0014_service_actions.sql +36 -0
  29. package/apps/server/drizzle/0015_model_catalog.sql +17 -0
  30. package/apps/server/drizzle/0016_multi_provider.sql +2 -0
  31. package/apps/server/drizzle/0017_model_visibility.sql +10 -0
  32. package/apps/server/drizzle/0018_model_defaults.sql +9 -0
  33. package/apps/server/drizzle/0019_credential_endpoint.sql +1 -0
  34. package/apps/server/drizzle/0020_compatible_context.sql +1 -0
  35. package/apps/server/drizzle/0021_context_summaries.sql +13 -0
  36. package/apps/server/drizzle/0022_scheduler.sql +58 -0
  37. package/apps/server/drizzle/meta/0001_snapshot.json +705 -0
  38. package/apps/server/drizzle/meta/0002_snapshot.json +784 -0
  39. package/apps/server/drizzle/meta/0003_snapshot.json +1300 -0
  40. package/apps/server/drizzle/meta/0004_snapshot.json +1489 -0
  41. package/apps/server/drizzle/meta/0005_snapshot.json +1794 -0
  42. package/apps/server/drizzle/meta/0006_snapshot.json +1953 -0
  43. package/apps/server/drizzle/meta/0007_snapshot.json +2232 -0
  44. package/apps/server/drizzle/meta/0008_snapshot.json +2391 -0
  45. package/apps/server/drizzle/meta/0009_snapshot.json +2398 -0
  46. package/apps/server/drizzle/meta/0010_snapshot.json +2601 -0
  47. package/apps/server/drizzle/meta/0015_snapshot.json +4332 -0
  48. package/apps/server/drizzle/meta/0016_snapshot.json +4346 -0
  49. package/apps/server/drizzle/meta/0017_snapshot.json +4408 -0
  50. package/apps/server/drizzle/meta/0018_snapshot.json +4468 -0
  51. package/apps/server/drizzle/meta/0019_snapshot.json +4475 -0
  52. package/apps/server/drizzle/meta/0020_snapshot.json +4482 -0
  53. package/apps/server/drizzle/meta/0021_snapshot.json +4565 -0
  54. package/apps/server/drizzle/meta/0022_snapshot.json +4960 -0
  55. package/apps/server/drizzle/meta/_journal.json +160 -0
  56. package/apps/server/package.json +57 -0
  57. package/apps/web/dist/assets/FileEditor-DpVfk7t3.js +1 -0
  58. package/apps/web/dist/assets/FileViewer-Bv5VYaA3.js +1 -0
  59. package/apps/web/dist/assets/abap-DLDM7-KI.js +1 -0
  60. package/apps/web/dist/assets/apex-DNDY2TF8.js +1 -0
  61. package/apps/web/dist/assets/azcli-Y6nb8tq_.js +1 -0
  62. package/apps/web/dist/assets/bat-BwHxbl9M.js +1 -0
  63. package/apps/web/dist/assets/bicep-CFznDFnq.js +2 -0
  64. package/apps/web/dist/assets/cameligo-Bf6VGUru.js +1 -0
  65. package/apps/web/dist/assets/clojure-Dnu-v4kV.js +1 -0
  66. package/apps/web/dist/assets/codicon-DF1abBS2.ttf +0 -0
  67. package/apps/web/dist/assets/coffee-Bd8akH9Z.js +1 -0
  68. package/apps/web/dist/assets/cpp-BbWJElDN.js +1 -0
  69. package/apps/web/dist/assets/csharp-Co3qMtFm.js +1 -0
  70. package/apps/web/dist/assets/csp-D-4FJmMZ.js +1 -0
  71. package/apps/web/dist/assets/css-DdJfP1eB.js +3 -0
  72. package/apps/web/dist/assets/css.worker-C_6RgliQ.js +97 -0
  73. package/apps/web/dist/assets/cssMode-EHCHSzzL.js +1 -0
  74. package/apps/web/dist/assets/cypher-cTPe9QuQ.js +1 -0
  75. package/apps/web/dist/assets/dart-BOtBlQCF.js +1 -0
  76. package/apps/web/dist/assets/dockerfile-BG73LgW2.js +1 -0
  77. package/apps/web/dist/assets/ecl-BEgZUVRK.js +1 -0
  78. package/apps/web/dist/assets/editor.worker-D1TDBLlL.js +30 -0
  79. package/apps/web/dist/assets/elixir-BkW5O-1t.js +1 -0
  80. package/apps/web/dist/assets/flow9-BeJ5waoc.js +1 -0
  81. package/apps/web/dist/assets/freemarker2-CYDUi4bR.js +3 -0
  82. package/apps/web/dist/assets/fsharp-PahG7c26.js +1 -0
  83. package/apps/web/dist/assets/go-acbASCJo.js +1 -0
  84. package/apps/web/dist/assets/graphql-BxJiqAUM.js +1 -0
  85. package/apps/web/dist/assets/handlebars-Bl5r-XBz.js +1 -0
  86. package/apps/web/dist/assets/hcl-DtV1sZF8.js +1 -0
  87. package/apps/web/dist/assets/html-Dimr8AuT.js +1 -0
  88. package/apps/web/dist/assets/html.worker-CLyYFd_g.js +474 -0
  89. package/apps/web/dist/assets/htmlMode-DbKEQN5e.js +1 -0
  90. package/apps/web/dist/assets/index-CiO_U1kt.js +158 -0
  91. package/apps/web/dist/assets/index-Cn8Mc6ux.css +1 -0
  92. package/apps/web/dist/assets/ini-Kd9XrMLS.js +1 -0
  93. package/apps/web/dist/assets/java-CXBNlu9o.js +1 -0
  94. package/apps/web/dist/assets/javascript-CAsmnqI3.js +1 -0
  95. package/apps/web/dist/assets/json.worker-BggoxaER.js +62 -0
  96. package/apps/web/dist/assets/jsonMode-FAO7KTW2.js +7 -0
  97. package/apps/web/dist/assets/julia-cl7-CwDS.js +1 -0
  98. package/apps/web/dist/assets/kotlin-s7OhZKlX.js +1 -0
  99. package/apps/web/dist/assets/less-9HpZscsL.js +2 -0
  100. package/apps/web/dist/assets/lexon-OrD6JF1K.js +1 -0
  101. package/apps/web/dist/assets/liquid-5H_43_EZ.js +1 -0
  102. package/apps/web/dist/assets/lspLanguageFeatures-DnuYc3pX.js +4 -0
  103. package/apps/web/dist/assets/lua-Cyyb5UIc.js +1 -0
  104. package/apps/web/dist/assets/m3-B8OfTtLu.js +1 -0
  105. package/apps/web/dist/assets/markdown-BFxVWTOG.js +1 -0
  106. package/apps/web/dist/assets/mdx-DJvtDn95.js +1 -0
  107. package/apps/web/dist/assets/mips-CiqrrVzr.js +1 -0
  108. package/apps/web/dist/assets/monaco-BEZSi3GX.js +1005 -0
  109. package/apps/web/dist/assets/monaco-Ced-qlZg.css +1 -0
  110. package/apps/web/dist/assets/msdax-DmeGPVcC.js +1 -0
  111. package/apps/web/dist/assets/mysql-C_tMU-Nz.js +1 -0
  112. package/apps/web/dist/assets/objective-c-BDtDVThU.js +1 -0
  113. package/apps/web/dist/assets/pascal-vHIfCaH5.js +1 -0
  114. package/apps/web/dist/assets/pascaligo-DtZ0uQbO.js +1 -0
  115. package/apps/web/dist/assets/perl-Ub6l9XKa.js +1 -0
  116. package/apps/web/dist/assets/pgsql-BlNEE0v7.js +1 -0
  117. package/apps/web/dist/assets/php-BBUBE1dy.js +1 -0
  118. package/apps/web/dist/assets/pla-DSh2-awV.js +1 -0
  119. package/apps/web/dist/assets/postiats-CocnycG-.js +1 -0
  120. package/apps/web/dist/assets/powerquery-tScXyioY.js +1 -0
  121. package/apps/web/dist/assets/powershell-COWaemsV.js +1 -0
  122. package/apps/web/dist/assets/protobuf-Brw8urJB.js +2 -0
  123. package/apps/web/dist/assets/pug-8SOpv6rk.js +1 -0
  124. package/apps/web/dist/assets/python-D4581wh8.js +1 -0
  125. package/apps/web/dist/assets/qsharp-Bw9ernYp.js +1 -0
  126. package/apps/web/dist/assets/r-j7ic8hl3.js +1 -0
  127. package/apps/web/dist/assets/razor-Cob92s3y.js +1 -0
  128. package/apps/web/dist/assets/redis-Bu5POkcn.js +1 -0
  129. package/apps/web/dist/assets/redshift-Bs9aos_-.js +1 -0
  130. package/apps/web/dist/assets/restructuredtext-CqXO7rUv.js +1 -0
  131. package/apps/web/dist/assets/ruby-zBfavPgS.js +1 -0
  132. package/apps/web/dist/assets/rust-BzKRNQWT.js +1 -0
  133. package/apps/web/dist/assets/sb-BBc9UKZt.js +1 -0
  134. package/apps/web/dist/assets/scala-D9hQfWCl.js +1 -0
  135. package/apps/web/dist/assets/scheme-BPhDTwHR.js +1 -0
  136. package/apps/web/dist/assets/scss-CBJaRo0y.js +3 -0
  137. package/apps/web/dist/assets/shell-DiJ1NA_G.js +1 -0
  138. package/apps/web/dist/assets/solidity-Db0IVjzk.js +1 -0
  139. package/apps/web/dist/assets/sophia-CnS9iZB_.js +1 -0
  140. package/apps/web/dist/assets/sparql-CJmd_6j2.js +1 -0
  141. package/apps/web/dist/assets/sql-ClhHkBeG.js +1 -0
  142. package/apps/web/dist/assets/st-CHwy0fLd.js +1 -0
  143. package/apps/web/dist/assets/swift-CnmFD0ga.js +1 -0
  144. package/apps/web/dist/assets/systemverilog-Bs9z6M-B.js +1 -0
  145. package/apps/web/dist/assets/tcl-Dm6ycUr_.js +1 -0
  146. package/apps/web/dist/assets/ts.worker-BrLZGe_E.js +67722 -0
  147. package/apps/web/dist/assets/tsMode-WJsr57wC.js +11 -0
  148. package/apps/web/dist/assets/twig-Csy3S7wG.js +1 -0
  149. package/apps/web/dist/assets/typescript-8M7GiCNW.js +1 -0
  150. package/apps/web/dist/assets/typespec-Btyra-wh.js +1 -0
  151. package/apps/web/dist/assets/vb-Db0cS2oM.js +1 -0
  152. package/apps/web/dist/assets/wgsl-BTesnYfV.js +298 -0
  153. package/apps/web/dist/assets/workers-FOC7l7Wh.js +1 -0
  154. package/apps/web/dist/assets/xml-Hm5ZZqOZ.js +1 -0
  155. package/apps/web/dist/assets/yaml-E7sEyvM5.js +1 -0
  156. package/apps/web/dist/favicon.svg +4 -0
  157. package/apps/web/dist/index.html +15 -0
  158. package/docs/README.md +26 -0
  159. package/docs/guides/install.md +63 -0
  160. package/package.json +94 -4
@@ -0,0 +1,2601 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "1c09ee45-fb9a-4d69-a2ca-cdc7dd4eefa6",
5
+ "prevId": "573d4324-53ad-4d54-a303-2021ff3e1e41",
6
+ "tables": {
7
+ "agent_events": {
8
+ "name": "agent_events",
9
+ "columns": {
10
+ "id": {
11
+ "name": "id",
12
+ "type": "text",
13
+ "primaryKey": true,
14
+ "notNull": true,
15
+ "autoincrement": false
16
+ },
17
+ "session_id": {
18
+ "name": "session_id",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true,
22
+ "autoincrement": false
23
+ },
24
+ "turn_id": {
25
+ "name": "turn_id",
26
+ "type": "text",
27
+ "primaryKey": false,
28
+ "notNull": false,
29
+ "autoincrement": false
30
+ },
31
+ "seq": {
32
+ "name": "seq",
33
+ "type": "integer",
34
+ "primaryKey": false,
35
+ "notNull": true,
36
+ "autoincrement": false
37
+ },
38
+ "type": {
39
+ "name": "type",
40
+ "type": "text",
41
+ "primaryKey": false,
42
+ "notNull": true,
43
+ "autoincrement": false
44
+ },
45
+ "payload_json": {
46
+ "name": "payload_json",
47
+ "type": "text",
48
+ "primaryKey": false,
49
+ "notNull": true,
50
+ "autoincrement": false,
51
+ "default": "'{}'"
52
+ },
53
+ "created_at": {
54
+ "name": "created_at",
55
+ "type": "integer",
56
+ "primaryKey": false,
57
+ "notNull": true,
58
+ "autoincrement": false
59
+ }
60
+ },
61
+ "indexes": {
62
+ "agent_events_session_seq_unique": {
63
+ "name": "agent_events_session_seq_unique",
64
+ "columns": ["session_id", "seq"],
65
+ "isUnique": true
66
+ }
67
+ },
68
+ "foreignKeys": {
69
+ "agent_events_session_id_sessions_id_fk": {
70
+ "name": "agent_events_session_id_sessions_id_fk",
71
+ "tableFrom": "agent_events",
72
+ "tableTo": "sessions",
73
+ "columnsFrom": ["session_id"],
74
+ "columnsTo": ["id"],
75
+ "onDelete": "cascade",
76
+ "onUpdate": "no action"
77
+ },
78
+ "agent_events_turn_id_turns_id_fk": {
79
+ "name": "agent_events_turn_id_turns_id_fk",
80
+ "tableFrom": "agent_events",
81
+ "tableTo": "turns",
82
+ "columnsFrom": ["turn_id"],
83
+ "columnsTo": ["id"],
84
+ "onDelete": "cascade",
85
+ "onUpdate": "no action"
86
+ }
87
+ },
88
+ "compositePrimaryKeys": {},
89
+ "uniqueConstraints": {},
90
+ "checkConstraints": {}
91
+ },
92
+ "app_meta": {
93
+ "name": "app_meta",
94
+ "columns": {
95
+ "key": {
96
+ "name": "key",
97
+ "type": "text",
98
+ "primaryKey": true,
99
+ "notNull": true,
100
+ "autoincrement": false
101
+ },
102
+ "value": {
103
+ "name": "value",
104
+ "type": "text",
105
+ "primaryKey": false,
106
+ "notNull": true,
107
+ "autoincrement": false
108
+ },
109
+ "updated_at": {
110
+ "name": "updated_at",
111
+ "type": "integer",
112
+ "primaryKey": false,
113
+ "notNull": true,
114
+ "autoincrement": false
115
+ }
116
+ },
117
+ "indexes": {},
118
+ "foreignKeys": {},
119
+ "compositePrimaryKeys": {},
120
+ "uniqueConstraints": {},
121
+ "checkConstraints": {}
122
+ },
123
+ "approvals": {
124
+ "name": "approvals",
125
+ "columns": {
126
+ "id": {
127
+ "name": "id",
128
+ "type": "text",
129
+ "primaryKey": true,
130
+ "notNull": true,
131
+ "autoincrement": false
132
+ },
133
+ "turn_id": {
134
+ "name": "turn_id",
135
+ "type": "text",
136
+ "primaryKey": false,
137
+ "notNull": true,
138
+ "autoincrement": false
139
+ },
140
+ "tool_call_id": {
141
+ "name": "tool_call_id",
142
+ "type": "text",
143
+ "primaryKey": false,
144
+ "notNull": true,
145
+ "autoincrement": false
146
+ },
147
+ "tool_name": {
148
+ "name": "tool_name",
149
+ "type": "text",
150
+ "primaryKey": false,
151
+ "notNull": true,
152
+ "autoincrement": false
153
+ },
154
+ "risk": {
155
+ "name": "risk",
156
+ "type": "text",
157
+ "primaryKey": false,
158
+ "notNull": true,
159
+ "autoincrement": false
160
+ },
161
+ "status": {
162
+ "name": "status",
163
+ "type": "text",
164
+ "primaryKey": false,
165
+ "notNull": true,
166
+ "autoincrement": false,
167
+ "default": "'pending'"
168
+ },
169
+ "scope_json": {
170
+ "name": "scope_json",
171
+ "type": "text",
172
+ "primaryKey": false,
173
+ "notNull": true,
174
+ "autoincrement": false,
175
+ "default": "'{}'"
176
+ },
177
+ "params_hash": {
178
+ "name": "params_hash",
179
+ "type": "text",
180
+ "primaryKey": false,
181
+ "notNull": true,
182
+ "autoincrement": false
183
+ },
184
+ "expires_at": {
185
+ "name": "expires_at",
186
+ "type": "integer",
187
+ "primaryKey": false,
188
+ "notNull": true,
189
+ "autoincrement": false
190
+ },
191
+ "decided_at": {
192
+ "name": "decided_at",
193
+ "type": "integer",
194
+ "primaryKey": false,
195
+ "notNull": false,
196
+ "autoincrement": false
197
+ },
198
+ "decided_by": {
199
+ "name": "decided_by",
200
+ "type": "text",
201
+ "primaryKey": false,
202
+ "notNull": false,
203
+ "autoincrement": false
204
+ },
205
+ "created_at": {
206
+ "name": "created_at",
207
+ "type": "integer",
208
+ "primaryKey": false,
209
+ "notNull": true,
210
+ "autoincrement": false
211
+ }
212
+ },
213
+ "indexes": {
214
+ "idx_approvals_turn_status": {
215
+ "name": "idx_approvals_turn_status",
216
+ "columns": ["turn_id", "status"],
217
+ "isUnique": false
218
+ },
219
+ "idx_approvals_expiry": {
220
+ "name": "idx_approvals_expiry",
221
+ "columns": ["expires_at"],
222
+ "isUnique": false
223
+ }
224
+ },
225
+ "foreignKeys": {
226
+ "approvals_turn_id_turns_id_fk": {
227
+ "name": "approvals_turn_id_turns_id_fk",
228
+ "tableFrom": "approvals",
229
+ "tableTo": "turns",
230
+ "columnsFrom": ["turn_id"],
231
+ "columnsTo": ["id"],
232
+ "onDelete": "cascade",
233
+ "onUpdate": "no action"
234
+ }
235
+ },
236
+ "compositePrimaryKeys": {},
237
+ "uniqueConstraints": {},
238
+ "checkConstraints": {}
239
+ },
240
+ "audit_logs": {
241
+ "name": "audit_logs",
242
+ "columns": {
243
+ "id": {
244
+ "name": "id",
245
+ "type": "text",
246
+ "primaryKey": true,
247
+ "notNull": true,
248
+ "autoincrement": false
249
+ },
250
+ "client_session_id": {
251
+ "name": "client_session_id",
252
+ "type": "text",
253
+ "primaryKey": false,
254
+ "notNull": false,
255
+ "autoincrement": false
256
+ },
257
+ "session_id": {
258
+ "name": "session_id",
259
+ "type": "text",
260
+ "primaryKey": false,
261
+ "notNull": false,
262
+ "autoincrement": false
263
+ },
264
+ "action": {
265
+ "name": "action",
266
+ "type": "text",
267
+ "primaryKey": false,
268
+ "notNull": true,
269
+ "autoincrement": false
270
+ },
271
+ "resource_type": {
272
+ "name": "resource_type",
273
+ "type": "text",
274
+ "primaryKey": false,
275
+ "notNull": false,
276
+ "autoincrement": false
277
+ },
278
+ "resource_id": {
279
+ "name": "resource_id",
280
+ "type": "text",
281
+ "primaryKey": false,
282
+ "notNull": false,
283
+ "autoincrement": false
284
+ },
285
+ "decision": {
286
+ "name": "decision",
287
+ "type": "text",
288
+ "primaryKey": false,
289
+ "notNull": false,
290
+ "autoincrement": false
291
+ },
292
+ "details_json": {
293
+ "name": "details_json",
294
+ "type": "text",
295
+ "primaryKey": false,
296
+ "notNull": true,
297
+ "autoincrement": false,
298
+ "default": "'{}'"
299
+ },
300
+ "created_at": {
301
+ "name": "created_at",
302
+ "type": "integer",
303
+ "primaryKey": false,
304
+ "notNull": true,
305
+ "autoincrement": false
306
+ }
307
+ },
308
+ "indexes": {
309
+ "idx_audit_created": {
310
+ "name": "idx_audit_created",
311
+ "columns": ["created_at"],
312
+ "isUnique": false
313
+ },
314
+ "idx_audit_action": {
315
+ "name": "idx_audit_action",
316
+ "columns": ["action", "created_at"],
317
+ "isUnique": false
318
+ }
319
+ },
320
+ "foreignKeys": {},
321
+ "compositePrimaryKeys": {},
322
+ "uniqueConstraints": {},
323
+ "checkConstraints": {}
324
+ },
325
+ "auth_settings": {
326
+ "name": "auth_settings",
327
+ "columns": {
328
+ "id": {
329
+ "name": "id",
330
+ "type": "integer",
331
+ "primaryKey": true,
332
+ "notNull": true,
333
+ "autoincrement": false
334
+ },
335
+ "admin_hash": {
336
+ "name": "admin_hash",
337
+ "type": "text",
338
+ "primaryKey": false,
339
+ "notNull": true,
340
+ "autoincrement": false
341
+ },
342
+ "admin_updated_at": {
343
+ "name": "admin_updated_at",
344
+ "type": "integer",
345
+ "primaryKey": false,
346
+ "notNull": true,
347
+ "autoincrement": false
348
+ },
349
+ "initialized_at": {
350
+ "name": "initialized_at",
351
+ "type": "integer",
352
+ "primaryKey": false,
353
+ "notNull": true,
354
+ "autoincrement": false
355
+ }
356
+ },
357
+ "indexes": {},
358
+ "foreignKeys": {},
359
+ "compositePrimaryKeys": {},
360
+ "uniqueConstraints": {},
361
+ "checkConstraints": {
362
+ "auth_settings_single_row": {
363
+ "name": "auth_settings_single_row",
364
+ "value": "\"auth_settings\".\"id\" = 1"
365
+ }
366
+ }
367
+ },
368
+ "browser_sessions": {
369
+ "name": "browser_sessions",
370
+ "columns": {
371
+ "id": {
372
+ "name": "id",
373
+ "type": "text",
374
+ "primaryKey": true,
375
+ "notNull": true,
376
+ "autoincrement": false
377
+ },
378
+ "device_id": {
379
+ "name": "device_id",
380
+ "type": "text",
381
+ "primaryKey": false,
382
+ "notNull": false,
383
+ "autoincrement": false
384
+ },
385
+ "token_hash": {
386
+ "name": "token_hash",
387
+ "type": "text",
388
+ "primaryKey": false,
389
+ "notNull": true,
390
+ "autoincrement": false
391
+ },
392
+ "kind": {
393
+ "name": "kind",
394
+ "type": "text",
395
+ "primaryKey": false,
396
+ "notNull": true,
397
+ "autoincrement": false
398
+ },
399
+ "ip": {
400
+ "name": "ip",
401
+ "type": "text",
402
+ "primaryKey": false,
403
+ "notNull": false,
404
+ "autoincrement": false
405
+ },
406
+ "user_agent": {
407
+ "name": "user_agent",
408
+ "type": "text",
409
+ "primaryKey": false,
410
+ "notNull": false,
411
+ "autoincrement": false
412
+ },
413
+ "created_at": {
414
+ "name": "created_at",
415
+ "type": "integer",
416
+ "primaryKey": false,
417
+ "notNull": true,
418
+ "autoincrement": false
419
+ },
420
+ "last_seen_at": {
421
+ "name": "last_seen_at",
422
+ "type": "integer",
423
+ "primaryKey": false,
424
+ "notNull": true,
425
+ "autoincrement": false
426
+ },
427
+ "expires_at": {
428
+ "name": "expires_at",
429
+ "type": "integer",
430
+ "primaryKey": false,
431
+ "notNull": true,
432
+ "autoincrement": false
433
+ },
434
+ "revoked_at": {
435
+ "name": "revoked_at",
436
+ "type": "integer",
437
+ "primaryKey": false,
438
+ "notNull": false,
439
+ "autoincrement": false
440
+ }
441
+ },
442
+ "indexes": {
443
+ "browser_sessions_token_hash_unique": {
444
+ "name": "browser_sessions_token_hash_unique",
445
+ "columns": ["token_hash"],
446
+ "isUnique": true
447
+ },
448
+ "idx_browser_sessions_device": {
449
+ "name": "idx_browser_sessions_device",
450
+ "columns": ["device_id"],
451
+ "isUnique": false
452
+ }
453
+ },
454
+ "foreignKeys": {
455
+ "browser_sessions_device_id_trusted_devices_id_fk": {
456
+ "name": "browser_sessions_device_id_trusted_devices_id_fk",
457
+ "tableFrom": "browser_sessions",
458
+ "tableTo": "trusted_devices",
459
+ "columnsFrom": ["device_id"],
460
+ "columnsTo": ["id"],
461
+ "onDelete": "no action",
462
+ "onUpdate": "no action"
463
+ }
464
+ },
465
+ "compositePrimaryKeys": {},
466
+ "uniqueConstraints": {},
467
+ "checkConstraints": {}
468
+ },
469
+ "command_executions": {
470
+ "name": "command_executions",
471
+ "columns": {
472
+ "id": {
473
+ "name": "id",
474
+ "type": "text",
475
+ "primaryKey": true,
476
+ "notNull": true,
477
+ "autoincrement": false
478
+ },
479
+ "operation_id": {
480
+ "name": "operation_id",
481
+ "type": "text",
482
+ "primaryKey": false,
483
+ "notNull": true,
484
+ "autoincrement": false
485
+ },
486
+ "project_id": {
487
+ "name": "project_id",
488
+ "type": "text",
489
+ "primaryKey": false,
490
+ "notNull": false,
491
+ "autoincrement": false
492
+ },
493
+ "workspace_session_id": {
494
+ "name": "workspace_session_id",
495
+ "type": "text",
496
+ "primaryKey": false,
497
+ "notNull": false,
498
+ "autoincrement": false
499
+ },
500
+ "session_id": {
501
+ "name": "session_id",
502
+ "type": "text",
503
+ "primaryKey": false,
504
+ "notNull": true,
505
+ "autoincrement": false
506
+ },
507
+ "turn_id": {
508
+ "name": "turn_id",
509
+ "type": "text",
510
+ "primaryKey": false,
511
+ "notNull": true,
512
+ "autoincrement": false
513
+ },
514
+ "tool_call_id": {
515
+ "name": "tool_call_id",
516
+ "type": "text",
517
+ "primaryKey": false,
518
+ "notNull": true,
519
+ "autoincrement": false
520
+ },
521
+ "policy_snapshot_id": {
522
+ "name": "policy_snapshot_id",
523
+ "type": "text",
524
+ "primaryKey": false,
525
+ "notNull": true,
526
+ "autoincrement": false
527
+ },
528
+ "params_hash": {
529
+ "name": "params_hash",
530
+ "type": "text",
531
+ "primaryKey": false,
532
+ "notNull": true,
533
+ "autoincrement": false
534
+ },
535
+ "status": {
536
+ "name": "status",
537
+ "type": "text",
538
+ "primaryKey": false,
539
+ "notNull": true,
540
+ "autoincrement": false
541
+ },
542
+ "exit_code": {
543
+ "name": "exit_code",
544
+ "type": "integer",
545
+ "primaryKey": false,
546
+ "notNull": false,
547
+ "autoincrement": false
548
+ },
549
+ "reason_code": {
550
+ "name": "reason_code",
551
+ "type": "text",
552
+ "primaryKey": false,
553
+ "notNull": false,
554
+ "autoincrement": false
555
+ },
556
+ "truncated": {
557
+ "name": "truncated",
558
+ "type": "integer",
559
+ "primaryKey": false,
560
+ "notNull": true,
561
+ "autoincrement": false,
562
+ "default": false
563
+ },
564
+ "process_identity_json": {
565
+ "name": "process_identity_json",
566
+ "type": "text",
567
+ "primaryKey": false,
568
+ "notNull": false,
569
+ "autoincrement": false
570
+ },
571
+ "output_cursor": {
572
+ "name": "output_cursor",
573
+ "type": "integer",
574
+ "primaryKey": false,
575
+ "notNull": true,
576
+ "autoincrement": false,
577
+ "default": 0
578
+ },
579
+ "created_at": {
580
+ "name": "created_at",
581
+ "type": "integer",
582
+ "primaryKey": false,
583
+ "notNull": true,
584
+ "autoincrement": false
585
+ },
586
+ "started_at": {
587
+ "name": "started_at",
588
+ "type": "integer",
589
+ "primaryKey": false,
590
+ "notNull": false,
591
+ "autoincrement": false
592
+ },
593
+ "ended_at": {
594
+ "name": "ended_at",
595
+ "type": "integer",
596
+ "primaryKey": false,
597
+ "notNull": false,
598
+ "autoincrement": false
599
+ }
600
+ },
601
+ "indexes": {
602
+ "command_executions_operation": {
603
+ "name": "command_executions_operation",
604
+ "columns": ["operation_id"],
605
+ "isUnique": true
606
+ },
607
+ "command_executions_status": {
608
+ "name": "command_executions_status",
609
+ "columns": ["status"],
610
+ "isUnique": false
611
+ }
612
+ },
613
+ "foreignKeys": {
614
+ "command_executions_operation_id_resource_operations_id_fk": {
615
+ "name": "command_executions_operation_id_resource_operations_id_fk",
616
+ "tableFrom": "command_executions",
617
+ "tableTo": "resource_operations",
618
+ "columnsFrom": ["operation_id"],
619
+ "columnsTo": ["id"],
620
+ "onDelete": "no action",
621
+ "onUpdate": "no action"
622
+ }
623
+ },
624
+ "compositePrimaryKeys": {},
625
+ "uniqueConstraints": {},
626
+ "checkConstraints": {}
627
+ },
628
+ "credential_profiles": {
629
+ "name": "credential_profiles",
630
+ "columns": {
631
+ "id": {
632
+ "name": "id",
633
+ "type": "text",
634
+ "primaryKey": true,
635
+ "notNull": true,
636
+ "autoincrement": false
637
+ },
638
+ "provider": {
639
+ "name": "provider",
640
+ "type": "text",
641
+ "primaryKey": false,
642
+ "notNull": true,
643
+ "autoincrement": false
644
+ },
645
+ "label": {
646
+ "name": "label",
647
+ "type": "text",
648
+ "primaryKey": false,
649
+ "notNull": true,
650
+ "autoincrement": false
651
+ },
652
+ "secret_ref": {
653
+ "name": "secret_ref",
654
+ "type": "text",
655
+ "primaryKey": false,
656
+ "notNull": true,
657
+ "autoincrement": false
658
+ },
659
+ "created_at": {
660
+ "name": "created_at",
661
+ "type": "integer",
662
+ "primaryKey": false,
663
+ "notNull": true,
664
+ "autoincrement": false
665
+ }
666
+ },
667
+ "indexes": {
668
+ "idx_credential_profiles_provider": {
669
+ "name": "idx_credential_profiles_provider",
670
+ "columns": ["provider"],
671
+ "isUnique": false
672
+ }
673
+ },
674
+ "foreignKeys": {
675
+ "credential_profiles_secret_ref_secrets_id_fk": {
676
+ "name": "credential_profiles_secret_ref_secrets_id_fk",
677
+ "tableFrom": "credential_profiles",
678
+ "tableTo": "secrets",
679
+ "columnsFrom": ["secret_ref"],
680
+ "columnsTo": ["id"],
681
+ "onDelete": "cascade",
682
+ "onUpdate": "no action"
683
+ }
684
+ },
685
+ "compositePrimaryKeys": {},
686
+ "uniqueConstraints": {},
687
+ "checkConstraints": {}
688
+ },
689
+ "device_requests": {
690
+ "name": "device_requests",
691
+ "columns": {
692
+ "id": {
693
+ "name": "id",
694
+ "type": "text",
695
+ "primaryKey": true,
696
+ "notNull": true,
697
+ "autoincrement": false
698
+ },
699
+ "short_code": {
700
+ "name": "short_code",
701
+ "type": "text",
702
+ "primaryKey": false,
703
+ "notNull": true,
704
+ "autoincrement": false
705
+ },
706
+ "status": {
707
+ "name": "status",
708
+ "type": "text",
709
+ "primaryKey": false,
710
+ "notNull": true,
711
+ "autoincrement": false
712
+ },
713
+ "decision": {
714
+ "name": "decision",
715
+ "type": "text",
716
+ "primaryKey": false,
717
+ "notNull": false,
718
+ "autoincrement": false
719
+ },
720
+ "client_label": {
721
+ "name": "client_label",
722
+ "type": "text",
723
+ "primaryKey": false,
724
+ "notNull": false,
725
+ "autoincrement": false
726
+ },
727
+ "user_agent": {
728
+ "name": "user_agent",
729
+ "type": "text",
730
+ "primaryKey": false,
731
+ "notNull": false,
732
+ "autoincrement": false
733
+ },
734
+ "ip": {
735
+ "name": "ip",
736
+ "type": "text",
737
+ "primaryKey": false,
738
+ "notNull": false,
739
+ "autoincrement": false
740
+ },
741
+ "client_origin": {
742
+ "name": "client_origin",
743
+ "type": "text",
744
+ "primaryKey": false,
745
+ "notNull": false,
746
+ "autoincrement": false
747
+ },
748
+ "poll_token_hash": {
749
+ "name": "poll_token_hash",
750
+ "type": "text",
751
+ "primaryKey": false,
752
+ "notNull": true,
753
+ "autoincrement": false
754
+ },
755
+ "code_hash": {
756
+ "name": "code_hash",
757
+ "type": "text",
758
+ "primaryKey": false,
759
+ "notNull": false,
760
+ "autoincrement": false
761
+ },
762
+ "code_expires_at": {
763
+ "name": "code_expires_at",
764
+ "type": "integer",
765
+ "primaryKey": false,
766
+ "notNull": false,
767
+ "autoincrement": false
768
+ },
769
+ "attempts": {
770
+ "name": "attempts",
771
+ "type": "integer",
772
+ "primaryKey": false,
773
+ "notNull": true,
774
+ "autoincrement": false,
775
+ "default": 0
776
+ },
777
+ "enrollment_token_hash": {
778
+ "name": "enrollment_token_hash",
779
+ "type": "text",
780
+ "primaryKey": false,
781
+ "notNull": false,
782
+ "autoincrement": false
783
+ },
784
+ "enrollment_expires_at": {
785
+ "name": "enrollment_expires_at",
786
+ "type": "integer",
787
+ "primaryKey": false,
788
+ "notNull": false,
789
+ "autoincrement": false
790
+ },
791
+ "created_at": {
792
+ "name": "created_at",
793
+ "type": "integer",
794
+ "primaryKey": false,
795
+ "notNull": true,
796
+ "autoincrement": false
797
+ },
798
+ "expires_at": {
799
+ "name": "expires_at",
800
+ "type": "integer",
801
+ "primaryKey": false,
802
+ "notNull": true,
803
+ "autoincrement": false
804
+ },
805
+ "decided_at": {
806
+ "name": "decided_at",
807
+ "type": "integer",
808
+ "primaryKey": false,
809
+ "notNull": false,
810
+ "autoincrement": false
811
+ },
812
+ "redeemed_at": {
813
+ "name": "redeemed_at",
814
+ "type": "integer",
815
+ "primaryKey": false,
816
+ "notNull": false,
817
+ "autoincrement": false
818
+ }
819
+ },
820
+ "indexes": {
821
+ "device_requests_short_code_unique": {
822
+ "name": "device_requests_short_code_unique",
823
+ "columns": ["short_code"],
824
+ "isUnique": true
825
+ },
826
+ "idx_device_requests_status": {
827
+ "name": "idx_device_requests_status",
828
+ "columns": ["status", "expires_at"],
829
+ "isUnique": false
830
+ }
831
+ },
832
+ "foreignKeys": {},
833
+ "compositePrimaryKeys": {},
834
+ "uniqueConstraints": {},
835
+ "checkConstraints": {}
836
+ },
837
+ "file_versions": {
838
+ "name": "file_versions",
839
+ "columns": {
840
+ "scope_key": {
841
+ "name": "scope_key",
842
+ "type": "text",
843
+ "primaryKey": false,
844
+ "notNull": true,
845
+ "autoincrement": false
846
+ },
847
+ "path": {
848
+ "name": "path",
849
+ "type": "text",
850
+ "primaryKey": false,
851
+ "notNull": true,
852
+ "autoincrement": false
853
+ },
854
+ "real_path": {
855
+ "name": "real_path",
856
+ "type": "text",
857
+ "primaryKey": false,
858
+ "notNull": true,
859
+ "autoincrement": false
860
+ },
861
+ "version_hash": {
862
+ "name": "version_hash",
863
+ "type": "text",
864
+ "primaryKey": false,
865
+ "notNull": true,
866
+ "autoincrement": false
867
+ },
868
+ "size": {
869
+ "name": "size",
870
+ "type": "integer",
871
+ "primaryKey": false,
872
+ "notNull": true,
873
+ "autoincrement": false
874
+ },
875
+ "mtime": {
876
+ "name": "mtime",
877
+ "type": "integer",
878
+ "primaryKey": false,
879
+ "notNull": true,
880
+ "autoincrement": false
881
+ },
882
+ "updated_at": {
883
+ "name": "updated_at",
884
+ "type": "integer",
885
+ "primaryKey": false,
886
+ "notNull": true,
887
+ "autoincrement": false
888
+ }
889
+ },
890
+ "indexes": {
891
+ "file_versions_scope_path": {
892
+ "name": "file_versions_scope_path",
893
+ "columns": ["scope_key", "path"],
894
+ "isUnique": true
895
+ }
896
+ },
897
+ "foreignKeys": {},
898
+ "compositePrimaryKeys": {},
899
+ "uniqueConstraints": {},
900
+ "checkConstraints": {}
901
+ },
902
+ "model_profiles": {
903
+ "name": "model_profiles",
904
+ "columns": {
905
+ "id": {
906
+ "name": "id",
907
+ "type": "text",
908
+ "primaryKey": true,
909
+ "notNull": true,
910
+ "autoincrement": false
911
+ },
912
+ "label": {
913
+ "name": "label",
914
+ "type": "text",
915
+ "primaryKey": false,
916
+ "notNull": true,
917
+ "autoincrement": false
918
+ },
919
+ "provider": {
920
+ "name": "provider",
921
+ "type": "text",
922
+ "primaryKey": false,
923
+ "notNull": true,
924
+ "autoincrement": false
925
+ },
926
+ "model": {
927
+ "name": "model",
928
+ "type": "text",
929
+ "primaryKey": false,
930
+ "notNull": true,
931
+ "autoincrement": false
932
+ },
933
+ "credential_profile_id": {
934
+ "name": "credential_profile_id",
935
+ "type": "text",
936
+ "primaryKey": false,
937
+ "notNull": false,
938
+ "autoincrement": false
939
+ },
940
+ "endpoint": {
941
+ "name": "endpoint",
942
+ "type": "text",
943
+ "primaryKey": false,
944
+ "notNull": false,
945
+ "autoincrement": false
946
+ },
947
+ "capabilities_json": {
948
+ "name": "capabilities_json",
949
+ "type": "text",
950
+ "primaryKey": false,
951
+ "notNull": true,
952
+ "autoincrement": false,
953
+ "default": "'{}'"
954
+ },
955
+ "created_at": {
956
+ "name": "created_at",
957
+ "type": "integer",
958
+ "primaryKey": false,
959
+ "notNull": true,
960
+ "autoincrement": false
961
+ }
962
+ },
963
+ "indexes": {
964
+ "idx_model_profiles_provider": {
965
+ "name": "idx_model_profiles_provider",
966
+ "columns": ["provider"],
967
+ "isUnique": false
968
+ }
969
+ },
970
+ "foreignKeys": {
971
+ "model_profiles_credential_profile_id_credential_profiles_id_fk": {
972
+ "name": "model_profiles_credential_profile_id_credential_profiles_id_fk",
973
+ "tableFrom": "model_profiles",
974
+ "tableTo": "credential_profiles",
975
+ "columnsFrom": ["credential_profile_id"],
976
+ "columnsTo": ["id"],
977
+ "onDelete": "set null",
978
+ "onUpdate": "no action"
979
+ }
980
+ },
981
+ "compositePrimaryKeys": {},
982
+ "uniqueConstraints": {},
983
+ "checkConstraints": {}
984
+ },
985
+ "projects": {
986
+ "name": "projects",
987
+ "columns": {
988
+ "id": {
989
+ "name": "id",
990
+ "type": "text",
991
+ "primaryKey": true,
992
+ "notNull": true,
993
+ "autoincrement": false
994
+ },
995
+ "name": {
996
+ "name": "name",
997
+ "type": "text",
998
+ "primaryKey": false,
999
+ "notNull": true,
1000
+ "autoincrement": false
1001
+ },
1002
+ "root_path": {
1003
+ "name": "root_path",
1004
+ "type": "text",
1005
+ "primaryKey": false,
1006
+ "notNull": true,
1007
+ "autoincrement": false
1008
+ },
1009
+ "real_path": {
1010
+ "name": "real_path",
1011
+ "type": "text",
1012
+ "primaryKey": false,
1013
+ "notNull": true,
1014
+ "autoincrement": false
1015
+ },
1016
+ "settings_json": {
1017
+ "name": "settings_json",
1018
+ "type": "text",
1019
+ "primaryKey": false,
1020
+ "notNull": true,
1021
+ "autoincrement": false,
1022
+ "default": "'{}'"
1023
+ },
1024
+ "git_detected": {
1025
+ "name": "git_detected",
1026
+ "type": "integer",
1027
+ "primaryKey": false,
1028
+ "notNull": true,
1029
+ "autoincrement": false,
1030
+ "default": false
1031
+ },
1032
+ "created_at": {
1033
+ "name": "created_at",
1034
+ "type": "integer",
1035
+ "primaryKey": false,
1036
+ "notNull": true,
1037
+ "autoincrement": false
1038
+ },
1039
+ "updated_at": {
1040
+ "name": "updated_at",
1041
+ "type": "integer",
1042
+ "primaryKey": false,
1043
+ "notNull": true,
1044
+ "autoincrement": false
1045
+ }
1046
+ },
1047
+ "indexes": {
1048
+ "projects_real_path_unique": {
1049
+ "name": "projects_real_path_unique",
1050
+ "columns": ["real_path"],
1051
+ "isUnique": true
1052
+ },
1053
+ "idx_projects_updated": {
1054
+ "name": "idx_projects_updated",
1055
+ "columns": ["updated_at"],
1056
+ "isUnique": false
1057
+ }
1058
+ },
1059
+ "foreignKeys": {},
1060
+ "compositePrimaryKeys": {},
1061
+ "uniqueConstraints": {},
1062
+ "checkConstraints": {}
1063
+ },
1064
+ "resource_actions": {
1065
+ "name": "resource_actions",
1066
+ "columns": {
1067
+ "id": {
1068
+ "name": "id",
1069
+ "type": "text",
1070
+ "primaryKey": true,
1071
+ "notNull": true,
1072
+ "autoincrement": false
1073
+ },
1074
+ "operation_id": {
1075
+ "name": "operation_id",
1076
+ "type": "text",
1077
+ "primaryKey": false,
1078
+ "notNull": true,
1079
+ "autoincrement": false
1080
+ },
1081
+ "project_id": {
1082
+ "name": "project_id",
1083
+ "type": "text",
1084
+ "primaryKey": false,
1085
+ "notNull": true,
1086
+ "autoincrement": false
1087
+ },
1088
+ "kind": {
1089
+ "name": "kind",
1090
+ "type": "text",
1091
+ "primaryKey": false,
1092
+ "notNull": true,
1093
+ "autoincrement": false
1094
+ },
1095
+ "risk": {
1096
+ "name": "risk",
1097
+ "type": "text",
1098
+ "primaryKey": false,
1099
+ "notNull": true,
1100
+ "autoincrement": false
1101
+ },
1102
+ "status": {
1103
+ "name": "status",
1104
+ "type": "text",
1105
+ "primaryKey": false,
1106
+ "notNull": true,
1107
+ "autoincrement": false
1108
+ },
1109
+ "params_json": {
1110
+ "name": "params_json",
1111
+ "type": "text",
1112
+ "primaryKey": false,
1113
+ "notNull": true,
1114
+ "autoincrement": false
1115
+ },
1116
+ "params_hash": {
1117
+ "name": "params_hash",
1118
+ "type": "text",
1119
+ "primaryKey": false,
1120
+ "notNull": true,
1121
+ "autoincrement": false
1122
+ },
1123
+ "snapshot_hash": {
1124
+ "name": "snapshot_hash",
1125
+ "type": "text",
1126
+ "primaryKey": false,
1127
+ "notNull": true,
1128
+ "autoincrement": false
1129
+ },
1130
+ "requested_by": {
1131
+ "name": "requested_by",
1132
+ "type": "text",
1133
+ "primaryKey": false,
1134
+ "notNull": true,
1135
+ "autoincrement": false
1136
+ },
1137
+ "decided_by": {
1138
+ "name": "decided_by",
1139
+ "type": "text",
1140
+ "primaryKey": false,
1141
+ "notNull": false,
1142
+ "autoincrement": false
1143
+ },
1144
+ "expires_at": {
1145
+ "name": "expires_at",
1146
+ "type": "integer",
1147
+ "primaryKey": false,
1148
+ "notNull": true,
1149
+ "autoincrement": false
1150
+ },
1151
+ "decided_at": {
1152
+ "name": "decided_at",
1153
+ "type": "integer",
1154
+ "primaryKey": false,
1155
+ "notNull": false,
1156
+ "autoincrement": false
1157
+ },
1158
+ "started_at": {
1159
+ "name": "started_at",
1160
+ "type": "integer",
1161
+ "primaryKey": false,
1162
+ "notNull": false,
1163
+ "autoincrement": false
1164
+ },
1165
+ "ended_at": {
1166
+ "name": "ended_at",
1167
+ "type": "integer",
1168
+ "primaryKey": false,
1169
+ "notNull": false,
1170
+ "autoincrement": false
1171
+ },
1172
+ "result_json": {
1173
+ "name": "result_json",
1174
+ "type": "text",
1175
+ "primaryKey": false,
1176
+ "notNull": false,
1177
+ "autoincrement": false
1178
+ },
1179
+ "created_at": {
1180
+ "name": "created_at",
1181
+ "type": "integer",
1182
+ "primaryKey": false,
1183
+ "notNull": true,
1184
+ "autoincrement": false
1185
+ }
1186
+ },
1187
+ "indexes": {
1188
+ "resource_actions_operation": {
1189
+ "name": "resource_actions_operation",
1190
+ "columns": ["operation_id"],
1191
+ "isUnique": true
1192
+ },
1193
+ "resource_actions_project_status": {
1194
+ "name": "resource_actions_project_status",
1195
+ "columns": ["project_id", "status"],
1196
+ "isUnique": false
1197
+ }
1198
+ },
1199
+ "foreignKeys": {
1200
+ "resource_actions_operation_id_resource_operations_id_fk": {
1201
+ "name": "resource_actions_operation_id_resource_operations_id_fk",
1202
+ "tableFrom": "resource_actions",
1203
+ "tableTo": "resource_operations",
1204
+ "columnsFrom": ["operation_id"],
1205
+ "columnsTo": ["id"],
1206
+ "onDelete": "no action",
1207
+ "onUpdate": "no action"
1208
+ },
1209
+ "resource_actions_project_id_projects_id_fk": {
1210
+ "name": "resource_actions_project_id_projects_id_fk",
1211
+ "tableFrom": "resource_actions",
1212
+ "tableTo": "projects",
1213
+ "columnsFrom": ["project_id"],
1214
+ "columnsTo": ["id"],
1215
+ "onDelete": "no action",
1216
+ "onUpdate": "no action"
1217
+ }
1218
+ },
1219
+ "compositePrimaryKeys": {},
1220
+ "uniqueConstraints": {},
1221
+ "checkConstraints": {}
1222
+ },
1223
+ "resource_events": {
1224
+ "name": "resource_events",
1225
+ "columns": {
1226
+ "id": {
1227
+ "name": "id",
1228
+ "type": "text",
1229
+ "primaryKey": true,
1230
+ "notNull": true,
1231
+ "autoincrement": false
1232
+ },
1233
+ "stream_id": {
1234
+ "name": "stream_id",
1235
+ "type": "text",
1236
+ "primaryKey": false,
1237
+ "notNull": true,
1238
+ "autoincrement": false
1239
+ },
1240
+ "seq": {
1241
+ "name": "seq",
1242
+ "type": "integer",
1243
+ "primaryKey": false,
1244
+ "notNull": true,
1245
+ "autoincrement": false
1246
+ },
1247
+ "type": {
1248
+ "name": "type",
1249
+ "type": "text",
1250
+ "primaryKey": false,
1251
+ "notNull": true,
1252
+ "autoincrement": false
1253
+ },
1254
+ "payload_json": {
1255
+ "name": "payload_json",
1256
+ "type": "text",
1257
+ "primaryKey": false,
1258
+ "notNull": true,
1259
+ "autoincrement": false
1260
+ },
1261
+ "created_at": {
1262
+ "name": "created_at",
1263
+ "type": "integer",
1264
+ "primaryKey": false,
1265
+ "notNull": true,
1266
+ "autoincrement": false
1267
+ }
1268
+ },
1269
+ "indexes": {
1270
+ "resource_events_stream_seq": {
1271
+ "name": "resource_events_stream_seq",
1272
+ "columns": ["stream_id", "seq"],
1273
+ "isUnique": true
1274
+ }
1275
+ },
1276
+ "foreignKeys": {
1277
+ "resource_events_stream_id_resource_streams_stream_id_fk": {
1278
+ "name": "resource_events_stream_id_resource_streams_stream_id_fk",
1279
+ "tableFrom": "resource_events",
1280
+ "tableTo": "resource_streams",
1281
+ "columnsFrom": ["stream_id"],
1282
+ "columnsTo": ["stream_id"],
1283
+ "onDelete": "no action",
1284
+ "onUpdate": "no action"
1285
+ }
1286
+ },
1287
+ "compositePrimaryKeys": {},
1288
+ "uniqueConstraints": {},
1289
+ "checkConstraints": {}
1290
+ },
1291
+ "resource_locks": {
1292
+ "name": "resource_locks",
1293
+ "columns": {
1294
+ "id": {
1295
+ "name": "id",
1296
+ "type": "text",
1297
+ "primaryKey": true,
1298
+ "notNull": true,
1299
+ "autoincrement": false
1300
+ },
1301
+ "resource_type": {
1302
+ "name": "resource_type",
1303
+ "type": "text",
1304
+ "primaryKey": false,
1305
+ "notNull": true,
1306
+ "autoincrement": false
1307
+ },
1308
+ "resource_id": {
1309
+ "name": "resource_id",
1310
+ "type": "text",
1311
+ "primaryKey": false,
1312
+ "notNull": true,
1313
+ "autoincrement": false
1314
+ },
1315
+ "root_real_path": {
1316
+ "name": "root_real_path",
1317
+ "type": "text",
1318
+ "primaryKey": false,
1319
+ "notNull": false,
1320
+ "autoincrement": false
1321
+ },
1322
+ "owner": {
1323
+ "name": "owner",
1324
+ "type": "text",
1325
+ "primaryKey": false,
1326
+ "notNull": true,
1327
+ "autoincrement": false
1328
+ },
1329
+ "execution_id": {
1330
+ "name": "execution_id",
1331
+ "type": "text",
1332
+ "primaryKey": false,
1333
+ "notNull": true,
1334
+ "autoincrement": false
1335
+ },
1336
+ "fencing_token": {
1337
+ "name": "fencing_token",
1338
+ "type": "integer",
1339
+ "primaryKey": false,
1340
+ "notNull": true,
1341
+ "autoincrement": false
1342
+ },
1343
+ "expires_at": {
1344
+ "name": "expires_at",
1345
+ "type": "integer",
1346
+ "primaryKey": false,
1347
+ "notNull": true,
1348
+ "autoincrement": false
1349
+ },
1350
+ "heartbeat_at": {
1351
+ "name": "heartbeat_at",
1352
+ "type": "integer",
1353
+ "primaryKey": false,
1354
+ "notNull": true,
1355
+ "autoincrement": false
1356
+ },
1357
+ "created_at": {
1358
+ "name": "created_at",
1359
+ "type": "integer",
1360
+ "primaryKey": false,
1361
+ "notNull": true,
1362
+ "autoincrement": false
1363
+ }
1364
+ },
1365
+ "indexes": {
1366
+ "resource_locks_resource_unique": {
1367
+ "name": "resource_locks_resource_unique",
1368
+ "columns": ["resource_type", "resource_id"],
1369
+ "isUnique": true
1370
+ },
1371
+ "idx_resource_locks_expiry": {
1372
+ "name": "idx_resource_locks_expiry",
1373
+ "columns": ["expires_at"],
1374
+ "isUnique": false
1375
+ }
1376
+ },
1377
+ "foreignKeys": {},
1378
+ "compositePrimaryKeys": {},
1379
+ "uniqueConstraints": {},
1380
+ "checkConstraints": {}
1381
+ },
1382
+ "resource_operations": {
1383
+ "name": "resource_operations",
1384
+ "columns": {
1385
+ "id": {
1386
+ "name": "id",
1387
+ "type": "text",
1388
+ "primaryKey": true,
1389
+ "notNull": true,
1390
+ "autoincrement": false
1391
+ },
1392
+ "scope_key": {
1393
+ "name": "scope_key",
1394
+ "type": "text",
1395
+ "primaryKey": false,
1396
+ "notNull": true,
1397
+ "autoincrement": false
1398
+ },
1399
+ "root_real_path": {
1400
+ "name": "root_real_path",
1401
+ "type": "text",
1402
+ "primaryKey": false,
1403
+ "notNull": true,
1404
+ "autoincrement": false
1405
+ },
1406
+ "kind": {
1407
+ "name": "kind",
1408
+ "type": "text",
1409
+ "primaryKey": false,
1410
+ "notNull": true,
1411
+ "autoincrement": false
1412
+ },
1413
+ "status": {
1414
+ "name": "status",
1415
+ "type": "text",
1416
+ "primaryKey": false,
1417
+ "notNull": true,
1418
+ "autoincrement": false
1419
+ },
1420
+ "params_hash": {
1421
+ "name": "params_hash",
1422
+ "type": "text",
1423
+ "primaryKey": false,
1424
+ "notNull": true,
1425
+ "autoincrement": false
1426
+ },
1427
+ "idempotency_key": {
1428
+ "name": "idempotency_key",
1429
+ "type": "text",
1430
+ "primaryKey": false,
1431
+ "notNull": true,
1432
+ "autoincrement": false
1433
+ },
1434
+ "client_session_id": {
1435
+ "name": "client_session_id",
1436
+ "type": "text",
1437
+ "primaryKey": false,
1438
+ "notNull": true,
1439
+ "autoincrement": false
1440
+ },
1441
+ "path": {
1442
+ "name": "path",
1443
+ "type": "text",
1444
+ "primaryKey": false,
1445
+ "notNull": true,
1446
+ "autoincrement": false
1447
+ },
1448
+ "expected_version": {
1449
+ "name": "expected_version",
1450
+ "type": "text",
1451
+ "primaryKey": false,
1452
+ "notNull": true,
1453
+ "autoincrement": false
1454
+ },
1455
+ "target_version": {
1456
+ "name": "target_version",
1457
+ "type": "text",
1458
+ "primaryKey": false,
1459
+ "notNull": true,
1460
+ "autoincrement": false
1461
+ },
1462
+ "lock_id": {
1463
+ "name": "lock_id",
1464
+ "type": "text",
1465
+ "primaryKey": false,
1466
+ "notNull": true,
1467
+ "autoincrement": false
1468
+ },
1469
+ "fencing_token": {
1470
+ "name": "fencing_token",
1471
+ "type": "integer",
1472
+ "primaryKey": false,
1473
+ "notNull": true,
1474
+ "autoincrement": false
1475
+ },
1476
+ "result_json": {
1477
+ "name": "result_json",
1478
+ "type": "text",
1479
+ "primaryKey": false,
1480
+ "notNull": false,
1481
+ "autoincrement": false
1482
+ },
1483
+ "error_code": {
1484
+ "name": "error_code",
1485
+ "type": "text",
1486
+ "primaryKey": false,
1487
+ "notNull": false,
1488
+ "autoincrement": false
1489
+ },
1490
+ "created_at": {
1491
+ "name": "created_at",
1492
+ "type": "integer",
1493
+ "primaryKey": false,
1494
+ "notNull": true,
1495
+ "autoincrement": false
1496
+ },
1497
+ "updated_at": {
1498
+ "name": "updated_at",
1499
+ "type": "integer",
1500
+ "primaryKey": false,
1501
+ "notNull": true,
1502
+ "autoincrement": false
1503
+ }
1504
+ },
1505
+ "indexes": {
1506
+ "resource_operations_client_kind_key": {
1507
+ "name": "resource_operations_client_kind_key",
1508
+ "columns": ["client_session_id", "kind", "idempotency_key"],
1509
+ "isUnique": true
1510
+ },
1511
+ "resource_operations_status": {
1512
+ "name": "resource_operations_status",
1513
+ "columns": ["status"],
1514
+ "isUnique": false
1515
+ }
1516
+ },
1517
+ "foreignKeys": {},
1518
+ "compositePrimaryKeys": {},
1519
+ "uniqueConstraints": {},
1520
+ "checkConstraints": {}
1521
+ },
1522
+ "resource_streams": {
1523
+ "name": "resource_streams",
1524
+ "columns": {
1525
+ "stream_id": {
1526
+ "name": "stream_id",
1527
+ "type": "text",
1528
+ "primaryKey": true,
1529
+ "notNull": true,
1530
+ "autoincrement": false
1531
+ },
1532
+ "last_seq": {
1533
+ "name": "last_seq",
1534
+ "type": "integer",
1535
+ "primaryKey": false,
1536
+ "notNull": true,
1537
+ "autoincrement": false,
1538
+ "default": 0
1539
+ }
1540
+ },
1541
+ "indexes": {},
1542
+ "foreignKeys": {},
1543
+ "compositePrimaryKeys": {},
1544
+ "uniqueConstraints": {},
1545
+ "checkConstraints": {}
1546
+ },
1547
+ "secrets": {
1548
+ "name": "secrets",
1549
+ "columns": {
1550
+ "id": {
1551
+ "name": "id",
1552
+ "type": "text",
1553
+ "primaryKey": true,
1554
+ "notNull": true,
1555
+ "autoincrement": false
1556
+ },
1557
+ "ciphertext": {
1558
+ "name": "ciphertext",
1559
+ "type": "text",
1560
+ "primaryKey": false,
1561
+ "notNull": true,
1562
+ "autoincrement": false
1563
+ },
1564
+ "nonce": {
1565
+ "name": "nonce",
1566
+ "type": "text",
1567
+ "primaryKey": false,
1568
+ "notNull": true,
1569
+ "autoincrement": false
1570
+ },
1571
+ "tag": {
1572
+ "name": "tag",
1573
+ "type": "text",
1574
+ "primaryKey": false,
1575
+ "notNull": true,
1576
+ "autoincrement": false
1577
+ },
1578
+ "created_at": {
1579
+ "name": "created_at",
1580
+ "type": "integer",
1581
+ "primaryKey": false,
1582
+ "notNull": true,
1583
+ "autoincrement": false
1584
+ }
1585
+ },
1586
+ "indexes": {},
1587
+ "foreignKeys": {},
1588
+ "compositePrimaryKeys": {},
1589
+ "uniqueConstraints": {},
1590
+ "checkConstraints": {}
1591
+ },
1592
+ "services": {
1593
+ "name": "services",
1594
+ "columns": {
1595
+ "id": {
1596
+ "name": "id",
1597
+ "type": "text",
1598
+ "primaryKey": true,
1599
+ "notNull": true,
1600
+ "autoincrement": false
1601
+ },
1602
+ "operation_id": {
1603
+ "name": "operation_id",
1604
+ "type": "text",
1605
+ "primaryKey": false,
1606
+ "notNull": true,
1607
+ "autoincrement": false
1608
+ },
1609
+ "project_id": {
1610
+ "name": "project_id",
1611
+ "type": "text",
1612
+ "primaryKey": false,
1613
+ "notNull": true,
1614
+ "autoincrement": false
1615
+ },
1616
+ "source_session_id": {
1617
+ "name": "source_session_id",
1618
+ "type": "text",
1619
+ "primaryKey": false,
1620
+ "notNull": false,
1621
+ "autoincrement": false
1622
+ },
1623
+ "terminal_id": {
1624
+ "name": "terminal_id",
1625
+ "type": "text",
1626
+ "primaryKey": false,
1627
+ "notNull": true,
1628
+ "autoincrement": false
1629
+ },
1630
+ "name": {
1631
+ "name": "name",
1632
+ "type": "text",
1633
+ "primaryKey": false,
1634
+ "notNull": true,
1635
+ "autoincrement": false
1636
+ },
1637
+ "kind": {
1638
+ "name": "kind",
1639
+ "type": "text",
1640
+ "primaryKey": false,
1641
+ "notNull": true,
1642
+ "autoincrement": false
1643
+ },
1644
+ "status": {
1645
+ "name": "status",
1646
+ "type": "text",
1647
+ "primaryKey": false,
1648
+ "notNull": true,
1649
+ "autoincrement": false
1650
+ },
1651
+ "terminal_execution_id": {
1652
+ "name": "terminal_execution_id",
1653
+ "type": "text",
1654
+ "primaryKey": false,
1655
+ "notNull": true,
1656
+ "autoincrement": false
1657
+ },
1658
+ "endpoint_generation": {
1659
+ "name": "endpoint_generation",
1660
+ "type": "integer",
1661
+ "primaryKey": false,
1662
+ "notNull": true,
1663
+ "autoincrement": false
1664
+ },
1665
+ "endpoint_host": {
1666
+ "name": "endpoint_host",
1667
+ "type": "text",
1668
+ "primaryKey": false,
1669
+ "notNull": true,
1670
+ "autoincrement": false
1671
+ },
1672
+ "endpoint_port": {
1673
+ "name": "endpoint_port",
1674
+ "type": "integer",
1675
+ "primaryKey": false,
1676
+ "notNull": true,
1677
+ "autoincrement": false
1678
+ },
1679
+ "endpoint_protocol": {
1680
+ "name": "endpoint_protocol",
1681
+ "type": "text",
1682
+ "primaryKey": false,
1683
+ "notNull": true,
1684
+ "autoincrement": false
1685
+ },
1686
+ "identity_json": {
1687
+ "name": "identity_json",
1688
+ "type": "text",
1689
+ "primaryKey": false,
1690
+ "notNull": true,
1691
+ "autoincrement": false
1692
+ },
1693
+ "reason_code": {
1694
+ "name": "reason_code",
1695
+ "type": "text",
1696
+ "primaryKey": false,
1697
+ "notNull": false,
1698
+ "autoincrement": false
1699
+ },
1700
+ "created_at": {
1701
+ "name": "created_at",
1702
+ "type": "integer",
1703
+ "primaryKey": false,
1704
+ "notNull": true,
1705
+ "autoincrement": false
1706
+ },
1707
+ "updated_at": {
1708
+ "name": "updated_at",
1709
+ "type": "integer",
1710
+ "primaryKey": false,
1711
+ "notNull": true,
1712
+ "autoincrement": false
1713
+ },
1714
+ "ended_at": {
1715
+ "name": "ended_at",
1716
+ "type": "integer",
1717
+ "primaryKey": false,
1718
+ "notNull": false,
1719
+ "autoincrement": false
1720
+ }
1721
+ },
1722
+ "indexes": {
1723
+ "services_operation": {
1724
+ "name": "services_operation",
1725
+ "columns": ["operation_id"],
1726
+ "isUnique": true
1727
+ },
1728
+ "services_project_status": {
1729
+ "name": "services_project_status",
1730
+ "columns": ["project_id", "status"],
1731
+ "isUnique": false
1732
+ },
1733
+ "services_terminal": {
1734
+ "name": "services_terminal",
1735
+ "columns": ["terminal_id"],
1736
+ "isUnique": false
1737
+ },
1738
+ "services_active_endpoint": {
1739
+ "name": "services_active_endpoint",
1740
+ "columns": ["terminal_id", "endpoint_host", "endpoint_port"],
1741
+ "isUnique": true,
1742
+ "where": "\"services\".\"status\" IN ('REGISTERING', 'STARTING', 'RUNNING')"
1743
+ }
1744
+ },
1745
+ "foreignKeys": {
1746
+ "services_operation_id_resource_operations_id_fk": {
1747
+ "name": "services_operation_id_resource_operations_id_fk",
1748
+ "tableFrom": "services",
1749
+ "tableTo": "resource_operations",
1750
+ "columnsFrom": ["operation_id"],
1751
+ "columnsTo": ["id"],
1752
+ "onDelete": "no action",
1753
+ "onUpdate": "no action"
1754
+ },
1755
+ "services_project_id_projects_id_fk": {
1756
+ "name": "services_project_id_projects_id_fk",
1757
+ "tableFrom": "services",
1758
+ "tableTo": "projects",
1759
+ "columnsFrom": ["project_id"],
1760
+ "columnsTo": ["id"],
1761
+ "onDelete": "no action",
1762
+ "onUpdate": "no action"
1763
+ },
1764
+ "services_terminal_id_terminals_id_fk": {
1765
+ "name": "services_terminal_id_terminals_id_fk",
1766
+ "tableFrom": "services",
1767
+ "tableTo": "terminals",
1768
+ "columnsFrom": ["terminal_id"],
1769
+ "columnsTo": ["id"],
1770
+ "onDelete": "no action",
1771
+ "onUpdate": "no action"
1772
+ }
1773
+ },
1774
+ "compositePrimaryKeys": {},
1775
+ "uniqueConstraints": {},
1776
+ "checkConstraints": {
1777
+ "services_status": {
1778
+ "name": "services_status",
1779
+ "value": "\"services\".\"status\" IN ('REGISTERING', 'STARTING', 'RUNNING', 'UNKNOWN', 'UNREGISTERED')"
1780
+ },
1781
+ "services_host": {
1782
+ "name": "services_host",
1783
+ "value": "\"services\".\"endpoint_host\" IN ('127.0.0.1', '::1')"
1784
+ },
1785
+ "services_port": {
1786
+ "name": "services_port",
1787
+ "value": "\"services\".\"endpoint_port\" BETWEEN 1 AND 65535"
1788
+ },
1789
+ "services_protocol": {
1790
+ "name": "services_protocol",
1791
+ "value": "\"services\".\"endpoint_protocol\" = 'http'"
1792
+ }
1793
+ }
1794
+ },
1795
+ "sessions": {
1796
+ "name": "sessions",
1797
+ "columns": {
1798
+ "id": {
1799
+ "name": "id",
1800
+ "type": "text",
1801
+ "primaryKey": true,
1802
+ "notNull": true,
1803
+ "autoincrement": false
1804
+ },
1805
+ "project_id": {
1806
+ "name": "project_id",
1807
+ "type": "text",
1808
+ "primaryKey": false,
1809
+ "notNull": false,
1810
+ "autoincrement": false
1811
+ },
1812
+ "workspace_path": {
1813
+ "name": "workspace_path",
1814
+ "type": "text",
1815
+ "primaryKey": false,
1816
+ "notNull": true,
1817
+ "autoincrement": false
1818
+ },
1819
+ "title": {
1820
+ "name": "title",
1821
+ "type": "text",
1822
+ "primaryKey": false,
1823
+ "notNull": true,
1824
+ "autoincrement": false
1825
+ },
1826
+ "status": {
1827
+ "name": "status",
1828
+ "type": "text",
1829
+ "primaryKey": false,
1830
+ "notNull": true,
1831
+ "autoincrement": false,
1832
+ "default": "'active'"
1833
+ },
1834
+ "model_profile_id": {
1835
+ "name": "model_profile_id",
1836
+ "type": "text",
1837
+ "primaryKey": false,
1838
+ "notNull": false,
1839
+ "autoincrement": false
1840
+ },
1841
+ "approval_policy_id": {
1842
+ "name": "approval_policy_id",
1843
+ "type": "text",
1844
+ "primaryKey": false,
1845
+ "notNull": true,
1846
+ "autoincrement": false,
1847
+ "default": "'standard'"
1848
+ },
1849
+ "created_at": {
1850
+ "name": "created_at",
1851
+ "type": "integer",
1852
+ "primaryKey": false,
1853
+ "notNull": true,
1854
+ "autoincrement": false
1855
+ },
1856
+ "updated_at": {
1857
+ "name": "updated_at",
1858
+ "type": "integer",
1859
+ "primaryKey": false,
1860
+ "notNull": true,
1861
+ "autoincrement": false
1862
+ },
1863
+ "last_activity_at": {
1864
+ "name": "last_activity_at",
1865
+ "type": "integer",
1866
+ "primaryKey": false,
1867
+ "notNull": true,
1868
+ "autoincrement": false
1869
+ }
1870
+ },
1871
+ "indexes": {
1872
+ "idx_sessions_project_updated": {
1873
+ "name": "idx_sessions_project_updated",
1874
+ "columns": ["project_id", "updated_at"],
1875
+ "isUnique": false
1876
+ },
1877
+ "idx_sessions_updated": {
1878
+ "name": "idx_sessions_updated",
1879
+ "columns": ["updated_at"],
1880
+ "isUnique": false
1881
+ }
1882
+ },
1883
+ "foreignKeys": {
1884
+ "sessions_project_id_projects_id_fk": {
1885
+ "name": "sessions_project_id_projects_id_fk",
1886
+ "tableFrom": "sessions",
1887
+ "tableTo": "projects",
1888
+ "columnsFrom": ["project_id"],
1889
+ "columnsTo": ["id"],
1890
+ "onDelete": "set null",
1891
+ "onUpdate": "no action"
1892
+ }
1893
+ },
1894
+ "compositePrimaryKeys": {},
1895
+ "uniqueConstraints": {},
1896
+ "checkConstraints": {}
1897
+ },
1898
+ "terminal_leases": {
1899
+ "name": "terminal_leases",
1900
+ "columns": {
1901
+ "terminal_id": {
1902
+ "name": "terminal_id",
1903
+ "type": "text",
1904
+ "primaryKey": true,
1905
+ "notNull": true,
1906
+ "autoincrement": false
1907
+ },
1908
+ "generation": {
1909
+ "name": "generation",
1910
+ "type": "integer",
1911
+ "primaryKey": false,
1912
+ "notNull": true,
1913
+ "autoincrement": false,
1914
+ "default": 0
1915
+ },
1916
+ "owner_type": {
1917
+ "name": "owner_type",
1918
+ "type": "text",
1919
+ "primaryKey": false,
1920
+ "notNull": false,
1921
+ "autoincrement": false
1922
+ },
1923
+ "owner_client_session_id": {
1924
+ "name": "owner_client_session_id",
1925
+ "type": "text",
1926
+ "primaryKey": false,
1927
+ "notNull": false,
1928
+ "autoincrement": false
1929
+ },
1930
+ "owner_connection_id": {
1931
+ "name": "owner_connection_id",
1932
+ "type": "text",
1933
+ "primaryKey": false,
1934
+ "notNull": false,
1935
+ "autoincrement": false
1936
+ },
1937
+ "owner_session_id": {
1938
+ "name": "owner_session_id",
1939
+ "type": "text",
1940
+ "primaryKey": false,
1941
+ "notNull": false,
1942
+ "autoincrement": false
1943
+ },
1944
+ "owner_turn_id": {
1945
+ "name": "owner_turn_id",
1946
+ "type": "text",
1947
+ "primaryKey": false,
1948
+ "notNull": false,
1949
+ "autoincrement": false
1950
+ },
1951
+ "owner_execution_id": {
1952
+ "name": "owner_execution_id",
1953
+ "type": "text",
1954
+ "primaryKey": false,
1955
+ "notNull": false,
1956
+ "autoincrement": false
1957
+ },
1958
+ "expires_at": {
1959
+ "name": "expires_at",
1960
+ "type": "integer",
1961
+ "primaryKey": false,
1962
+ "notNull": true,
1963
+ "autoincrement": false,
1964
+ "default": 0
1965
+ },
1966
+ "heartbeat_at": {
1967
+ "name": "heartbeat_at",
1968
+ "type": "integer",
1969
+ "primaryKey": false,
1970
+ "notNull": true,
1971
+ "autoincrement": false,
1972
+ "default": 0
1973
+ },
1974
+ "input_sequence": {
1975
+ "name": "input_sequence",
1976
+ "type": "integer",
1977
+ "primaryKey": false,
1978
+ "notNull": true,
1979
+ "autoincrement": false,
1980
+ "default": 0
1981
+ }
1982
+ },
1983
+ "indexes": {},
1984
+ "foreignKeys": {
1985
+ "terminal_leases_terminal_id_terminals_id_fk": {
1986
+ "name": "terminal_leases_terminal_id_terminals_id_fk",
1987
+ "tableFrom": "terminal_leases",
1988
+ "tableTo": "terminals",
1989
+ "columnsFrom": ["terminal_id"],
1990
+ "columnsTo": ["id"],
1991
+ "onDelete": "no action",
1992
+ "onUpdate": "no action"
1993
+ }
1994
+ },
1995
+ "compositePrimaryKeys": {},
1996
+ "uniqueConstraints": {},
1997
+ "checkConstraints": {}
1998
+ },
1999
+ "terminals": {
2000
+ "name": "terminals",
2001
+ "columns": {
2002
+ "id": {
2003
+ "name": "id",
2004
+ "type": "text",
2005
+ "primaryKey": true,
2006
+ "notNull": true,
2007
+ "autoincrement": false
2008
+ },
2009
+ "operation_id": {
2010
+ "name": "operation_id",
2011
+ "type": "text",
2012
+ "primaryKey": false,
2013
+ "notNull": true,
2014
+ "autoincrement": false
2015
+ },
2016
+ "project_id": {
2017
+ "name": "project_id",
2018
+ "type": "text",
2019
+ "primaryKey": false,
2020
+ "notNull": false,
2021
+ "autoincrement": false
2022
+ },
2023
+ "workspace_session_id": {
2024
+ "name": "workspace_session_id",
2025
+ "type": "text",
2026
+ "primaryKey": false,
2027
+ "notNull": false,
2028
+ "autoincrement": false
2029
+ },
2030
+ "source_session_id": {
2031
+ "name": "source_session_id",
2032
+ "type": "text",
2033
+ "primaryKey": false,
2034
+ "notNull": false,
2035
+ "autoincrement": false
2036
+ },
2037
+ "cwd": {
2038
+ "name": "cwd",
2039
+ "type": "text",
2040
+ "primaryKey": false,
2041
+ "notNull": true,
2042
+ "autoincrement": false
2043
+ },
2044
+ "shell": {
2045
+ "name": "shell",
2046
+ "type": "text",
2047
+ "primaryKey": false,
2048
+ "notNull": true,
2049
+ "autoincrement": false
2050
+ },
2051
+ "mode": {
2052
+ "name": "mode",
2053
+ "type": "text",
2054
+ "primaryKey": false,
2055
+ "notNull": true,
2056
+ "autoincrement": false
2057
+ },
2058
+ "role": {
2059
+ "name": "role",
2060
+ "type": "text",
2061
+ "primaryKey": false,
2062
+ "notNull": false,
2063
+ "autoincrement": false
2064
+ },
2065
+ "title": {
2066
+ "name": "title",
2067
+ "type": "text",
2068
+ "primaryKey": false,
2069
+ "notNull": false,
2070
+ "autoincrement": false
2071
+ },
2072
+ "launch_params_json": {
2073
+ "name": "launch_params_json",
2074
+ "type": "text",
2075
+ "primaryKey": false,
2076
+ "notNull": false,
2077
+ "autoincrement": false
2078
+ },
2079
+ "launch_params_hash": {
2080
+ "name": "launch_params_hash",
2081
+ "type": "text",
2082
+ "primaryKey": false,
2083
+ "notNull": false,
2084
+ "autoincrement": false
2085
+ },
2086
+ "created_by_turn_id": {
2087
+ "name": "created_by_turn_id",
2088
+ "type": "text",
2089
+ "primaryKey": false,
2090
+ "notNull": false,
2091
+ "autoincrement": false
2092
+ },
2093
+ "status": {
2094
+ "name": "status",
2095
+ "type": "text",
2096
+ "primaryKey": false,
2097
+ "notNull": true,
2098
+ "autoincrement": false
2099
+ },
2100
+ "process_identity_json": {
2101
+ "name": "process_identity_json",
2102
+ "type": "text",
2103
+ "primaryKey": false,
2104
+ "notNull": false,
2105
+ "autoincrement": false
2106
+ },
2107
+ "reason_code": {
2108
+ "name": "reason_code",
2109
+ "type": "text",
2110
+ "primaryKey": false,
2111
+ "notNull": false,
2112
+ "autoincrement": false
2113
+ },
2114
+ "output_cursor": {
2115
+ "name": "output_cursor",
2116
+ "type": "integer",
2117
+ "primaryKey": false,
2118
+ "notNull": true,
2119
+ "autoincrement": false,
2120
+ "default": 0
2121
+ },
2122
+ "created_at": {
2123
+ "name": "created_at",
2124
+ "type": "integer",
2125
+ "primaryKey": false,
2126
+ "notNull": true,
2127
+ "autoincrement": false
2128
+ },
2129
+ "started_at": {
2130
+ "name": "started_at",
2131
+ "type": "integer",
2132
+ "primaryKey": false,
2133
+ "notNull": false,
2134
+ "autoincrement": false
2135
+ },
2136
+ "ended_at": {
2137
+ "name": "ended_at",
2138
+ "type": "integer",
2139
+ "primaryKey": false,
2140
+ "notNull": false,
2141
+ "autoincrement": false
2142
+ },
2143
+ "exit_code": {
2144
+ "name": "exit_code",
2145
+ "type": "integer",
2146
+ "primaryKey": false,
2147
+ "notNull": false,
2148
+ "autoincrement": false
2149
+ }
2150
+ },
2151
+ "indexes": {
2152
+ "terminals_operation": {
2153
+ "name": "terminals_operation",
2154
+ "columns": ["operation_id"],
2155
+ "isUnique": true
2156
+ },
2157
+ "terminals_status": {
2158
+ "name": "terminals_status",
2159
+ "columns": ["status"],
2160
+ "isUnique": false
2161
+ },
2162
+ "terminals_active_role": {
2163
+ "name": "terminals_active_role",
2164
+ "columns": ["project_id", "role"],
2165
+ "isUnique": true,
2166
+ "where": "\"terminals\".\"mode\" = 'dev' AND \"terminals\".\"status\" IN ('CREATED', 'RUNNING', 'STOPPING')"
2167
+ }
2168
+ },
2169
+ "foreignKeys": {
2170
+ "terminals_operation_id_resource_operations_id_fk": {
2171
+ "name": "terminals_operation_id_resource_operations_id_fk",
2172
+ "tableFrom": "terminals",
2173
+ "tableTo": "resource_operations",
2174
+ "columnsFrom": ["operation_id"],
2175
+ "columnsTo": ["id"],
2176
+ "onDelete": "no action",
2177
+ "onUpdate": "no action"
2178
+ }
2179
+ },
2180
+ "compositePrimaryKeys": {},
2181
+ "uniqueConstraints": {},
2182
+ "checkConstraints": {}
2183
+ },
2184
+ "trusted_devices": {
2185
+ "name": "trusted_devices",
2186
+ "columns": {
2187
+ "id": {
2188
+ "name": "id",
2189
+ "type": "text",
2190
+ "primaryKey": true,
2191
+ "notNull": true,
2192
+ "autoincrement": false
2193
+ },
2194
+ "label": {
2195
+ "name": "label",
2196
+ "type": "text",
2197
+ "primaryKey": false,
2198
+ "notNull": true,
2199
+ "autoincrement": false
2200
+ },
2201
+ "created_by_request_id": {
2202
+ "name": "created_by_request_id",
2203
+ "type": "text",
2204
+ "primaryKey": false,
2205
+ "notNull": false,
2206
+ "autoincrement": false
2207
+ },
2208
+ "user_agent": {
2209
+ "name": "user_agent",
2210
+ "type": "text",
2211
+ "primaryKey": false,
2212
+ "notNull": false,
2213
+ "autoincrement": false
2214
+ },
2215
+ "created_at": {
2216
+ "name": "created_at",
2217
+ "type": "integer",
2218
+ "primaryKey": false,
2219
+ "notNull": true,
2220
+ "autoincrement": false
2221
+ },
2222
+ "last_seen_at": {
2223
+ "name": "last_seen_at",
2224
+ "type": "integer",
2225
+ "primaryKey": false,
2226
+ "notNull": false,
2227
+ "autoincrement": false
2228
+ },
2229
+ "revoked_at": {
2230
+ "name": "revoked_at",
2231
+ "type": "integer",
2232
+ "primaryKey": false,
2233
+ "notNull": false,
2234
+ "autoincrement": false
2235
+ }
2236
+ },
2237
+ "indexes": {},
2238
+ "foreignKeys": {
2239
+ "trusted_devices_created_by_request_id_device_requests_id_fk": {
2240
+ "name": "trusted_devices_created_by_request_id_device_requests_id_fk",
2241
+ "tableFrom": "trusted_devices",
2242
+ "tableTo": "device_requests",
2243
+ "columnsFrom": ["created_by_request_id"],
2244
+ "columnsTo": ["id"],
2245
+ "onDelete": "no action",
2246
+ "onUpdate": "no action"
2247
+ }
2248
+ },
2249
+ "compositePrimaryKeys": {},
2250
+ "uniqueConstraints": {},
2251
+ "checkConstraints": {}
2252
+ },
2253
+ "turns": {
2254
+ "name": "turns",
2255
+ "columns": {
2256
+ "id": {
2257
+ "name": "id",
2258
+ "type": "text",
2259
+ "primaryKey": true,
2260
+ "notNull": true,
2261
+ "autoincrement": false
2262
+ },
2263
+ "session_id": {
2264
+ "name": "session_id",
2265
+ "type": "text",
2266
+ "primaryKey": false,
2267
+ "notNull": true,
2268
+ "autoincrement": false
2269
+ },
2270
+ "model_profile_id": {
2271
+ "name": "model_profile_id",
2272
+ "type": "text",
2273
+ "primaryKey": false,
2274
+ "notNull": false,
2275
+ "autoincrement": false
2276
+ },
2277
+ "provider": {
2278
+ "name": "provider",
2279
+ "type": "text",
2280
+ "primaryKey": false,
2281
+ "notNull": false,
2282
+ "autoincrement": false
2283
+ },
2284
+ "model": {
2285
+ "name": "model",
2286
+ "type": "text",
2287
+ "primaryKey": false,
2288
+ "notNull": false,
2289
+ "autoincrement": false
2290
+ },
2291
+ "status": {
2292
+ "name": "status",
2293
+ "type": "text",
2294
+ "primaryKey": false,
2295
+ "notNull": true,
2296
+ "autoincrement": false
2297
+ },
2298
+ "input_json": {
2299
+ "name": "input_json",
2300
+ "type": "text",
2301
+ "primaryKey": false,
2302
+ "notNull": true,
2303
+ "autoincrement": false
2304
+ },
2305
+ "usage_json": {
2306
+ "name": "usage_json",
2307
+ "type": "text",
2308
+ "primaryKey": false,
2309
+ "notNull": false,
2310
+ "autoincrement": false
2311
+ },
2312
+ "error_json": {
2313
+ "name": "error_json",
2314
+ "type": "text",
2315
+ "primaryKey": false,
2316
+ "notNull": false,
2317
+ "autoincrement": false
2318
+ },
2319
+ "idempotency_key": {
2320
+ "name": "idempotency_key",
2321
+ "type": "text",
2322
+ "primaryKey": false,
2323
+ "notNull": false,
2324
+ "autoincrement": false
2325
+ },
2326
+ "created_at": {
2327
+ "name": "created_at",
2328
+ "type": "integer",
2329
+ "primaryKey": false,
2330
+ "notNull": true,
2331
+ "autoincrement": false
2332
+ },
2333
+ "started_at": {
2334
+ "name": "started_at",
2335
+ "type": "integer",
2336
+ "primaryKey": false,
2337
+ "notNull": false,
2338
+ "autoincrement": false
2339
+ },
2340
+ "ended_at": {
2341
+ "name": "ended_at",
2342
+ "type": "integer",
2343
+ "primaryKey": false,
2344
+ "notNull": false,
2345
+ "autoincrement": false
2346
+ }
2347
+ },
2348
+ "indexes": {
2349
+ "turns_session_idempotency_unique": {
2350
+ "name": "turns_session_idempotency_unique",
2351
+ "columns": ["session_id", "idempotency_key"],
2352
+ "isUnique": true
2353
+ },
2354
+ "idx_turns_session_created": {
2355
+ "name": "idx_turns_session_created",
2356
+ "columns": ["session_id", "created_at"],
2357
+ "isUnique": false
2358
+ },
2359
+ "idx_turns_session_status": {
2360
+ "name": "idx_turns_session_status",
2361
+ "columns": ["session_id", "status"],
2362
+ "isUnique": false
2363
+ }
2364
+ },
2365
+ "foreignKeys": {
2366
+ "turns_session_id_sessions_id_fk": {
2367
+ "name": "turns_session_id_sessions_id_fk",
2368
+ "tableFrom": "turns",
2369
+ "tableTo": "sessions",
2370
+ "columnsFrom": ["session_id"],
2371
+ "columnsTo": ["id"],
2372
+ "onDelete": "cascade",
2373
+ "onUpdate": "no action"
2374
+ }
2375
+ },
2376
+ "compositePrimaryKeys": {},
2377
+ "uniqueConstraints": {},
2378
+ "checkConstraints": {}
2379
+ },
2380
+ "webauthn_challenges": {
2381
+ "name": "webauthn_challenges",
2382
+ "columns": {
2383
+ "id": {
2384
+ "name": "id",
2385
+ "type": "text",
2386
+ "primaryKey": true,
2387
+ "notNull": true,
2388
+ "autoincrement": false
2389
+ },
2390
+ "type": {
2391
+ "name": "type",
2392
+ "type": "text",
2393
+ "primaryKey": false,
2394
+ "notNull": true,
2395
+ "autoincrement": false
2396
+ },
2397
+ "challenge": {
2398
+ "name": "challenge",
2399
+ "type": "text",
2400
+ "primaryKey": false,
2401
+ "notNull": true,
2402
+ "autoincrement": false
2403
+ },
2404
+ "request_id": {
2405
+ "name": "request_id",
2406
+ "type": "text",
2407
+ "primaryKey": false,
2408
+ "notNull": false,
2409
+ "autoincrement": false
2410
+ },
2411
+ "device_id": {
2412
+ "name": "device_id",
2413
+ "type": "text",
2414
+ "primaryKey": false,
2415
+ "notNull": false,
2416
+ "autoincrement": false
2417
+ },
2418
+ "created_at": {
2419
+ "name": "created_at",
2420
+ "type": "integer",
2421
+ "primaryKey": false,
2422
+ "notNull": true,
2423
+ "autoincrement": false
2424
+ },
2425
+ "expires_at": {
2426
+ "name": "expires_at",
2427
+ "type": "integer",
2428
+ "primaryKey": false,
2429
+ "notNull": true,
2430
+ "autoincrement": false
2431
+ },
2432
+ "consumed_at": {
2433
+ "name": "consumed_at",
2434
+ "type": "integer",
2435
+ "primaryKey": false,
2436
+ "notNull": false,
2437
+ "autoincrement": false
2438
+ }
2439
+ },
2440
+ "indexes": {
2441
+ "idx_webauthn_challenges_expiry": {
2442
+ "name": "idx_webauthn_challenges_expiry",
2443
+ "columns": ["expires_at"],
2444
+ "isUnique": false
2445
+ }
2446
+ },
2447
+ "foreignKeys": {
2448
+ "webauthn_challenges_request_id_device_requests_id_fk": {
2449
+ "name": "webauthn_challenges_request_id_device_requests_id_fk",
2450
+ "tableFrom": "webauthn_challenges",
2451
+ "tableTo": "device_requests",
2452
+ "columnsFrom": ["request_id"],
2453
+ "columnsTo": ["id"],
2454
+ "onDelete": "no action",
2455
+ "onUpdate": "no action"
2456
+ },
2457
+ "webauthn_challenges_device_id_trusted_devices_id_fk": {
2458
+ "name": "webauthn_challenges_device_id_trusted_devices_id_fk",
2459
+ "tableFrom": "webauthn_challenges",
2460
+ "tableTo": "trusted_devices",
2461
+ "columnsFrom": ["device_id"],
2462
+ "columnsTo": ["id"],
2463
+ "onDelete": "no action",
2464
+ "onUpdate": "no action"
2465
+ }
2466
+ },
2467
+ "compositePrimaryKeys": {},
2468
+ "uniqueConstraints": {},
2469
+ "checkConstraints": {}
2470
+ },
2471
+ "webauthn_credentials": {
2472
+ "name": "webauthn_credentials",
2473
+ "columns": {
2474
+ "id": {
2475
+ "name": "id",
2476
+ "type": "text",
2477
+ "primaryKey": true,
2478
+ "notNull": true,
2479
+ "autoincrement": false
2480
+ },
2481
+ "device_id": {
2482
+ "name": "device_id",
2483
+ "type": "text",
2484
+ "primaryKey": false,
2485
+ "notNull": true,
2486
+ "autoincrement": false
2487
+ },
2488
+ "credential_id": {
2489
+ "name": "credential_id",
2490
+ "type": "text",
2491
+ "primaryKey": false,
2492
+ "notNull": true,
2493
+ "autoincrement": false
2494
+ },
2495
+ "public_key": {
2496
+ "name": "public_key",
2497
+ "type": "text",
2498
+ "primaryKey": false,
2499
+ "notNull": true,
2500
+ "autoincrement": false
2501
+ },
2502
+ "counter": {
2503
+ "name": "counter",
2504
+ "type": "integer",
2505
+ "primaryKey": false,
2506
+ "notNull": true,
2507
+ "autoincrement": false,
2508
+ "default": 0
2509
+ },
2510
+ "transports_json": {
2511
+ "name": "transports_json",
2512
+ "type": "text",
2513
+ "primaryKey": false,
2514
+ "notNull": true,
2515
+ "autoincrement": false,
2516
+ "default": "'[]'"
2517
+ },
2518
+ "aaguid": {
2519
+ "name": "aaguid",
2520
+ "type": "text",
2521
+ "primaryKey": false,
2522
+ "notNull": false,
2523
+ "autoincrement": false
2524
+ },
2525
+ "backup_eligible": {
2526
+ "name": "backup_eligible",
2527
+ "type": "integer",
2528
+ "primaryKey": false,
2529
+ "notNull": true,
2530
+ "autoincrement": false,
2531
+ "default": false
2532
+ },
2533
+ "backup_state": {
2534
+ "name": "backup_state",
2535
+ "type": "integer",
2536
+ "primaryKey": false,
2537
+ "notNull": true,
2538
+ "autoincrement": false,
2539
+ "default": false
2540
+ },
2541
+ "created_at": {
2542
+ "name": "created_at",
2543
+ "type": "integer",
2544
+ "primaryKey": false,
2545
+ "notNull": true,
2546
+ "autoincrement": false
2547
+ },
2548
+ "last_used_at": {
2549
+ "name": "last_used_at",
2550
+ "type": "integer",
2551
+ "primaryKey": false,
2552
+ "notNull": false,
2553
+ "autoincrement": false
2554
+ },
2555
+ "revoked_at": {
2556
+ "name": "revoked_at",
2557
+ "type": "integer",
2558
+ "primaryKey": false,
2559
+ "notNull": false,
2560
+ "autoincrement": false
2561
+ }
2562
+ },
2563
+ "indexes": {
2564
+ "webauthn_credentials_credential_id_unique": {
2565
+ "name": "webauthn_credentials_credential_id_unique",
2566
+ "columns": ["credential_id"],
2567
+ "isUnique": true
2568
+ },
2569
+ "idx_webauthn_credentials_device": {
2570
+ "name": "idx_webauthn_credentials_device",
2571
+ "columns": ["device_id"],
2572
+ "isUnique": false
2573
+ }
2574
+ },
2575
+ "foreignKeys": {
2576
+ "webauthn_credentials_device_id_trusted_devices_id_fk": {
2577
+ "name": "webauthn_credentials_device_id_trusted_devices_id_fk",
2578
+ "tableFrom": "webauthn_credentials",
2579
+ "tableTo": "trusted_devices",
2580
+ "columnsFrom": ["device_id"],
2581
+ "columnsTo": ["id"],
2582
+ "onDelete": "no action",
2583
+ "onUpdate": "no action"
2584
+ }
2585
+ },
2586
+ "compositePrimaryKeys": {},
2587
+ "uniqueConstraints": {},
2588
+ "checkConstraints": {}
2589
+ }
2590
+ },
2591
+ "views": {},
2592
+ "enums": {},
2593
+ "_meta": {
2594
+ "schemas": {},
2595
+ "tables": {},
2596
+ "columns": {}
2597
+ },
2598
+ "internal": {
2599
+ "indexes": {}
2600
+ }
2601
+ }