@bevel-software/platform-core-backend 0.4.1 → 0.5.1

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 (305) hide show
  1. package/THIRD-PARTY-NOTICES.md +6118 -0
  2. package/dist/core/core-ports.d.ts +15 -0
  3. package/dist/core/core-ports.d.ts.map +1 -1
  4. package/dist/core/core-ports.js.map +1 -1
  5. package/dist/core/create-core-server.d.ts.map +1 -1
  6. package/dist/core/create-core-server.js +40 -6
  7. package/dist/core/create-core-server.js.map +1 -1
  8. package/dist/core/create-core-services.d.ts +17 -1
  9. package/dist/core/create-core-services.d.ts.map +1 -1
  10. package/dist/core/create-core-services.js +153 -29
  11. package/dist/core/create-core-services.js.map +1 -1
  12. package/dist/core-config.d.ts +70 -21
  13. package/dist/core-config.d.ts.map +1 -1
  14. package/dist/core-config.js +134 -58
  15. package/dist/core-config.js.map +1 -1
  16. package/dist/modules/access/access-control.interface.d.ts +6 -0
  17. package/dist/modules/access/access-control.interface.d.ts.map +1 -1
  18. package/dist/modules/access/access-control.service.d.ts +74 -5
  19. package/dist/modules/access/access-control.service.d.ts.map +1 -1
  20. package/dist/modules/access/access-control.service.js +116 -15
  21. package/dist/modules/access/access-control.service.js.map +1 -1
  22. package/dist/modules/access/access-declarations.d.ts +93 -0
  23. package/dist/modules/access/access-declarations.d.ts.map +1 -0
  24. package/dist/modules/access/access-declarations.js +168 -0
  25. package/dist/modules/access/access-declarations.js.map +1 -0
  26. package/dist/modules/access/access-mutation.service.js +4 -4
  27. package/dist/modules/access/access-mutation.service.js.map +1 -1
  28. package/dist/modules/access/access-splice.d.ts +16 -1
  29. package/dist/modules/access/access-splice.d.ts.map +1 -1
  30. package/dist/modules/access/access-splice.js +40 -21
  31. package/dist/modules/access/access-splice.js.map +1 -1
  32. package/dist/modules/access/access.routes.d.ts.map +1 -1
  33. package/dist/modules/access/access.routes.js +51 -0
  34. package/dist/modules/access/access.routes.js.map +1 -1
  35. package/dist/modules/access/creator-access.d.ts +8 -0
  36. package/dist/modules/access/creator-access.d.ts.map +1 -1
  37. package/dist/modules/access/creator-access.js +21 -2
  38. package/dist/modules/access/creator-access.js.map +1 -1
  39. package/dist/modules/admin/admin-access.service.d.ts +1 -1
  40. package/dist/modules/admin/admin-access.service.d.ts.map +1 -1
  41. package/dist/modules/admin/admin-access.service.js +3 -2
  42. package/dist/modules/admin/admin-access.service.js.map +1 -1
  43. package/dist/modules/auth/auth.routes.d.ts.map +1 -1
  44. package/dist/modules/auth/auth.routes.js +50 -1
  45. package/dist/modules/auth/auth.routes.js.map +1 -1
  46. package/dist/modules/auth/auth.service.d.ts +39 -10
  47. package/dist/modules/auth/auth.service.d.ts.map +1 -1
  48. package/dist/modules/auth/auth.service.js +38 -16
  49. package/dist/modules/auth/auth.service.js.map +1 -1
  50. package/dist/modules/database/core-schema.d.ts +124 -0
  51. package/dist/modules/database/core-schema.d.ts.map +1 -1
  52. package/dist/modules/database/core-schema.js +45 -0
  53. package/dist/modules/database/core-schema.js.map +1 -1
  54. package/dist/modules/groups/group-provision.service.d.ts +130 -0
  55. package/dist/modules/groups/group-provision.service.d.ts.map +1 -0
  56. package/dist/modules/groups/group-provision.service.js +288 -0
  57. package/dist/modules/groups/group-provision.service.js.map +1 -0
  58. package/dist/modules/groups/groups.contract.d.ts +106 -0
  59. package/dist/modules/groups/groups.contract.d.ts.map +1 -0
  60. package/dist/modules/groups/groups.contract.js +36 -0
  61. package/dist/modules/groups/groups.contract.js.map +1 -0
  62. package/dist/modules/groups/groups.routes.d.ts +42 -0
  63. package/dist/modules/groups/groups.routes.d.ts.map +1 -0
  64. package/dist/modules/groups/groups.routes.js +379 -0
  65. package/dist/modules/groups/groups.routes.js.map +1 -0
  66. package/dist/modules/groups/groups.service.d.ts +60 -0
  67. package/dist/modules/groups/groups.service.d.ts.map +1 -0
  68. package/dist/modules/groups/groups.service.js +172 -0
  69. package/dist/modules/groups/groups.service.js.map +1 -0
  70. package/dist/modules/groups/index.d.ts +7 -0
  71. package/dist/modules/groups/index.d.ts.map +1 -0
  72. package/dist/modules/groups/index.js +6 -0
  73. package/dist/modules/groups/index.js.map +1 -0
  74. package/dist/modules/groups/join-proposals.d.ts +53 -0
  75. package/dist/modules/groups/join-proposals.d.ts.map +1 -0
  76. package/dist/modules/groups/join-proposals.js +67 -0
  77. package/dist/modules/groups/join-proposals.js.map +1 -0
  78. package/dist/modules/groups/join-requests.service.d.ts +81 -0
  79. package/dist/modules/groups/join-requests.service.d.ts.map +1 -0
  80. package/dist/modules/groups/join-requests.service.js +135 -0
  81. package/dist/modules/groups/join-requests.service.js.map +1 -0
  82. package/dist/modules/secrets-vault/secrets-vault.routes.d.ts +20 -0
  83. package/dist/modules/secrets-vault/secrets-vault.routes.d.ts.map +1 -1
  84. package/dist/modules/secrets-vault/secrets-vault.routes.js +59 -11
  85. package/dist/modules/secrets-vault/secrets-vault.routes.js.map +1 -1
  86. package/dist/modules/settings/deployment-settings.service.d.ts +129 -0
  87. package/dist/modules/settings/deployment-settings.service.d.ts.map +1 -0
  88. package/dist/modules/settings/deployment-settings.service.js +368 -0
  89. package/dist/modules/settings/deployment-settings.service.js.map +1 -0
  90. package/dist/modules/settings/setup.routes.d.ts +49 -0
  91. package/dist/modules/settings/setup.routes.d.ts.map +1 -0
  92. package/dist/modules/settings/setup.routes.js +292 -0
  93. package/dist/modules/settings/setup.routes.js.map +1 -0
  94. package/dist/modules/skills/index.d.ts +2 -1
  95. package/dist/modules/skills/index.d.ts.map +1 -1
  96. package/dist/modules/skills/index.js +1 -0
  97. package/dist/modules/skills/index.js.map +1 -1
  98. package/dist/modules/skills/pending-skills.service.d.ts +40 -0
  99. package/dist/modules/skills/pending-skills.service.d.ts.map +1 -0
  100. package/dist/modules/skills/pending-skills.service.js +147 -0
  101. package/dist/modules/skills/pending-skills.service.js.map +1 -0
  102. package/dist/modules/skills/skills.contract.d.ts +32 -3
  103. package/dist/modules/skills/skills.contract.d.ts.map +1 -1
  104. package/dist/modules/skills/skills.contract.js +1 -1
  105. package/dist/modules/skills/skills.routes.d.ts +3 -2
  106. package/dist/modules/skills/skills.routes.d.ts.map +1 -1
  107. package/dist/modules/skills/skills.routes.js +18 -1
  108. package/dist/modules/skills/skills.routes.js.map +1 -1
  109. package/dist/modules/skills/skills.service.d.ts +22 -0
  110. package/dist/modules/skills/skills.service.d.ts.map +1 -1
  111. package/dist/modules/skills/skills.service.js +24 -12
  112. package/dist/modules/skills/skills.service.js.map +1 -1
  113. package/dist/modules/tool-manuals/index.d.ts +1 -1
  114. package/dist/modules/tool-manuals/index.d.ts.map +1 -1
  115. package/dist/modules/tool-manuals/index.js.map +1 -1
  116. package/dist/modules/tool-manuals/tool-manuals.contract.d.ts +47 -2
  117. package/dist/modules/tool-manuals/tool-manuals.contract.d.ts.map +1 -1
  118. package/dist/modules/tool-manuals/tool-manuals.contract.js +1 -1
  119. package/dist/modules/tool-manuals/tool-manuals.routes.d.ts +4 -0
  120. package/dist/modules/tool-manuals/tool-manuals.routes.d.ts.map +1 -1
  121. package/dist/modules/tool-manuals/tool-manuals.routes.js +23 -0
  122. package/dist/modules/tool-manuals/tool-manuals.routes.js.map +1 -1
  123. package/dist/modules/tool-manuals/tool-manuals.service.d.ts +3 -1
  124. package/dist/modules/tool-manuals/tool-manuals.service.d.ts.map +1 -1
  125. package/dist/modules/tool-manuals/tool-manuals.service.js +84 -17
  126. package/dist/modules/tool-manuals/tool-manuals.service.js.map +1 -1
  127. package/dist/modules/tool-manuals/tool-manuals.tools.d.ts.map +1 -1
  128. package/dist/modules/tool-manuals/tool-manuals.tools.js +6 -2
  129. package/dist/modules/tool-manuals/tool-manuals.tools.js.map +1 -1
  130. package/dist/modules/workflow/agent-tools/workflow.tools.d.ts.map +1 -1
  131. package/dist/modules/workflow/agent-tools/workflow.tools.js +4 -2
  132. package/dist/modules/workflow/agent-tools/workflow.tools.js.map +1 -1
  133. package/dist/modules/workflow/event-bus.d.ts +11 -0
  134. package/dist/modules/workflow/event-bus.d.ts.map +1 -1
  135. package/dist/modules/workflow/event-bus.js +22 -0
  136. package/dist/modules/workflow/event-bus.js.map +1 -1
  137. package/dist/modules/workflow/file-lock.service.d.ts +9 -0
  138. package/dist/modules/workflow/file-lock.service.d.ts.map +1 -1
  139. package/dist/modules/workflow/file-lock.service.js +16 -0
  140. package/dist/modules/workflow/file-lock.service.js.map +1 -1
  141. package/dist/modules/workflow/git/branch-name.d.ts +1 -1
  142. package/dist/modules/workflow/git/branch-name.d.ts.map +1 -1
  143. package/dist/modules/workflow/git/branch-name.js +1 -1
  144. package/dist/modules/workflow/git/branch-name.js.map +1 -1
  145. package/dist/modules/workflow/git/git.service.d.ts +31 -2
  146. package/dist/modules/workflow/git/git.service.d.ts.map +1 -1
  147. package/dist/modules/workflow/git/git.service.js +144 -52
  148. package/dist/modules/workflow/git/git.service.js.map +1 -1
  149. package/dist/modules/workflow/git/pull-request.service.d.ts +12 -6
  150. package/dist/modules/workflow/git/pull-request.service.d.ts.map +1 -1
  151. package/dist/modules/workflow/git/pull-request.service.js +19 -9
  152. package/dist/modules/workflow/git/pull-request.service.js.map +1 -1
  153. package/dist/modules/workflow/review-workflow/review-workflow.service.d.ts.map +1 -1
  154. package/dist/modules/workflow/review-workflow/review-workflow.service.js +12 -3
  155. package/dist/modules/workflow/review-workflow/review-workflow.service.js.map +1 -1
  156. package/dist/modules/workflow/workflow.routes.d.ts.map +1 -1
  157. package/dist/modules/workflow/workflow.routes.js +95 -14
  158. package/dist/modules/workflow/workflow.routes.js.map +1 -1
  159. package/dist/modules/workflow/workflow.service.d.ts +92 -3
  160. package/dist/modules/workflow/workflow.service.d.ts.map +1 -1
  161. package/dist/modules/workflow/workflow.service.js +381 -108
  162. package/dist/modules/workflow/workflow.service.js.map +1 -1
  163. package/dist/modules/workspace/bevel-ignore.d.ts +5 -0
  164. package/dist/modules/workspace/bevel-ignore.d.ts.map +1 -1
  165. package/dist/modules/workspace/bevel-ignore.js +5 -1
  166. package/dist/modules/workspace/bevel-ignore.js.map +1 -1
  167. package/dist/modules/workspace/kb-seed.interface.d.ts +1 -1
  168. package/dist/modules/workspace/kb-seed.service.d.ts +60 -5
  169. package/dist/modules/workspace/kb-seed.service.d.ts.map +1 -1
  170. package/dist/modules/workspace/kb-seed.service.js +228 -51
  171. package/dist/modules/workspace/kb-seed.service.js.map +1 -1
  172. package/dist/modules/workspace/workspace.routes.d.ts +2 -1
  173. package/dist/modules/workspace/workspace.routes.d.ts.map +1 -1
  174. package/dist/modules/workspace/workspace.routes.js +51 -18
  175. package/dist/modules/workspace/workspace.routes.js.map +1 -1
  176. package/dist/modules/workspace/workspace.service.d.ts +16 -4
  177. package/dist/modules/workspace/workspace.service.d.ts.map +1 -1
  178. package/dist/modules/workspace/workspace.service.js +36 -9
  179. package/dist/modules/workspace/workspace.service.js.map +1 -1
  180. package/dist/modules/workspace/workspace.tools.d.ts.map +1 -1
  181. package/dist/modules/workspace/workspace.tools.js +8 -3
  182. package/dist/modules/workspace/workspace.tools.js.map +1 -1
  183. package/dist/shared/kb-layout.test.js +2 -2
  184. package/dist/test-setup.d.ts +2 -0
  185. package/dist/test-setup.d.ts.map +1 -0
  186. package/dist/test-setup.js +18 -0
  187. package/dist/test-setup.js.map +1 -0
  188. package/kb-template/.bevelignore +6 -2
  189. package/kb-template/AGENTS.md +272 -0
  190. package/kb-template/KnowledgeBase/How to get started.md +65 -0
  191. package/kb-template/access.md +36 -36
  192. package/migrations/0002_user_onboarding_done.sql +1 -0
  193. package/migrations/0003_deployment_settings.sql +9 -0
  194. package/migrations/meta/0001_snapshot.json +1486 -0
  195. package/migrations/meta/0002_snapshot.json +1493 -0
  196. package/migrations/meta/0003_snapshot.json +1552 -0
  197. package/migrations/meta/_journal.json +15 -1
  198. package/package.json +5 -4
  199. package/src/__tests__/branch-model.test.ts +79 -0
  200. package/src/__tests__/core-config.admin.test.ts +114 -0
  201. package/src/__tests__/database-url.test.ts +70 -0
  202. package/src/core/core-ports.ts +15 -0
  203. package/src/core/create-core-server.ts +55 -6
  204. package/src/core/create-core-services.ts +201 -36
  205. package/src/core-config.ts +139 -59
  206. package/src/modules/access/__tests__/access-declarations.test.ts +195 -0
  207. package/src/modules/access/__tests__/access-md-format.test.ts +191 -0
  208. package/src/modules/access/__tests__/access-splice.test.ts +21 -0
  209. package/src/modules/access/__tests__/access.routes.overrides.test.ts +214 -0
  210. package/src/modules/access/access-control.interface.ts +11 -0
  211. package/src/modules/access/access-control.service.ts +113 -15
  212. package/src/modules/access/access-declarations.ts +251 -0
  213. package/src/modules/access/access-mutation.service.ts +4 -4
  214. package/src/modules/access/access-splice.ts +64 -21
  215. package/src/modules/access/access.routes.ts +61 -0
  216. package/src/modules/access/creator-access.ts +22 -2
  217. package/src/modules/admin/admin-access.service.ts +4 -3
  218. package/src/modules/auth/__tests__/auth.service.test.ts +57 -0
  219. package/src/modules/auth/__tests__/onboarding-done.route.test.ts +147 -0
  220. package/src/modules/auth/auth.routes.ts +50 -1
  221. package/src/modules/auth/auth.service.ts +55 -17
  222. package/src/modules/database/core-schema.ts +46 -0
  223. package/src/modules/groups/__tests__/group-index.service.test.ts +225 -0
  224. package/src/modules/groups/__tests__/group-provision.service.test.ts +247 -0
  225. package/src/modules/groups/__tests__/groups.routes.test.ts +493 -0
  226. package/src/modules/groups/__tests__/join-proposals.test.ts +101 -0
  227. package/src/modules/groups/__tests__/join-requests.service.test.ts +175 -0
  228. package/src/modules/groups/group-provision.service.ts +328 -0
  229. package/src/modules/groups/groups.contract.ts +107 -0
  230. package/src/modules/groups/groups.routes.ts +433 -0
  231. package/src/modules/groups/groups.service.ts +193 -0
  232. package/src/modules/groups/index.ts +17 -0
  233. package/src/modules/groups/join-proposals.ts +114 -0
  234. package/src/modules/groups/join-requests.service.ts +185 -0
  235. package/src/modules/secrets-vault/__tests__/oauth-return-to.route.test.ts +283 -0
  236. package/src/modules/secrets-vault/secrets-vault.routes.ts +68 -12
  237. package/src/modules/settings/__tests__/deployment-settings.service.test.ts +256 -0
  238. package/src/modules/settings/__tests__/setup.routes.test.ts +201 -0
  239. package/src/modules/settings/deployment-settings.service.ts +419 -0
  240. package/src/modules/settings/setup.routes.ts +317 -0
  241. package/src/modules/skills/__tests__/pending-skills.service.test.ts +240 -0
  242. package/src/modules/skills/__tests__/skills.service.test.ts +13 -13
  243. package/src/modules/skills/index.ts +3 -0
  244. package/src/modules/skills/pending-skills.service.ts +168 -0
  245. package/src/modules/skills/skills.contract.ts +34 -3
  246. package/src/modules/skills/skills.routes.ts +23 -2
  247. package/src/modules/skills/skills.service.ts +24 -16
  248. package/src/modules/tool-manuals/__tests__/tool-manuals.detail.route.test.ts +262 -0
  249. package/src/modules/tool-manuals/__tests__/tool-manuals.mcp-oauth.test.ts +2 -2
  250. package/src/modules/tool-manuals/__tests__/tool-manuals.service.test.ts +61 -23
  251. package/src/modules/tool-manuals/__tests__/tool-manuals.tools.test.ts +156 -156
  252. package/src/modules/tool-manuals/index.ts +2 -0
  253. package/src/modules/tool-manuals/tool-manuals.contract.ts +50 -2
  254. package/src/modules/tool-manuals/tool-manuals.routes.ts +21 -0
  255. package/src/modules/tool-manuals/tool-manuals.service.ts +86 -17
  256. package/src/modules/tool-manuals/tool-manuals.tools.ts +206 -202
  257. package/src/modules/workflow/__tests__/event-bus.test.ts +35 -0
  258. package/src/modules/workflow/__tests__/workflow.service.facade.test.ts +251 -5
  259. package/src/modules/workflow/agent-tools/workflow.tools.ts +4 -2
  260. package/src/modules/workflow/event-bus.ts +25 -0
  261. package/src/modules/workflow/file-lock.service.ts +17 -0
  262. package/src/modules/workflow/git/__tests__/git.service.accessGating.test.ts +9 -49
  263. package/src/modules/workflow/git/__tests__/git.service.changedFilesForPr.test.ts +101 -0
  264. package/src/modules/workflow/git/__tests__/git.service.commitFile.test.ts +219 -211
  265. package/src/modules/workflow/git/__tests__/git.service.fileContentsAtCommit.test.ts +132 -0
  266. package/src/modules/workflow/git/__tests__/git.service.logForFile.test.ts +4 -2
  267. package/src/modules/workflow/git/__tests__/git.service.postMergePull.test.ts +275 -272
  268. package/src/modules/workflow/git/__tests__/git.service.pull.test.ts +5 -0
  269. package/src/modules/workflow/git/__tests__/pull-request.service.viewer-can-cancel.test.ts +44 -0
  270. package/src/modules/workflow/git/branch-name.ts +5 -1
  271. package/src/modules/workflow/git/git.service.ts +159 -62
  272. package/src/modules/workflow/git/pull-request.service.ts +22 -11
  273. package/src/modules/workflow/review-workflow/__tests__/cancel-pr.test.ts +4 -1
  274. package/src/modules/workflow/review-workflow/review-workflow.service.ts +12 -3
  275. package/src/modules/workflow/workflow.routes.ts +91 -13
  276. package/src/modules/workflow/workflow.service.ts +353 -13
  277. package/src/modules/workspace/__tests__/kb-seed.service.test.ts +255 -24
  278. package/src/modules/workspace/__tests__/workspace.routes.create-grant.test.ts +236 -233
  279. package/src/modules/workspace/__tests__/workspace.routes.delete.test.ts +179 -176
  280. package/src/modules/workspace/__tests__/workspace.routes.download.test.ts +320 -303
  281. package/src/modules/workspace/__tests__/workspace.routes.read-gate.test.ts +337 -276
  282. package/src/modules/workspace/__tests__/workspace.tools.test.ts +14 -6
  283. package/src/modules/workspace/bevel-ignore.ts +66 -62
  284. package/src/modules/workspace/kb-seed.interface.ts +1 -1
  285. package/src/modules/workspace/kb-seed.service.ts +247 -53
  286. package/src/modules/workspace/workspace.routes.ts +54 -18
  287. package/src/modules/workspace/workspace.service.ts +45 -7
  288. package/src/modules/workspace/workspace.tools.ts +922 -917
  289. package/src/shared/__tests__/frontmatter-id.test.ts +53 -0
  290. package/src/shared/__tests__/join-request.test.ts +96 -0
  291. package/src/shared/__tests__/kb-layout.group.test.ts +45 -0
  292. package/src/shared/kb-layout.test.ts +2 -2
  293. package/src/test-setup.ts +18 -0
  294. package/kb-template/Agents/README.md +0 -38
  295. package/kb-template/CLAUDE.md +0 -419
  296. package/kb-template/Data/.gitkeep +0 -0
  297. package/kb-template/Data/README.md +0 -39
  298. package/kb-template/KnowledgeBase/README.md +0 -37
  299. package/kb-template/Pipelines/.gitkeep +0 -0
  300. package/kb-template/Pipelines/README.md +0 -38
  301. package/kb-template/Skills/.gitkeep +0 -0
  302. package/kb-template/Skills/README.md +0 -32
  303. package/kb-template/Tools/.gitkeep +0 -0
  304. package/kb-template/Tools/README.md +0 -42
  305. /package/kb-template/{Agents → Groups}/.gitkeep +0 -0
@@ -0,0 +1,1493 @@
1
+ {
2
+ "id": "2fb788d3-6f7c-4590-938c-ca431b36e5e3",
3
+ "prevId": "b7c1d5e2-3a48-4f16-9c02-8d5e4a1f7b93",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.change_requests": {
8
+ "name": "change_requests",
9
+ "schema": "",
10
+ "columns": {
11
+ "id": {
12
+ "name": "id",
13
+ "type": "uuid",
14
+ "primaryKey": true,
15
+ "notNull": true,
16
+ "default": "gen_random_uuid()"
17
+ },
18
+ "number": {
19
+ "name": "number",
20
+ "type": "integer",
21
+ "primaryKey": false,
22
+ "notNull": true,
23
+ "identity": {
24
+ "type": "always",
25
+ "name": "change_requests_number_seq",
26
+ "schema": "public",
27
+ "increment": "1",
28
+ "startWith": "1",
29
+ "minValue": "1",
30
+ "maxValue": "2147483647",
31
+ "cache": "1",
32
+ "cycle": false
33
+ }
34
+ },
35
+ "source_branch": {
36
+ "name": "source_branch",
37
+ "type": "text",
38
+ "primaryKey": false,
39
+ "notNull": true
40
+ },
41
+ "target_branch": {
42
+ "name": "target_branch",
43
+ "type": "text",
44
+ "primaryKey": false,
45
+ "notNull": true
46
+ },
47
+ "title": {
48
+ "name": "title",
49
+ "type": "text",
50
+ "primaryKey": false,
51
+ "notNull": true
52
+ },
53
+ "body": {
54
+ "name": "body",
55
+ "type": "text",
56
+ "primaryKey": false,
57
+ "notNull": true,
58
+ "default": "''"
59
+ },
60
+ "author_email": {
61
+ "name": "author_email",
62
+ "type": "text",
63
+ "primaryKey": false,
64
+ "notNull": true
65
+ },
66
+ "author_name": {
67
+ "name": "author_name",
68
+ "type": "text",
69
+ "primaryKey": false,
70
+ "notNull": true
71
+ },
72
+ "state": {
73
+ "name": "state",
74
+ "type": "text",
75
+ "primaryKey": false,
76
+ "notNull": true,
77
+ "default": "'open'"
78
+ },
79
+ "merged_sha": {
80
+ "name": "merged_sha",
81
+ "type": "text",
82
+ "primaryKey": false,
83
+ "notNull": false
84
+ },
85
+ "created_at": {
86
+ "name": "created_at",
87
+ "type": "timestamp",
88
+ "primaryKey": false,
89
+ "notNull": true,
90
+ "default": "now()"
91
+ },
92
+ "updated_at": {
93
+ "name": "updated_at",
94
+ "type": "timestamp",
95
+ "primaryKey": false,
96
+ "notNull": false
97
+ },
98
+ "closed_at": {
99
+ "name": "closed_at",
100
+ "type": "timestamp",
101
+ "primaryKey": false,
102
+ "notNull": false
103
+ }
104
+ },
105
+ "indexes": {
106
+ "change_requests_number_unq": {
107
+ "name": "change_requests_number_unq",
108
+ "columns": [
109
+ {
110
+ "expression": "number",
111
+ "isExpression": false,
112
+ "asc": true,
113
+ "nulls": "last"
114
+ }
115
+ ],
116
+ "isUnique": true,
117
+ "concurrently": false,
118
+ "method": "btree",
119
+ "with": {}
120
+ },
121
+ "change_requests_open_pair_unq": {
122
+ "name": "change_requests_open_pair_unq",
123
+ "columns": [
124
+ {
125
+ "expression": "source_branch",
126
+ "isExpression": false,
127
+ "asc": true,
128
+ "nulls": "last"
129
+ },
130
+ {
131
+ "expression": "target_branch",
132
+ "isExpression": false,
133
+ "asc": true,
134
+ "nulls": "last"
135
+ }
136
+ ],
137
+ "isUnique": true,
138
+ "where": "\"change_requests\".\"state\" = 'open'",
139
+ "concurrently": false,
140
+ "method": "btree",
141
+ "with": {}
142
+ },
143
+ "change_requests_by_state": {
144
+ "name": "change_requests_by_state",
145
+ "columns": [
146
+ {
147
+ "expression": "state",
148
+ "isExpression": false,
149
+ "asc": true,
150
+ "nulls": "last"
151
+ }
152
+ ],
153
+ "isUnique": false,
154
+ "concurrently": false,
155
+ "method": "btree",
156
+ "with": {}
157
+ }
158
+ },
159
+ "foreignKeys": {},
160
+ "compositePrimaryKeys": {},
161
+ "uniqueConstraints": {},
162
+ "policies": {},
163
+ "checkConstraints": {
164
+ "change_requests_state_check": {
165
+ "name": "change_requests_state_check",
166
+ "value": "\"change_requests\".\"state\" IN ('open', 'merged', 'closed')"
167
+ }
168
+ },
169
+ "isRLSEnabled": false
170
+ },
171
+ "public.api_tokens": {
172
+ "name": "api_tokens",
173
+ "schema": "",
174
+ "columns": {
175
+ "id": {
176
+ "name": "id",
177
+ "type": "uuid",
178
+ "primaryKey": true,
179
+ "notNull": true,
180
+ "default": "gen_random_uuid()"
181
+ },
182
+ "user_id": {
183
+ "name": "user_id",
184
+ "type": "uuid",
185
+ "primaryKey": false,
186
+ "notNull": true
187
+ },
188
+ "token_hash": {
189
+ "name": "token_hash",
190
+ "type": "text",
191
+ "primaryKey": false,
192
+ "notNull": true
193
+ },
194
+ "label": {
195
+ "name": "label",
196
+ "type": "text",
197
+ "primaryKey": false,
198
+ "notNull": true
199
+ },
200
+ "created_at": {
201
+ "name": "created_at",
202
+ "type": "timestamp",
203
+ "primaryKey": false,
204
+ "notNull": true,
205
+ "default": "now()"
206
+ },
207
+ "last_used_at": {
208
+ "name": "last_used_at",
209
+ "type": "timestamp",
210
+ "primaryKey": false,
211
+ "notNull": false
212
+ },
213
+ "revoked_at": {
214
+ "name": "revoked_at",
215
+ "type": "timestamp",
216
+ "primaryKey": false,
217
+ "notNull": false
218
+ }
219
+ },
220
+ "indexes": {
221
+ "api_tokens_by_user": {
222
+ "name": "api_tokens_by_user",
223
+ "columns": [
224
+ {
225
+ "expression": "user_id",
226
+ "isExpression": false,
227
+ "asc": true,
228
+ "nulls": "last"
229
+ }
230
+ ],
231
+ "isUnique": false,
232
+ "concurrently": false,
233
+ "method": "btree",
234
+ "with": {}
235
+ }
236
+ },
237
+ "foreignKeys": {
238
+ "api_tokens_user_id_users_id_fk": {
239
+ "name": "api_tokens_user_id_users_id_fk",
240
+ "tableFrom": "api_tokens",
241
+ "tableTo": "users",
242
+ "columnsFrom": [
243
+ "user_id"
244
+ ],
245
+ "columnsTo": [
246
+ "id"
247
+ ],
248
+ "onDelete": "no action",
249
+ "onUpdate": "no action"
250
+ }
251
+ },
252
+ "compositePrimaryKeys": {},
253
+ "uniqueConstraints": {
254
+ "api_tokens_token_hash_unique": {
255
+ "name": "api_tokens_token_hash_unique",
256
+ "nullsNotDistinct": false,
257
+ "columns": [
258
+ "token_hash"
259
+ ]
260
+ }
261
+ },
262
+ "policies": {},
263
+ "checkConstraints": {},
264
+ "isRLSEnabled": false
265
+ },
266
+ "public.file_locks": {
267
+ "name": "file_locks",
268
+ "schema": "",
269
+ "columns": {
270
+ "workspace_id": {
271
+ "name": "workspace_id",
272
+ "type": "text",
273
+ "primaryKey": false,
274
+ "notNull": true
275
+ },
276
+ "branch": {
277
+ "name": "branch",
278
+ "type": "text",
279
+ "primaryKey": false,
280
+ "notNull": true
281
+ },
282
+ "path": {
283
+ "name": "path",
284
+ "type": "text",
285
+ "primaryKey": false,
286
+ "notNull": true
287
+ },
288
+ "holder_user_id": {
289
+ "name": "holder_user_id",
290
+ "type": "uuid",
291
+ "primaryKey": false,
292
+ "notNull": true
293
+ },
294
+ "holder_name": {
295
+ "name": "holder_name",
296
+ "type": "text",
297
+ "primaryKey": false,
298
+ "notNull": true
299
+ },
300
+ "acquired_at": {
301
+ "name": "acquired_at",
302
+ "type": "timestamp",
303
+ "primaryKey": false,
304
+ "notNull": true,
305
+ "default": "now()"
306
+ },
307
+ "last_heartbeat_at": {
308
+ "name": "last_heartbeat_at",
309
+ "type": "timestamp",
310
+ "primaryKey": false,
311
+ "notNull": true,
312
+ "default": "now()"
313
+ },
314
+ "expires_at": {
315
+ "name": "expires_at",
316
+ "type": "timestamp",
317
+ "primaryKey": false,
318
+ "notNull": true
319
+ }
320
+ },
321
+ "indexes": {
322
+ "file_locks_by_expiry": {
323
+ "name": "file_locks_by_expiry",
324
+ "columns": [
325
+ {
326
+ "expression": "expires_at",
327
+ "isExpression": false,
328
+ "asc": true,
329
+ "nulls": "last"
330
+ }
331
+ ],
332
+ "isUnique": false,
333
+ "concurrently": false,
334
+ "method": "btree",
335
+ "with": {}
336
+ },
337
+ "file_locks_by_holder": {
338
+ "name": "file_locks_by_holder",
339
+ "columns": [
340
+ {
341
+ "expression": "holder_user_id",
342
+ "isExpression": false,
343
+ "asc": true,
344
+ "nulls": "last"
345
+ }
346
+ ],
347
+ "isUnique": false,
348
+ "concurrently": false,
349
+ "method": "btree",
350
+ "with": {}
351
+ }
352
+ },
353
+ "foreignKeys": {
354
+ "file_locks_holder_user_id_users_id_fk": {
355
+ "name": "file_locks_holder_user_id_users_id_fk",
356
+ "tableFrom": "file_locks",
357
+ "tableTo": "users",
358
+ "columnsFrom": [
359
+ "holder_user_id"
360
+ ],
361
+ "columnsTo": [
362
+ "id"
363
+ ],
364
+ "onDelete": "no action",
365
+ "onUpdate": "no action"
366
+ }
367
+ },
368
+ "compositePrimaryKeys": {
369
+ "file_locks_workspace_id_branch_path_pk": {
370
+ "name": "file_locks_workspace_id_branch_path_pk",
371
+ "columns": [
372
+ "workspace_id",
373
+ "branch",
374
+ "path"
375
+ ]
376
+ }
377
+ },
378
+ "uniqueConstraints": {},
379
+ "policies": {},
380
+ "checkConstraints": {},
381
+ "isRLSEnabled": false
382
+ },
383
+ "public.oauth_auth_codes": {
384
+ "name": "oauth_auth_codes",
385
+ "schema": "",
386
+ "columns": {
387
+ "id": {
388
+ "name": "id",
389
+ "type": "uuid",
390
+ "primaryKey": true,
391
+ "notNull": true,
392
+ "default": "gen_random_uuid()"
393
+ },
394
+ "code_hash": {
395
+ "name": "code_hash",
396
+ "type": "text",
397
+ "primaryKey": false,
398
+ "notNull": true
399
+ },
400
+ "client_id": {
401
+ "name": "client_id",
402
+ "type": "text",
403
+ "primaryKey": false,
404
+ "notNull": true
405
+ },
406
+ "user_id": {
407
+ "name": "user_id",
408
+ "type": "uuid",
409
+ "primaryKey": false,
410
+ "notNull": true
411
+ },
412
+ "redirect_uri": {
413
+ "name": "redirect_uri",
414
+ "type": "text",
415
+ "primaryKey": false,
416
+ "notNull": true
417
+ },
418
+ "code_challenge": {
419
+ "name": "code_challenge",
420
+ "type": "text",
421
+ "primaryKey": false,
422
+ "notNull": true
423
+ },
424
+ "scope": {
425
+ "name": "scope",
426
+ "type": "text",
427
+ "primaryKey": false,
428
+ "notNull": false
429
+ },
430
+ "resource": {
431
+ "name": "resource",
432
+ "type": "text",
433
+ "primaryKey": false,
434
+ "notNull": false
435
+ },
436
+ "expires_at": {
437
+ "name": "expires_at",
438
+ "type": "timestamp",
439
+ "primaryKey": false,
440
+ "notNull": true
441
+ },
442
+ "consumed_at": {
443
+ "name": "consumed_at",
444
+ "type": "timestamp",
445
+ "primaryKey": false,
446
+ "notNull": false
447
+ },
448
+ "created_at": {
449
+ "name": "created_at",
450
+ "type": "timestamp",
451
+ "primaryKey": false,
452
+ "notNull": true,
453
+ "default": "now()"
454
+ }
455
+ },
456
+ "indexes": {
457
+ "oauth_auth_codes_by_expiry": {
458
+ "name": "oauth_auth_codes_by_expiry",
459
+ "columns": [
460
+ {
461
+ "expression": "expires_at",
462
+ "isExpression": false,
463
+ "asc": true,
464
+ "nulls": "last"
465
+ }
466
+ ],
467
+ "isUnique": false,
468
+ "concurrently": false,
469
+ "method": "btree",
470
+ "with": {}
471
+ }
472
+ },
473
+ "foreignKeys": {
474
+ "oauth_auth_codes_client_id_oauth_clients_client_id_fk": {
475
+ "name": "oauth_auth_codes_client_id_oauth_clients_client_id_fk",
476
+ "tableFrom": "oauth_auth_codes",
477
+ "tableTo": "oauth_clients",
478
+ "columnsFrom": [
479
+ "client_id"
480
+ ],
481
+ "columnsTo": [
482
+ "client_id"
483
+ ],
484
+ "onDelete": "no action",
485
+ "onUpdate": "no action"
486
+ },
487
+ "oauth_auth_codes_user_id_users_id_fk": {
488
+ "name": "oauth_auth_codes_user_id_users_id_fk",
489
+ "tableFrom": "oauth_auth_codes",
490
+ "tableTo": "users",
491
+ "columnsFrom": [
492
+ "user_id"
493
+ ],
494
+ "columnsTo": [
495
+ "id"
496
+ ],
497
+ "onDelete": "no action",
498
+ "onUpdate": "no action"
499
+ }
500
+ },
501
+ "compositePrimaryKeys": {},
502
+ "uniqueConstraints": {
503
+ "oauth_auth_codes_code_hash_unique": {
504
+ "name": "oauth_auth_codes_code_hash_unique",
505
+ "nullsNotDistinct": false,
506
+ "columns": [
507
+ "code_hash"
508
+ ]
509
+ }
510
+ },
511
+ "policies": {},
512
+ "checkConstraints": {},
513
+ "isRLSEnabled": false
514
+ },
515
+ "public.oauth_clients": {
516
+ "name": "oauth_clients",
517
+ "schema": "",
518
+ "columns": {
519
+ "client_id": {
520
+ "name": "client_id",
521
+ "type": "text",
522
+ "primaryKey": true,
523
+ "notNull": true
524
+ },
525
+ "client_secret_encrypted": {
526
+ "name": "client_secret_encrypted",
527
+ "type": "text",
528
+ "primaryKey": false,
529
+ "notNull": false
530
+ },
531
+ "client_secret_expires_at": {
532
+ "name": "client_secret_expires_at",
533
+ "type": "timestamp",
534
+ "primaryKey": false,
535
+ "notNull": false
536
+ },
537
+ "redirect_uris": {
538
+ "name": "redirect_uris",
539
+ "type": "jsonb",
540
+ "primaryKey": false,
541
+ "notNull": true,
542
+ "default": "'[]'::jsonb"
543
+ },
544
+ "token_endpoint_auth_method": {
545
+ "name": "token_endpoint_auth_method",
546
+ "type": "text",
547
+ "primaryKey": false,
548
+ "notNull": true,
549
+ "default": "'none'"
550
+ },
551
+ "client_name": {
552
+ "name": "client_name",
553
+ "type": "text",
554
+ "primaryKey": false,
555
+ "notNull": false
556
+ },
557
+ "metadata": {
558
+ "name": "metadata",
559
+ "type": "jsonb",
560
+ "primaryKey": false,
561
+ "notNull": true,
562
+ "default": "'{}'::jsonb"
563
+ },
564
+ "created_at": {
565
+ "name": "created_at",
566
+ "type": "timestamp",
567
+ "primaryKey": false,
568
+ "notNull": true,
569
+ "default": "now()"
570
+ }
571
+ },
572
+ "indexes": {},
573
+ "foreignKeys": {},
574
+ "compositePrimaryKeys": {},
575
+ "uniqueConstraints": {},
576
+ "policies": {},
577
+ "checkConstraints": {},
578
+ "isRLSEnabled": false
579
+ },
580
+ "public.oauth_tokens": {
581
+ "name": "oauth_tokens",
582
+ "schema": "",
583
+ "columns": {
584
+ "id": {
585
+ "name": "id",
586
+ "type": "uuid",
587
+ "primaryKey": true,
588
+ "notNull": true,
589
+ "default": "gen_random_uuid()"
590
+ },
591
+ "access_token_hash": {
592
+ "name": "access_token_hash",
593
+ "type": "text",
594
+ "primaryKey": false,
595
+ "notNull": true
596
+ },
597
+ "refresh_token_hash": {
598
+ "name": "refresh_token_hash",
599
+ "type": "text",
600
+ "primaryKey": false,
601
+ "notNull": false
602
+ },
603
+ "client_id": {
604
+ "name": "client_id",
605
+ "type": "text",
606
+ "primaryKey": false,
607
+ "notNull": true
608
+ },
609
+ "user_id": {
610
+ "name": "user_id",
611
+ "type": "uuid",
612
+ "primaryKey": false,
613
+ "notNull": true
614
+ },
615
+ "scope": {
616
+ "name": "scope",
617
+ "type": "text",
618
+ "primaryKey": false,
619
+ "notNull": false
620
+ },
621
+ "resource": {
622
+ "name": "resource",
623
+ "type": "text",
624
+ "primaryKey": false,
625
+ "notNull": false
626
+ },
627
+ "expires_at": {
628
+ "name": "expires_at",
629
+ "type": "timestamp",
630
+ "primaryKey": false,
631
+ "notNull": true
632
+ },
633
+ "refresh_expires_at": {
634
+ "name": "refresh_expires_at",
635
+ "type": "timestamp",
636
+ "primaryKey": false,
637
+ "notNull": false
638
+ },
639
+ "revoked_at": {
640
+ "name": "revoked_at",
641
+ "type": "timestamp",
642
+ "primaryKey": false,
643
+ "notNull": false
644
+ },
645
+ "last_used_at": {
646
+ "name": "last_used_at",
647
+ "type": "timestamp",
648
+ "primaryKey": false,
649
+ "notNull": false
650
+ },
651
+ "created_at": {
652
+ "name": "created_at",
653
+ "type": "timestamp",
654
+ "primaryKey": false,
655
+ "notNull": true,
656
+ "default": "now()"
657
+ }
658
+ },
659
+ "indexes": {
660
+ "oauth_tokens_by_user": {
661
+ "name": "oauth_tokens_by_user",
662
+ "columns": [
663
+ {
664
+ "expression": "user_id",
665
+ "isExpression": false,
666
+ "asc": true,
667
+ "nulls": "last"
668
+ }
669
+ ],
670
+ "isUnique": false,
671
+ "concurrently": false,
672
+ "method": "btree",
673
+ "with": {}
674
+ },
675
+ "oauth_tokens_by_expiry": {
676
+ "name": "oauth_tokens_by_expiry",
677
+ "columns": [
678
+ {
679
+ "expression": "expires_at",
680
+ "isExpression": false,
681
+ "asc": true,
682
+ "nulls": "last"
683
+ }
684
+ ],
685
+ "isUnique": false,
686
+ "concurrently": false,
687
+ "method": "btree",
688
+ "with": {}
689
+ }
690
+ },
691
+ "foreignKeys": {
692
+ "oauth_tokens_client_id_oauth_clients_client_id_fk": {
693
+ "name": "oauth_tokens_client_id_oauth_clients_client_id_fk",
694
+ "tableFrom": "oauth_tokens",
695
+ "tableTo": "oauth_clients",
696
+ "columnsFrom": [
697
+ "client_id"
698
+ ],
699
+ "columnsTo": [
700
+ "client_id"
701
+ ],
702
+ "onDelete": "no action",
703
+ "onUpdate": "no action"
704
+ },
705
+ "oauth_tokens_user_id_users_id_fk": {
706
+ "name": "oauth_tokens_user_id_users_id_fk",
707
+ "tableFrom": "oauth_tokens",
708
+ "tableTo": "users",
709
+ "columnsFrom": [
710
+ "user_id"
711
+ ],
712
+ "columnsTo": [
713
+ "id"
714
+ ],
715
+ "onDelete": "no action",
716
+ "onUpdate": "no action"
717
+ }
718
+ },
719
+ "compositePrimaryKeys": {},
720
+ "uniqueConstraints": {
721
+ "oauth_tokens_access_token_hash_unique": {
722
+ "name": "oauth_tokens_access_token_hash_unique",
723
+ "nullsNotDistinct": false,
724
+ "columns": [
725
+ "access_token_hash"
726
+ ]
727
+ },
728
+ "oauth_tokens_refresh_token_hash_unique": {
729
+ "name": "oauth_tokens_refresh_token_hash_unique",
730
+ "nullsNotDistinct": false,
731
+ "columns": [
732
+ "refresh_token_hash"
733
+ ]
734
+ }
735
+ },
736
+ "policies": {},
737
+ "checkConstraints": {},
738
+ "isRLSEnabled": false
739
+ },
740
+ "public.pending_commits": {
741
+ "name": "pending_commits",
742
+ "schema": "",
743
+ "columns": {
744
+ "id": {
745
+ "name": "id",
746
+ "type": "uuid",
747
+ "primaryKey": true,
748
+ "notNull": true,
749
+ "default": "gen_random_uuid()"
750
+ },
751
+ "workspace_id": {
752
+ "name": "workspace_id",
753
+ "type": "text",
754
+ "primaryKey": false,
755
+ "notNull": true
756
+ },
757
+ "branch": {
758
+ "name": "branch",
759
+ "type": "text",
760
+ "primaryKey": false,
761
+ "notNull": true
762
+ },
763
+ "path": {
764
+ "name": "path",
765
+ "type": "text",
766
+ "primaryKey": false,
767
+ "notNull": true
768
+ },
769
+ "author_email": {
770
+ "name": "author_email",
771
+ "type": "text",
772
+ "primaryKey": false,
773
+ "notNull": true
774
+ },
775
+ "author_name": {
776
+ "name": "author_name",
777
+ "type": "text",
778
+ "primaryKey": false,
779
+ "notNull": true
780
+ },
781
+ "queued_at": {
782
+ "name": "queued_at",
783
+ "type": "timestamp",
784
+ "primaryKey": false,
785
+ "notNull": true,
786
+ "default": "now()"
787
+ },
788
+ "status": {
789
+ "name": "status",
790
+ "type": "text",
791
+ "primaryKey": false,
792
+ "notNull": true,
793
+ "default": "'pending'"
794
+ },
795
+ "attempts": {
796
+ "name": "attempts",
797
+ "type": "integer",
798
+ "primaryKey": false,
799
+ "notNull": true,
800
+ "default": 0
801
+ },
802
+ "recovery_agent_runs": {
803
+ "name": "recovery_agent_runs",
804
+ "type": "integer",
805
+ "primaryKey": false,
806
+ "notNull": true,
807
+ "default": 0
808
+ },
809
+ "last_attempted_at": {
810
+ "name": "last_attempted_at",
811
+ "type": "timestamp",
812
+ "primaryKey": false,
813
+ "notNull": false
814
+ },
815
+ "last_error": {
816
+ "name": "last_error",
817
+ "type": "text",
818
+ "primaryKey": false,
819
+ "notNull": false
820
+ }
821
+ },
822
+ "indexes": {
823
+ "pending_commits_by_workspace_queued": {
824
+ "name": "pending_commits_by_workspace_queued",
825
+ "columns": [
826
+ {
827
+ "expression": "workspace_id",
828
+ "isExpression": false,
829
+ "asc": true,
830
+ "nulls": "last"
831
+ },
832
+ {
833
+ "expression": "queued_at",
834
+ "isExpression": false,
835
+ "asc": true,
836
+ "nulls": "last"
837
+ }
838
+ ],
839
+ "isUnique": false,
840
+ "concurrently": false,
841
+ "method": "btree",
842
+ "with": {}
843
+ },
844
+ "pending_commits_by_status": {
845
+ "name": "pending_commits_by_status",
846
+ "columns": [
847
+ {
848
+ "expression": "status",
849
+ "isExpression": false,
850
+ "asc": true,
851
+ "nulls": "last"
852
+ },
853
+ {
854
+ "expression": "last_attempted_at",
855
+ "isExpression": false,
856
+ "asc": true,
857
+ "nulls": "last"
858
+ }
859
+ ],
860
+ "isUnique": false,
861
+ "concurrently": false,
862
+ "method": "btree",
863
+ "with": {}
864
+ },
865
+ "pending_commits_by_status_only": {
866
+ "name": "pending_commits_by_status_only",
867
+ "columns": [
868
+ {
869
+ "expression": "status",
870
+ "isExpression": false,
871
+ "asc": true,
872
+ "nulls": "last"
873
+ }
874
+ ],
875
+ "isUnique": false,
876
+ "concurrently": false,
877
+ "method": "btree",
878
+ "with": {}
879
+ }
880
+ },
881
+ "foreignKeys": {},
882
+ "compositePrimaryKeys": {},
883
+ "uniqueConstraints": {},
884
+ "policies": {},
885
+ "checkConstraints": {
886
+ "pending_commits_status": {
887
+ "name": "pending_commits_status",
888
+ "value": "\"pending_commits\".\"status\" IN ('pending', 'running', 'needs_attention')"
889
+ }
890
+ },
891
+ "isRLSEnabled": false
892
+ },
893
+ "public.pr_comments": {
894
+ "name": "pr_comments",
895
+ "schema": "",
896
+ "columns": {
897
+ "id": {
898
+ "name": "id",
899
+ "type": "uuid",
900
+ "primaryKey": true,
901
+ "notNull": true,
902
+ "default": "gen_random_uuid()"
903
+ },
904
+ "pr_number": {
905
+ "name": "pr_number",
906
+ "type": "integer",
907
+ "primaryKey": false,
908
+ "notNull": true
909
+ },
910
+ "author_email": {
911
+ "name": "author_email",
912
+ "type": "text",
913
+ "primaryKey": false,
914
+ "notNull": true
915
+ },
916
+ "author_name": {
917
+ "name": "author_name",
918
+ "type": "text",
919
+ "primaryKey": false,
920
+ "notNull": true
921
+ },
922
+ "path": {
923
+ "name": "path",
924
+ "type": "text",
925
+ "primaryKey": false,
926
+ "notNull": false
927
+ },
928
+ "line": {
929
+ "name": "line",
930
+ "type": "integer",
931
+ "primaryKey": false,
932
+ "notNull": false
933
+ },
934
+ "head_sha": {
935
+ "name": "head_sha",
936
+ "type": "text",
937
+ "primaryKey": false,
938
+ "notNull": true
939
+ },
940
+ "body": {
941
+ "name": "body",
942
+ "type": "text",
943
+ "primaryKey": false,
944
+ "notNull": true
945
+ },
946
+ "parent_id": {
947
+ "name": "parent_id",
948
+ "type": "uuid",
949
+ "primaryKey": false,
950
+ "notNull": false
951
+ },
952
+ "created_at": {
953
+ "name": "created_at",
954
+ "type": "timestamp",
955
+ "primaryKey": false,
956
+ "notNull": true,
957
+ "default": "now()"
958
+ },
959
+ "updated_at": {
960
+ "name": "updated_at",
961
+ "type": "timestamp",
962
+ "primaryKey": false,
963
+ "notNull": false
964
+ }
965
+ },
966
+ "indexes": {
967
+ "pr_comments_by_pr": {
968
+ "name": "pr_comments_by_pr",
969
+ "columns": [
970
+ {
971
+ "expression": "pr_number",
972
+ "isExpression": false,
973
+ "asc": true,
974
+ "nulls": "last"
975
+ }
976
+ ],
977
+ "isUnique": false,
978
+ "concurrently": false,
979
+ "method": "btree",
980
+ "with": {}
981
+ },
982
+ "pr_comments_by_thread": {
983
+ "name": "pr_comments_by_thread",
984
+ "columns": [
985
+ {
986
+ "expression": "pr_number",
987
+ "isExpression": false,
988
+ "asc": true,
989
+ "nulls": "last"
990
+ },
991
+ {
992
+ "expression": "path",
993
+ "isExpression": false,
994
+ "asc": true,
995
+ "nulls": "last"
996
+ },
997
+ {
998
+ "expression": "line",
999
+ "isExpression": false,
1000
+ "asc": true,
1001
+ "nulls": "last"
1002
+ }
1003
+ ],
1004
+ "isUnique": false,
1005
+ "concurrently": false,
1006
+ "method": "btree",
1007
+ "with": {}
1008
+ }
1009
+ },
1010
+ "foreignKeys": {},
1011
+ "compositePrimaryKeys": {},
1012
+ "uniqueConstraints": {},
1013
+ "policies": {},
1014
+ "checkConstraints": {},
1015
+ "isRLSEnabled": false
1016
+ },
1017
+ "public.pr_file_approvals": {
1018
+ "name": "pr_file_approvals",
1019
+ "schema": "",
1020
+ "columns": {
1021
+ "id": {
1022
+ "name": "id",
1023
+ "type": "uuid",
1024
+ "primaryKey": true,
1025
+ "notNull": true,
1026
+ "default": "gen_random_uuid()"
1027
+ },
1028
+ "pr_number": {
1029
+ "name": "pr_number",
1030
+ "type": "integer",
1031
+ "primaryKey": false,
1032
+ "notNull": true
1033
+ },
1034
+ "path": {
1035
+ "name": "path",
1036
+ "type": "text",
1037
+ "primaryKey": false,
1038
+ "notNull": true
1039
+ },
1040
+ "approver_email": {
1041
+ "name": "approver_email",
1042
+ "type": "text",
1043
+ "primaryKey": false,
1044
+ "notNull": true
1045
+ },
1046
+ "approver_name": {
1047
+ "name": "approver_name",
1048
+ "type": "text",
1049
+ "primaryKey": false,
1050
+ "notNull": true
1051
+ },
1052
+ "head_sha": {
1053
+ "name": "head_sha",
1054
+ "type": "text",
1055
+ "primaryKey": false,
1056
+ "notNull": true
1057
+ },
1058
+ "approved_at": {
1059
+ "name": "approved_at",
1060
+ "type": "timestamp",
1061
+ "primaryKey": false,
1062
+ "notNull": true,
1063
+ "default": "now()"
1064
+ }
1065
+ },
1066
+ "indexes": {
1067
+ "pr_file_approvals_unq": {
1068
+ "name": "pr_file_approvals_unq",
1069
+ "columns": [
1070
+ {
1071
+ "expression": "pr_number",
1072
+ "isExpression": false,
1073
+ "asc": true,
1074
+ "nulls": "last"
1075
+ },
1076
+ {
1077
+ "expression": "path",
1078
+ "isExpression": false,
1079
+ "asc": true,
1080
+ "nulls": "last"
1081
+ },
1082
+ {
1083
+ "expression": "approver_email",
1084
+ "isExpression": false,
1085
+ "asc": true,
1086
+ "nulls": "last"
1087
+ },
1088
+ {
1089
+ "expression": "head_sha",
1090
+ "isExpression": false,
1091
+ "asc": true,
1092
+ "nulls": "last"
1093
+ }
1094
+ ],
1095
+ "isUnique": true,
1096
+ "concurrently": false,
1097
+ "method": "btree",
1098
+ "with": {}
1099
+ },
1100
+ "pr_file_approvals_by_pr": {
1101
+ "name": "pr_file_approvals_by_pr",
1102
+ "columns": [
1103
+ {
1104
+ "expression": "pr_number",
1105
+ "isExpression": false,
1106
+ "asc": true,
1107
+ "nulls": "last"
1108
+ }
1109
+ ],
1110
+ "isUnique": false,
1111
+ "concurrently": false,
1112
+ "method": "btree",
1113
+ "with": {}
1114
+ }
1115
+ },
1116
+ "foreignKeys": {},
1117
+ "compositePrimaryKeys": {},
1118
+ "uniqueConstraints": {},
1119
+ "policies": {},
1120
+ "checkConstraints": {},
1121
+ "isRLSEnabled": false
1122
+ },
1123
+ "public.pr_merge_log": {
1124
+ "name": "pr_merge_log",
1125
+ "schema": "",
1126
+ "columns": {
1127
+ "id": {
1128
+ "name": "id",
1129
+ "type": "uuid",
1130
+ "primaryKey": true,
1131
+ "notNull": true,
1132
+ "default": "gen_random_uuid()"
1133
+ },
1134
+ "pr_number": {
1135
+ "name": "pr_number",
1136
+ "type": "integer",
1137
+ "primaryKey": false,
1138
+ "notNull": true
1139
+ },
1140
+ "triggered_by_email": {
1141
+ "name": "triggered_by_email",
1142
+ "type": "text",
1143
+ "primaryKey": false,
1144
+ "notNull": true
1145
+ },
1146
+ "triggered_by_name": {
1147
+ "name": "triggered_by_name",
1148
+ "type": "text",
1149
+ "primaryKey": false,
1150
+ "notNull": true
1151
+ },
1152
+ "head_sha_at_merge": {
1153
+ "name": "head_sha_at_merge",
1154
+ "type": "text",
1155
+ "primaryKey": false,
1156
+ "notNull": true
1157
+ },
1158
+ "merge_method": {
1159
+ "name": "merge_method",
1160
+ "type": "text",
1161
+ "primaryKey": false,
1162
+ "notNull": true
1163
+ },
1164
+ "succeeded": {
1165
+ "name": "succeeded",
1166
+ "type": "boolean",
1167
+ "primaryKey": false,
1168
+ "notNull": true
1169
+ },
1170
+ "error": {
1171
+ "name": "error",
1172
+ "type": "text",
1173
+ "primaryKey": false,
1174
+ "notNull": false
1175
+ },
1176
+ "started_at": {
1177
+ "name": "started_at",
1178
+ "type": "timestamp",
1179
+ "primaryKey": false,
1180
+ "notNull": true,
1181
+ "default": "now()"
1182
+ },
1183
+ "completed_at": {
1184
+ "name": "completed_at",
1185
+ "type": "timestamp",
1186
+ "primaryKey": false,
1187
+ "notNull": false
1188
+ }
1189
+ },
1190
+ "indexes": {
1191
+ "pr_merge_log_by_pr": {
1192
+ "name": "pr_merge_log_by_pr",
1193
+ "columns": [
1194
+ {
1195
+ "expression": "pr_number",
1196
+ "isExpression": false,
1197
+ "asc": true,
1198
+ "nulls": "last"
1199
+ }
1200
+ ],
1201
+ "isUnique": false,
1202
+ "concurrently": false,
1203
+ "method": "btree",
1204
+ "with": {}
1205
+ }
1206
+ },
1207
+ "foreignKeys": {},
1208
+ "compositePrimaryKeys": {},
1209
+ "uniqueConstraints": {},
1210
+ "policies": {},
1211
+ "checkConstraints": {},
1212
+ "isRLSEnabled": false
1213
+ },
1214
+ "public.secrets": {
1215
+ "name": "secrets",
1216
+ "schema": "",
1217
+ "columns": {
1218
+ "id": {
1219
+ "name": "id",
1220
+ "type": "uuid",
1221
+ "primaryKey": true,
1222
+ "notNull": true,
1223
+ "default": "gen_random_uuid()"
1224
+ },
1225
+ "user_id": {
1226
+ "name": "user_id",
1227
+ "type": "uuid",
1228
+ "primaryKey": false,
1229
+ "notNull": false
1230
+ },
1231
+ "key": {
1232
+ "name": "key",
1233
+ "type": "text",
1234
+ "primaryKey": false,
1235
+ "notNull": true
1236
+ },
1237
+ "kind": {
1238
+ "name": "kind",
1239
+ "type": "text",
1240
+ "primaryKey": false,
1241
+ "notNull": true,
1242
+ "default": "'static'"
1243
+ },
1244
+ "label": {
1245
+ "name": "label",
1246
+ "type": "text",
1247
+ "primaryKey": false,
1248
+ "notNull": false
1249
+ },
1250
+ "value_encrypted": {
1251
+ "name": "value_encrypted",
1252
+ "type": "text",
1253
+ "primaryKey": false,
1254
+ "notNull": true
1255
+ },
1256
+ "oauth_meta": {
1257
+ "name": "oauth_meta",
1258
+ "type": "jsonb",
1259
+ "primaryKey": false,
1260
+ "notNull": false
1261
+ },
1262
+ "created_at": {
1263
+ "name": "created_at",
1264
+ "type": "timestamp",
1265
+ "primaryKey": false,
1266
+ "notNull": true,
1267
+ "default": "now()"
1268
+ },
1269
+ "updated_at": {
1270
+ "name": "updated_at",
1271
+ "type": "timestamp",
1272
+ "primaryKey": false,
1273
+ "notNull": true,
1274
+ "default": "now()"
1275
+ }
1276
+ },
1277
+ "indexes": {
1278
+ "secrets_by_user": {
1279
+ "name": "secrets_by_user",
1280
+ "columns": [
1281
+ {
1282
+ "expression": "user_id",
1283
+ "isExpression": false,
1284
+ "asc": true,
1285
+ "nulls": "last"
1286
+ }
1287
+ ],
1288
+ "isUnique": false,
1289
+ "concurrently": false,
1290
+ "method": "btree",
1291
+ "with": {}
1292
+ },
1293
+ "secrets_user_key_unq": {
1294
+ "name": "secrets_user_key_unq",
1295
+ "columns": [
1296
+ {
1297
+ "expression": "user_id",
1298
+ "isExpression": false,
1299
+ "asc": true,
1300
+ "nulls": "last"
1301
+ },
1302
+ {
1303
+ "expression": "key",
1304
+ "isExpression": false,
1305
+ "asc": true,
1306
+ "nulls": "last"
1307
+ }
1308
+ ],
1309
+ "isUnique": true,
1310
+ "concurrently": false,
1311
+ "method": "btree",
1312
+ "with": {}
1313
+ },
1314
+ "secrets_shared_key_unq": {
1315
+ "name": "secrets_shared_key_unq",
1316
+ "columns": [
1317
+ {
1318
+ "expression": "key",
1319
+ "isExpression": false,
1320
+ "asc": true,
1321
+ "nulls": "last"
1322
+ }
1323
+ ],
1324
+ "isUnique": true,
1325
+ "where": "\"secrets\".\"user_id\" is null",
1326
+ "concurrently": false,
1327
+ "method": "btree",
1328
+ "with": {}
1329
+ }
1330
+ },
1331
+ "foreignKeys": {
1332
+ "secrets_user_id_users_id_fk": {
1333
+ "name": "secrets_user_id_users_id_fk",
1334
+ "tableFrom": "secrets",
1335
+ "tableTo": "users",
1336
+ "columnsFrom": [
1337
+ "user_id"
1338
+ ],
1339
+ "columnsTo": [
1340
+ "id"
1341
+ ],
1342
+ "onDelete": "cascade",
1343
+ "onUpdate": "no action"
1344
+ }
1345
+ },
1346
+ "compositePrimaryKeys": {},
1347
+ "uniqueConstraints": {},
1348
+ "policies": {},
1349
+ "checkConstraints": {},
1350
+ "isRLSEnabled": false
1351
+ },
1352
+ "public.session_ontology_touches": {
1353
+ "name": "session_ontology_touches",
1354
+ "schema": "",
1355
+ "columns": {
1356
+ "session_id": {
1357
+ "name": "session_id",
1358
+ "type": "text",
1359
+ "primaryKey": false,
1360
+ "notNull": true
1361
+ },
1362
+ "ontology": {
1363
+ "name": "ontology",
1364
+ "type": "text",
1365
+ "primaryKey": false,
1366
+ "notNull": true
1367
+ },
1368
+ "touched_at": {
1369
+ "name": "touched_at",
1370
+ "type": "timestamp",
1371
+ "primaryKey": false,
1372
+ "notNull": true,
1373
+ "default": "now()"
1374
+ }
1375
+ },
1376
+ "indexes": {
1377
+ "session_ontology_touches_by_touched_at": {
1378
+ "name": "session_ontology_touches_by_touched_at",
1379
+ "columns": [
1380
+ {
1381
+ "expression": "touched_at",
1382
+ "isExpression": false,
1383
+ "asc": true,
1384
+ "nulls": "last"
1385
+ }
1386
+ ],
1387
+ "isUnique": false,
1388
+ "concurrently": false,
1389
+ "method": "btree",
1390
+ "with": {}
1391
+ }
1392
+ },
1393
+ "foreignKeys": {},
1394
+ "compositePrimaryKeys": {
1395
+ "session_ontology_touches_session_id_ontology_pk": {
1396
+ "name": "session_ontology_touches_session_id_ontology_pk",
1397
+ "columns": [
1398
+ "session_id",
1399
+ "ontology"
1400
+ ]
1401
+ }
1402
+ },
1403
+ "uniqueConstraints": {},
1404
+ "policies": {},
1405
+ "checkConstraints": {},
1406
+ "isRLSEnabled": false
1407
+ },
1408
+ "public.users": {
1409
+ "name": "users",
1410
+ "schema": "",
1411
+ "columns": {
1412
+ "id": {
1413
+ "name": "id",
1414
+ "type": "uuid",
1415
+ "primaryKey": true,
1416
+ "notNull": true,
1417
+ "default": "gen_random_uuid()"
1418
+ },
1419
+ "email": {
1420
+ "name": "email",
1421
+ "type": "text",
1422
+ "primaryKey": false,
1423
+ "notNull": true
1424
+ },
1425
+ "name": {
1426
+ "name": "name",
1427
+ "type": "text",
1428
+ "primaryKey": false,
1429
+ "notNull": true
1430
+ },
1431
+ "avatar_url": {
1432
+ "name": "avatar_url",
1433
+ "type": "text",
1434
+ "primaryKey": false,
1435
+ "notNull": false
1436
+ },
1437
+ "password_hash": {
1438
+ "name": "password_hash",
1439
+ "type": "text",
1440
+ "primaryKey": false,
1441
+ "notNull": false
1442
+ },
1443
+ "onboarding_done": {
1444
+ "name": "onboarding_done",
1445
+ "type": "boolean",
1446
+ "primaryKey": false,
1447
+ "notNull": true,
1448
+ "default": false
1449
+ },
1450
+ "created_at": {
1451
+ "name": "created_at",
1452
+ "type": "timestamp",
1453
+ "primaryKey": false,
1454
+ "notNull": true,
1455
+ "default": "now()"
1456
+ },
1457
+ "updated_at": {
1458
+ "name": "updated_at",
1459
+ "type": "timestamp",
1460
+ "primaryKey": false,
1461
+ "notNull": true,
1462
+ "default": "now()"
1463
+ }
1464
+ },
1465
+ "indexes": {},
1466
+ "foreignKeys": {},
1467
+ "compositePrimaryKeys": {},
1468
+ "uniqueConstraints": {
1469
+ "users_email_unique": {
1470
+ "name": "users_email_unique",
1471
+ "nullsNotDistinct": false,
1472
+ "columns": [
1473
+ "email"
1474
+ ]
1475
+ }
1476
+ },
1477
+ "policies": {},
1478
+ "checkConstraints": {},
1479
+ "isRLSEnabled": false
1480
+ }
1481
+ },
1482
+ "enums": {},
1483
+ "schemas": {},
1484
+ "sequences": {},
1485
+ "roles": {},
1486
+ "policies": {},
1487
+ "views": {},
1488
+ "_meta": {
1489
+ "columns": {},
1490
+ "schemas": {},
1491
+ "tables": {}
1492
+ }
1493
+ }