@bevel-software/platform-core-backend 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 (720) hide show
  1. package/LICENSE +202 -0
  2. package/dist/assets.d.ts +5 -0
  3. package/dist/assets.d.ts.map +1 -0
  4. package/dist/assets.js +23 -0
  5. package/dist/assets.js.map +1 -0
  6. package/dist/core/core-ports.d.ts +83 -0
  7. package/dist/core/core-ports.d.ts.map +1 -0
  8. package/dist/core/core-ports.js +12 -0
  9. package/dist/core/core-ports.js.map +1 -0
  10. package/dist/core/create-core-server.d.ts +62 -0
  11. package/dist/core/create-core-server.d.ts.map +1 -0
  12. package/dist/core/create-core-server.js +204 -0
  13. package/dist/core/create-core-server.js.map +1 -0
  14. package/dist/core/create-core-services.d.ts +95 -0
  15. package/dist/core/create-core-services.d.ts.map +1 -0
  16. package/dist/core/create-core-services.js +352 -0
  17. package/dist/core/create-core-services.js.map +1 -0
  18. package/dist/core-config.d.ts +119 -0
  19. package/dist/core-config.d.ts.map +1 -0
  20. package/dist/core-config.js +240 -0
  21. package/dist/core-config.js.map +1 -0
  22. package/dist/index.d.ts +36 -0
  23. package/dist/index.d.ts.map +1 -0
  24. package/dist/index.js +36 -0
  25. package/dist/index.js.map +1 -0
  26. package/dist/modules/access/access-control.interface.d.ts +348 -0
  27. package/dist/modules/access/access-control.interface.d.ts.map +1 -0
  28. package/dist/modules/access/access-control.interface.js +2 -0
  29. package/dist/modules/access/access-control.interface.js.map +1 -0
  30. package/dist/modules/access/access-control.service.d.ts +323 -0
  31. package/dist/modules/access/access-control.service.d.ts.map +1 -0
  32. package/dist/modules/access/access-control.service.js +1431 -0
  33. package/dist/modules/access/access-control.service.js.map +1 -0
  34. package/dist/modules/access/access-errors.d.ts +34 -0
  35. package/dist/modules/access/access-errors.d.ts.map +1 -0
  36. package/dist/modules/access/access-errors.js +40 -0
  37. package/dist/modules/access/access-errors.js.map +1 -0
  38. package/dist/modules/access/access-mutation.service.d.ts +176 -0
  39. package/dist/modules/access/access-mutation.service.d.ts.map +1 -0
  40. package/dist/modules/access/access-mutation.service.js +307 -0
  41. package/dist/modules/access/access-mutation.service.js.map +1 -0
  42. package/dist/modules/access/access-splice.d.ts +98 -0
  43. package/dist/modules/access/access-splice.d.ts.map +1 -0
  44. package/dist/modules/access/access-splice.js +346 -0
  45. package/dist/modules/access/access-splice.js.map +1 -0
  46. package/dist/modules/access/access.routes.d.ts +10 -0
  47. package/dist/modules/access/access.routes.d.ts.map +1 -0
  48. package/dist/modules/access/access.routes.js +757 -0
  49. package/dist/modules/access/access.routes.js.map +1 -0
  50. package/dist/modules/access/creator-access.d.ts +113 -0
  51. package/dist/modules/access/creator-access.d.ts.map +1 -0
  52. package/dist/modules/access/creator-access.js +212 -0
  53. package/dist/modules/access/creator-access.js.map +1 -0
  54. package/dist/modules/access/kb-read-filter.d.ts +41 -0
  55. package/dist/modules/access/kb-read-filter.d.ts.map +1 -0
  56. package/dist/modules/access/kb-read-filter.js +60 -0
  57. package/dist/modules/access/kb-read-filter.js.map +1 -0
  58. package/dist/modules/access/roles-admin.service.d.ts +240 -0
  59. package/dist/modules/access/roles-admin.service.d.ts.map +1 -0
  60. package/dist/modules/access/roles-admin.service.js +630 -0
  61. package/dist/modules/access/roles-admin.service.js.map +1 -0
  62. package/dist/modules/access/roles-edit.d.ts +91 -0
  63. package/dist/modules/access/roles-edit.d.ts.map +1 -0
  64. package/dist/modules/access/roles-edit.js +232 -0
  65. package/dist/modules/access/roles-edit.js.map +1 -0
  66. package/dist/modules/access/roles-yaml-guard.d.ts +56 -0
  67. package/dist/modules/access/roles-yaml-guard.d.ts.map +1 -0
  68. package/dist/modules/access/roles-yaml-guard.js +79 -0
  69. package/dist/modules/access/roles-yaml-guard.js.map +1 -0
  70. package/dist/modules/admin/admin-access.routes.d.ts +18 -0
  71. package/dist/modules/admin/admin-access.routes.d.ts.map +1 -0
  72. package/dist/modules/admin/admin-access.routes.js +26 -0
  73. package/dist/modules/admin/admin-access.routes.js.map +1 -0
  74. package/dist/modules/admin/admin-access.service.d.ts +24 -0
  75. package/dist/modules/admin/admin-access.service.d.ts.map +1 -0
  76. package/dist/modules/admin/admin-access.service.js +41 -0
  77. package/dist/modules/admin/admin-access.service.js.map +1 -0
  78. package/dist/modules/admin/admin.interface.d.ts +11 -0
  79. package/dist/modules/admin/admin.interface.d.ts.map +1 -0
  80. package/dist/modules/admin/admin.interface.js +2 -0
  81. package/dist/modules/admin/admin.interface.js.map +1 -0
  82. package/dist/modules/auth/account-erasure.service.d.ts +80 -0
  83. package/dist/modules/auth/account-erasure.service.d.ts.map +1 -0
  84. package/dist/modules/auth/account-erasure.service.js +91 -0
  85. package/dist/modules/auth/account-erasure.service.js.map +1 -0
  86. package/dist/modules/auth/auth.middleware.d.ts +23 -0
  87. package/dist/modules/auth/auth.middleware.d.ts.map +1 -0
  88. package/dist/modules/auth/auth.middleware.js +68 -0
  89. package/dist/modules/auth/auth.middleware.js.map +1 -0
  90. package/dist/modules/auth/auth.routes.d.ts +25 -0
  91. package/dist/modules/auth/auth.routes.d.ts.map +1 -0
  92. package/dist/modules/auth/auth.routes.js +72 -0
  93. package/dist/modules/auth/auth.routes.js.map +1 -0
  94. package/dist/modules/auth/auth.service.d.ts +76 -0
  95. package/dist/modules/auth/auth.service.d.ts.map +1 -0
  96. package/dist/modules/auth/auth.service.js +168 -0
  97. package/dist/modules/auth/auth.service.js.map +1 -0
  98. package/dist/modules/code-mode/code-mode-names.d.ts +16 -0
  99. package/dist/modules/code-mode/code-mode-names.d.ts.map +1 -0
  100. package/dist/modules/code-mode/code-mode-names.js +30 -0
  101. package/dist/modules/code-mode/code-mode-names.js.map +1 -0
  102. package/dist/modules/code-mode/code-mode.tool.d.ts +13 -0
  103. package/dist/modules/code-mode/code-mode.tool.d.ts.map +1 -0
  104. package/dist/modules/code-mode/code-mode.tool.js +112 -0
  105. package/dist/modules/code-mode/code-mode.tool.js.map +1 -0
  106. package/dist/modules/code-mode/index.d.ts +3 -0
  107. package/dist/modules/code-mode/index.d.ts.map +1 -0
  108. package/dist/modules/code-mode/index.js +3 -0
  109. package/dist/modules/code-mode/index.js.map +1 -0
  110. package/dist/modules/database/connection.d.ts +6 -0
  111. package/dist/modules/database/connection.d.ts.map +1 -0
  112. package/dist/modules/database/connection.js +12 -0
  113. package/dist/modules/database/connection.js.map +1 -0
  114. package/dist/modules/database/core-schema.d.ts +2273 -0
  115. package/dist/modules/database/core-schema.d.ts.map +1 -0
  116. package/dist/modules/database/core-schema.js +413 -0
  117. package/dist/modules/database/core-schema.js.map +1 -0
  118. package/dist/modules/database/migrate.d.ts +10 -0
  119. package/dist/modules/database/migrate.d.ts.map +1 -0
  120. package/dist/modules/database/migrate.js +40 -0
  121. package/dist/modules/database/migrate.js.map +1 -0
  122. package/dist/modules/database/schema.d.ts +12 -0
  123. package/dist/modules/database/schema.d.ts.map +1 -0
  124. package/dist/modules/database/schema.js +12 -0
  125. package/dist/modules/database/schema.js.map +1 -0
  126. package/dist/modules/diff/diff-paths.d.ts +2 -0
  127. package/dist/modules/diff/diff-paths.d.ts.map +1 -0
  128. package/dist/modules/diff/diff-paths.js +9 -0
  129. package/dist/modules/diff/diff-paths.js.map +1 -0
  130. package/dist/modules/diff/diff.config.d.ts +8 -0
  131. package/dist/modules/diff/diff.config.d.ts.map +1 -0
  132. package/dist/modules/diff/diff.config.js +13 -0
  133. package/dist/modules/diff/diff.config.js.map +1 -0
  134. package/dist/modules/diff/diff.interface.d.ts +73 -0
  135. package/dist/modules/diff/diff.interface.d.ts.map +1 -0
  136. package/dist/modules/diff/diff.interface.js +2 -0
  137. package/dist/modules/diff/diff.interface.js.map +1 -0
  138. package/dist/modules/diff/diff.routes.d.ts +35 -0
  139. package/dist/modules/diff/diff.routes.d.ts.map +1 -0
  140. package/dist/modules/diff/diff.routes.js +228 -0
  141. package/dist/modules/diff/diff.routes.js.map +1 -0
  142. package/dist/modules/diff/diff.service.d.ts +51 -0
  143. package/dist/modules/diff/diff.service.d.ts.map +1 -0
  144. package/dist/modules/diff/diff.service.js +489 -0
  145. package/dist/modules/diff/diff.service.js.map +1 -0
  146. package/dist/modules/diff/line-diff.d.ts +16 -0
  147. package/dist/modules/diff/line-diff.d.ts.map +1 -0
  148. package/dist/modules/diff/line-diff.js +67 -0
  149. package/dist/modules/diff/line-diff.js.map +1 -0
  150. package/dist/modules/mcp/mcp-auth.middleware.d.ts +27 -0
  151. package/dist/modules/mcp/mcp-auth.middleware.d.ts.map +1 -0
  152. package/dist/modules/mcp/mcp-auth.middleware.js +116 -0
  153. package/dist/modules/mcp/mcp-auth.middleware.js.map +1 -0
  154. package/dist/modules/mcp/mcp-session-store.d.ts +74 -0
  155. package/dist/modules/mcp/mcp-session-store.d.ts.map +1 -0
  156. package/dist/modules/mcp/mcp-session-store.js +131 -0
  157. package/dist/modules/mcp/mcp-session-store.js.map +1 -0
  158. package/dist/modules/mcp/mcp.routes.d.ts +24 -0
  159. package/dist/modules/mcp/mcp.routes.d.ts.map +1 -0
  160. package/dist/modules/mcp/mcp.routes.js +229 -0
  161. package/dist/modules/mcp/mcp.routes.js.map +1 -0
  162. package/dist/modules/mcp/mcp.service.d.ts +198 -0
  163. package/dist/modules/mcp/mcp.service.d.ts.map +1 -0
  164. package/dist/modules/mcp/mcp.service.js +840 -0
  165. package/dist/modules/mcp/mcp.service.js.map +1 -0
  166. package/dist/modules/mcp/oauth/bevel-oauth-provider.d.ts +76 -0
  167. package/dist/modules/mcp/oauth/bevel-oauth-provider.d.ts.map +1 -0
  168. package/dist/modules/mcp/oauth/bevel-oauth-provider.js +291 -0
  169. package/dist/modules/mcp/oauth/bevel-oauth-provider.js.map +1 -0
  170. package/dist/modules/mcp/oauth/oauth-consent.routes.d.ts +18 -0
  171. package/dist/modules/mcp/oauth/oauth-consent.routes.d.ts.map +1 -0
  172. package/dist/modules/mcp/oauth/oauth-consent.routes.js +52 -0
  173. package/dist/modules/mcp/oauth/oauth-consent.routes.js.map +1 -0
  174. package/dist/modules/mcp/oauth/oauth-state.d.ts +32 -0
  175. package/dist/modules/mcp/oauth/oauth-state.d.ts.map +1 -0
  176. package/dist/modules/mcp/oauth/oauth-state.js +34 -0
  177. package/dist/modules/mcp/oauth/oauth-state.js.map +1 -0
  178. package/dist/modules/secrets-vault/db-secrets-vault.service.d.ts +92 -0
  179. package/dist/modules/secrets-vault/db-secrets-vault.service.d.ts.map +1 -0
  180. package/dist/modules/secrets-vault/db-secrets-vault.service.js +728 -0
  181. package/dist/modules/secrets-vault/db-secrets-vault.service.js.map +1 -0
  182. package/dist/modules/secrets-vault/index.d.ts +7 -0
  183. package/dist/modules/secrets-vault/index.d.ts.map +1 -0
  184. package/dist/modules/secrets-vault/index.js +6 -0
  185. package/dist/modules/secrets-vault/index.js.map +1 -0
  186. package/dist/modules/secrets-vault/mcp-oauth-discovery.service.d.ts +63 -0
  187. package/dist/modules/secrets-vault/mcp-oauth-discovery.service.d.ts.map +1 -0
  188. package/dist/modules/secrets-vault/mcp-oauth-discovery.service.js +269 -0
  189. package/dist/modules/secrets-vault/mcp-oauth-discovery.service.js.map +1 -0
  190. package/dist/modules/secrets-vault/secrets-variable-loader.d.ts +46 -0
  191. package/dist/modules/secrets-vault/secrets-variable-loader.d.ts.map +1 -0
  192. package/dist/modules/secrets-vault/secrets-variable-loader.js +87 -0
  193. package/dist/modules/secrets-vault/secrets-variable-loader.js.map +1 -0
  194. package/dist/modules/secrets-vault/secrets-vault.contract.d.ts +210 -0
  195. package/dist/modules/secrets-vault/secrets-vault.contract.d.ts.map +1 -0
  196. package/dist/modules/secrets-vault/secrets-vault.contract.js +90 -0
  197. package/dist/modules/secrets-vault/secrets-vault.contract.js.map +1 -0
  198. package/dist/modules/secrets-vault/secrets-vault.routes.d.ts +30 -0
  199. package/dist/modules/secrets-vault/secrets-vault.routes.d.ts.map +1 -0
  200. package/dist/modules/secrets-vault/secrets-vault.routes.js +490 -0
  201. package/dist/modules/secrets-vault/secrets-vault.routes.js.map +1 -0
  202. package/dist/modules/skills/index.d.ts +5 -0
  203. package/dist/modules/skills/index.d.ts.map +1 -0
  204. package/dist/modules/skills/index.js +4 -0
  205. package/dist/modules/skills/index.js.map +1 -0
  206. package/dist/modules/skills/skills.contract.d.ts +58 -0
  207. package/dist/modules/skills/skills.contract.d.ts.map +1 -0
  208. package/dist/modules/skills/skills.contract.js +10 -0
  209. package/dist/modules/skills/skills.contract.js.map +1 -0
  210. package/dist/modules/skills/skills.routes.d.ts +15 -0
  211. package/dist/modules/skills/skills.routes.d.ts.map +1 -0
  212. package/dist/modules/skills/skills.routes.js +34 -0
  213. package/dist/modules/skills/skills.routes.js.map +1 -0
  214. package/dist/modules/skills/skills.service.d.ts +21 -0
  215. package/dist/modules/skills/skills.service.d.ts.map +1 -0
  216. package/dist/modules/skills/skills.service.js +202 -0
  217. package/dist/modules/skills/skills.service.js.map +1 -0
  218. package/dist/modules/skills/skills.tools.d.ts +15 -0
  219. package/dist/modules/skills/skills.tools.d.ts.map +1 -0
  220. package/dist/modules/skills/skills.tools.js +96 -0
  221. package/dist/modules/skills/skills.tools.js.map +1 -0
  222. package/dist/modules/tool-auth/external-api-key.errors.d.ts +14 -0
  223. package/dist/modules/tool-auth/external-api-key.errors.d.ts.map +1 -0
  224. package/dist/modules/tool-auth/external-api-key.errors.js +23 -0
  225. package/dist/modules/tool-auth/external-api-key.errors.js.map +1 -0
  226. package/dist/modules/tool-auth/external-api-key.interface.d.ts +90 -0
  227. package/dist/modules/tool-auth/external-api-key.interface.d.ts.map +1 -0
  228. package/dist/modules/tool-auth/external-api-key.interface.js +2 -0
  229. package/dist/modules/tool-auth/external-api-key.interface.js.map +1 -0
  230. package/dist/modules/tool-auth/external-api-key.service.d.ts +25 -0
  231. package/dist/modules/tool-auth/external-api-key.service.d.ts.map +1 -0
  232. package/dist/modules/tool-auth/external-api-key.service.js +164 -0
  233. package/dist/modules/tool-auth/external-api-key.service.js.map +1 -0
  234. package/dist/modules/tool-auth/internal-token.service.d.ts +62 -0
  235. package/dist/modules/tool-auth/internal-token.service.d.ts.map +1 -0
  236. package/dist/modules/tool-auth/internal-token.service.js +85 -0
  237. package/dist/modules/tool-auth/internal-token.service.js.map +1 -0
  238. package/dist/modules/tool-auth/llm-usage-meter.d.ts +16 -0
  239. package/dist/modules/tool-auth/llm-usage-meter.d.ts.map +1 -0
  240. package/dist/modules/tool-auth/llm-usage-meter.js +6 -0
  241. package/dist/modules/tool-auth/llm-usage-meter.js.map +1 -0
  242. package/dist/modules/tool-auth/tool-auth.middleware.d.ts +101 -0
  243. package/dist/modules/tool-auth/tool-auth.middleware.d.ts.map +1 -0
  244. package/dist/modules/tool-auth/tool-auth.middleware.js +166 -0
  245. package/dist/modules/tool-auth/tool-auth.middleware.js.map +1 -0
  246. package/dist/modules/tool-helpers/index.d.ts +19 -0
  247. package/dist/modules/tool-helpers/index.d.ts.map +1 -0
  248. package/dist/modules/tool-helpers/index.js +18 -0
  249. package/dist/modules/tool-helpers/index.js.map +1 -0
  250. package/dist/modules/tool-helpers/tool-context.d.ts +35 -0
  251. package/dist/modules/tool-helpers/tool-context.d.ts.map +1 -0
  252. package/dist/modules/tool-helpers/tool-context.js +66 -0
  253. package/dist/modules/tool-helpers/tool-context.js.map +1 -0
  254. package/dist/modules/tool-helpers/tool-def.d.ts +33 -0
  255. package/dist/modules/tool-helpers/tool-def.d.ts.map +1 -0
  256. package/dist/modules/tool-helpers/tool-def.js +57 -0
  257. package/dist/modules/tool-helpers/tool-def.js.map +1 -0
  258. package/dist/modules/tool-helpers/tool-handler.d.ts +19 -0
  259. package/dist/modules/tool-helpers/tool-handler.d.ts.map +1 -0
  260. package/dist/modules/tool-helpers/tool-handler.js +84 -0
  261. package/dist/modules/tool-helpers/tool-handler.js.map +1 -0
  262. package/dist/modules/tool-helpers/tool.contract.d.ts +64 -0
  263. package/dist/modules/tool-helpers/tool.contract.d.ts.map +1 -0
  264. package/dist/modules/tool-helpers/tool.contract.js +24 -0
  265. package/dist/modules/tool-helpers/tool.contract.js.map +1 -0
  266. package/dist/modules/tool-helpers/validate-token.d.ts +31 -0
  267. package/dist/modules/tool-helpers/validate-token.d.ts.map +1 -0
  268. package/dist/modules/tool-helpers/validate-token.js +20 -0
  269. package/dist/modules/tool-helpers/validate-token.js.map +1 -0
  270. package/dist/modules/tool-manuals/index.d.ts +5 -0
  271. package/dist/modules/tool-manuals/index.d.ts.map +1 -0
  272. package/dist/modules/tool-manuals/index.js +5 -0
  273. package/dist/modules/tool-manuals/index.js.map +1 -0
  274. package/dist/modules/tool-manuals/tool-manuals.contract.d.ts +182 -0
  275. package/dist/modules/tool-manuals/tool-manuals.contract.d.ts.map +1 -0
  276. package/dist/modules/tool-manuals/tool-manuals.contract.js +19 -0
  277. package/dist/modules/tool-manuals/tool-manuals.contract.js.map +1 -0
  278. package/dist/modules/tool-manuals/tool-manuals.routes.d.ts +24 -0
  279. package/dist/modules/tool-manuals/tool-manuals.routes.d.ts.map +1 -0
  280. package/dist/modules/tool-manuals/tool-manuals.routes.js +102 -0
  281. package/dist/modules/tool-manuals/tool-manuals.routes.js.map +1 -0
  282. package/dist/modules/tool-manuals/tool-manuals.service.d.ts +108 -0
  283. package/dist/modules/tool-manuals/tool-manuals.service.d.ts.map +1 -0
  284. package/dist/modules/tool-manuals/tool-manuals.service.js +710 -0
  285. package/dist/modules/tool-manuals/tool-manuals.service.js.map +1 -0
  286. package/dist/modules/tool-manuals/tool-manuals.tools.d.ts +35 -0
  287. package/dist/modules/tool-manuals/tool-manuals.tools.d.ts.map +1 -0
  288. package/dist/modules/tool-manuals/tool-manuals.tools.js +157 -0
  289. package/dist/modules/tool-manuals/tool-manuals.tools.js.map +1 -0
  290. package/dist/modules/tool-registry/manual.routes.d.ts +6 -0
  291. package/dist/modules/tool-registry/manual.routes.d.ts.map +1 -0
  292. package/dist/modules/tool-registry/manual.routes.js +76 -0
  293. package/dist/modules/tool-registry/manual.routes.js.map +1 -0
  294. package/dist/modules/tool-registry/tool-registry.d.ts +23 -0
  295. package/dist/modules/tool-registry/tool-registry.d.ts.map +1 -0
  296. package/dist/modules/tool-registry/tool-registry.js +46 -0
  297. package/dist/modules/tool-registry/tool-registry.js.map +1 -0
  298. package/dist/modules/tool-registry/tool.contract.d.ts +48 -0
  299. package/dist/modules/tool-registry/tool.contract.d.ts.map +1 -0
  300. package/dist/modules/tool-registry/tool.contract.js +2 -0
  301. package/dist/modules/tool-registry/tool.contract.js.map +1 -0
  302. package/dist/modules/workflow/agent-tools/workflow.tools.d.ts +14 -0
  303. package/dist/modules/workflow/agent-tools/workflow.tools.d.ts.map +1 -0
  304. package/dist/modules/workflow/agent-tools/workflow.tools.js +437 -0
  305. package/dist/modules/workflow/agent-tools/workflow.tools.js.map +1 -0
  306. package/dist/modules/workflow/event-bus.d.ts +107 -0
  307. package/dist/modules/workflow/event-bus.d.ts.map +1 -0
  308. package/dist/modules/workflow/event-bus.js +224 -0
  309. package/dist/modules/workflow/event-bus.js.map +1 -0
  310. package/dist/modules/workflow/events.routes.d.ts +80 -0
  311. package/dist/modules/workflow/events.routes.d.ts.map +1 -0
  312. package/dist/modules/workflow/events.routes.js +216 -0
  313. package/dist/modules/workflow/events.routes.js.map +1 -0
  314. package/dist/modules/workflow/file-change-notifier.d.ts +38 -0
  315. package/dist/modules/workflow/file-change-notifier.d.ts.map +1 -0
  316. package/dist/modules/workflow/file-change-notifier.js +22 -0
  317. package/dist/modules/workflow/file-change-notifier.js.map +1 -0
  318. package/dist/modules/workflow/file-lock.service.d.ts +57 -0
  319. package/dist/modules/workflow/file-lock.service.d.ts.map +1 -0
  320. package/dist/modules/workflow/file-lock.service.js +202 -0
  321. package/dist/modules/workflow/file-lock.service.js.map +1 -0
  322. package/dist/modules/workflow/git/branch-name.d.ts +10 -0
  323. package/dist/modules/workflow/git/branch-name.d.ts.map +1 -0
  324. package/dist/modules/workflow/git/branch-name.js +76 -0
  325. package/dist/modules/workflow/git/branch-name.js.map +1 -0
  326. package/dist/modules/workflow/git/clone-config.d.ts +61 -0
  327. package/dist/modules/workflow/git/clone-config.d.ts.map +1 -0
  328. package/dist/modules/workflow/git/clone-config.js +69 -0
  329. package/dist/modules/workflow/git/clone-config.js.map +1 -0
  330. package/dist/modules/workflow/git/git-version.d.ts +34 -0
  331. package/dist/modules/workflow/git/git-version.d.ts.map +1 -0
  332. package/dist/modules/workflow/git/git-version.js +63 -0
  333. package/dist/modules/workflow/git/git-version.js.map +1 -0
  334. package/dist/modules/workflow/git/git.service.d.ts +427 -0
  335. package/dist/modules/workflow/git/git.service.d.ts.map +1 -0
  336. package/dist/modules/workflow/git/git.service.js +1987 -0
  337. package/dist/modules/workflow/git/git.service.js.map +1 -0
  338. package/dist/modules/workflow/git/mutex.d.ts +11 -0
  339. package/dist/modules/workflow/git/mutex.d.ts.map +1 -0
  340. package/dist/modules/workflow/git/mutex.js +23 -0
  341. package/dist/modules/workflow/git/mutex.js.map +1 -0
  342. package/dist/modules/workflow/git/pull-request.service.d.ts +124 -0
  343. package/dist/modules/workflow/git/pull-request.service.d.ts.map +1 -0
  344. package/dist/modules/workflow/git/pull-request.service.js +328 -0
  345. package/dist/modules/workflow/git/pull-request.service.js.map +1 -0
  346. package/dist/modules/workflow/locking-filesystem.d.ts +133 -0
  347. package/dist/modules/workflow/locking-filesystem.d.ts.map +1 -0
  348. package/dist/modules/workflow/locking-filesystem.js +400 -0
  349. package/dist/modules/workflow/locking-filesystem.js.map +1 -0
  350. package/dist/modules/workflow/pending-commits.service.d.ts +221 -0
  351. package/dist/modules/workflow/pending-commits.service.d.ts.map +1 -0
  352. package/dist/modules/workflow/pending-commits.service.js +364 -0
  353. package/dist/modules/workflow/pending-commits.service.js.map +1 -0
  354. package/dist/modules/workflow/pending-commits.worker.d.ts +148 -0
  355. package/dist/modules/workflow/pending-commits.worker.d.ts.map +1 -0
  356. package/dist/modules/workflow/pending-commits.worker.js +245 -0
  357. package/dist/modules/workflow/pending-commits.worker.js.map +1 -0
  358. package/dist/modules/workflow/read-only-filesystem.d.ts +24 -0
  359. package/dist/modules/workflow/read-only-filesystem.d.ts.map +1 -0
  360. package/dist/modules/workflow/read-only-filesystem.js +39 -0
  361. package/dist/modules/workflow/read-only-filesystem.js.map +1 -0
  362. package/dist/modules/workflow/recovery-bot.d.ts +31 -0
  363. package/dist/modules/workflow/recovery-bot.d.ts.map +1 -0
  364. package/dist/modules/workflow/recovery-bot.js +64 -0
  365. package/dist/modules/workflow/recovery-bot.js.map +1 -0
  366. package/dist/modules/workflow/review-workflow/review-workflow.interface.d.ts +137 -0
  367. package/dist/modules/workflow/review-workflow/review-workflow.interface.d.ts.map +1 -0
  368. package/dist/modules/workflow/review-workflow/review-workflow.interface.js +2 -0
  369. package/dist/modules/workflow/review-workflow/review-workflow.interface.js.map +1 -0
  370. package/dist/modules/workflow/review-workflow/review-workflow.service.d.ts +26 -0
  371. package/dist/modules/workflow/review-workflow/review-workflow.service.d.ts.map +1 -0
  372. package/dist/modules/workflow/review-workflow/review-workflow.service.js +636 -0
  373. package/dist/modules/workflow/review-workflow/review-workflow.service.js.map +1 -0
  374. package/dist/modules/workflow/sanitize-error.d.ts +29 -0
  375. package/dist/modules/workflow/sanitize-error.d.ts.map +1 -0
  376. package/dist/modules/workflow/sanitize-error.js +60 -0
  377. package/dist/modules/workflow/sanitize-error.js.map +1 -0
  378. package/dist/modules/workflow/session-ontology.policy.d.ts +52 -0
  379. package/dist/modules/workflow/session-ontology.policy.d.ts.map +1 -0
  380. package/dist/modules/workflow/session-ontology.policy.js +62 -0
  381. package/dist/modules/workflow/session-ontology.policy.js.map +1 -0
  382. package/dist/modules/workflow/session-ontology.service.d.ts +100 -0
  383. package/dist/modules/workflow/session-ontology.service.d.ts.map +1 -0
  384. package/dist/modules/workflow/session-ontology.service.js +143 -0
  385. package/dist/modules/workflow/session-ontology.service.js.map +1 -0
  386. package/dist/modules/workflow/workflow-hooks.d.ts +87 -0
  387. package/dist/modules/workflow/workflow-hooks.d.ts.map +1 -0
  388. package/dist/modules/workflow/workflow-hooks.js +35 -0
  389. package/dist/modules/workflow/workflow-hooks.js.map +1 -0
  390. package/dist/modules/workflow/workflow.errors.d.ts +171 -0
  391. package/dist/modules/workflow/workflow.errors.d.ts.map +1 -0
  392. package/dist/modules/workflow/workflow.errors.js +260 -0
  393. package/dist/modules/workflow/workflow.errors.js.map +1 -0
  394. package/dist/modules/workflow/workflow.routes.d.ts +26 -0
  395. package/dist/modules/workflow/workflow.routes.d.ts.map +1 -0
  396. package/dist/modules/workflow/workflow.routes.js +804 -0
  397. package/dist/modules/workflow/workflow.routes.js.map +1 -0
  398. package/dist/modules/workflow/workflow.service.d.ts +385 -0
  399. package/dist/modules/workflow/workflow.service.d.ts.map +1 -0
  400. package/dist/modules/workflow/workflow.service.js +1155 -0
  401. package/dist/modules/workflow/workflow.service.js.map +1 -0
  402. package/dist/modules/workspace/bevel-ignore.d.ts +25 -0
  403. package/dist/modules/workspace/bevel-ignore.d.ts.map +1 -0
  404. package/dist/modules/workspace/bevel-ignore.js +57 -0
  405. package/dist/modules/workspace/bevel-ignore.js.map +1 -0
  406. package/dist/modules/workspace/kb-seed.interface.d.ts +36 -0
  407. package/dist/modules/workspace/kb-seed.interface.d.ts.map +1 -0
  408. package/dist/modules/workspace/kb-seed.interface.js +2 -0
  409. package/dist/modules/workspace/kb-seed.interface.js.map +1 -0
  410. package/dist/modules/workspace/kb-seed.service.d.ts +70 -0
  411. package/dist/modules/workspace/kb-seed.service.d.ts.map +1 -0
  412. package/dist/modules/workspace/kb-seed.service.js +325 -0
  413. package/dist/modules/workspace/kb-seed.service.js.map +1 -0
  414. package/dist/modules/workspace/routine-write-policy.d.ts +49 -0
  415. package/dist/modules/workspace/routine-write-policy.d.ts.map +1 -0
  416. package/dist/modules/workspace/routine-write-policy.js +46 -0
  417. package/dist/modules/workspace/routine-write-policy.js.map +1 -0
  418. package/dist/modules/workspace/session-ontology.gate.d.ts +112 -0
  419. package/dist/modules/workspace/session-ontology.gate.d.ts.map +1 -0
  420. package/dist/modules/workspace/session-ontology.gate.js +161 -0
  421. package/dist/modules/workspace/session-ontology.gate.js.map +1 -0
  422. package/dist/modules/workspace/session-sink.d.ts +25 -0
  423. package/dist/modules/workspace/session-sink.d.ts.map +1 -0
  424. package/dist/modules/workspace/session-sink.js +8 -0
  425. package/dist/modules/workspace/session-sink.js.map +1 -0
  426. package/dist/modules/workspace/spill-store.d.ts +24 -0
  427. package/dist/modules/workspace/spill-store.d.ts.map +1 -0
  428. package/dist/modules/workspace/spill-store.js +87 -0
  429. package/dist/modules/workspace/spill-store.js.map +1 -0
  430. package/dist/modules/workspace/workspace.routes.d.ts +25 -0
  431. package/dist/modules/workspace/workspace.routes.d.ts.map +1 -0
  432. package/dist/modules/workspace/workspace.routes.js +1046 -0
  433. package/dist/modules/workspace/workspace.routes.js.map +1 -0
  434. package/dist/modules/workspace/workspace.service.d.ts +339 -0
  435. package/dist/modules/workspace/workspace.service.d.ts.map +1 -0
  436. package/dist/modules/workspace/workspace.service.js +1221 -0
  437. package/dist/modules/workspace/workspace.service.js.map +1 -0
  438. package/dist/modules/workspace/workspace.tools.d.ts +19 -0
  439. package/dist/modules/workspace/workspace.tools.d.ts.map +1 -0
  440. package/dist/modules/workspace/workspace.tools.js +767 -0
  441. package/dist/modules/workspace/workspace.tools.js.map +1 -0
  442. package/dist/shared/frontmatter-id.d.ts +35 -0
  443. package/dist/shared/frontmatter-id.d.ts.map +1 -0
  444. package/dist/shared/frontmatter-id.js +68 -0
  445. package/dist/shared/frontmatter-id.js.map +1 -0
  446. package/dist/shared/fs-walk.d.ts +9 -0
  447. package/dist/shared/fs-walk.d.ts.map +1 -0
  448. package/dist/shared/fs-walk.js +34 -0
  449. package/dist/shared/fs-walk.js.map +1 -0
  450. package/dist/shared/hash-email.d.ts +11 -0
  451. package/dist/shared/hash-email.d.ts.map +1 -0
  452. package/dist/shared/hash-email.js +14 -0
  453. package/dist/shared/hash-email.js.map +1 -0
  454. package/dist/shared/kb-layout.d.ts +38 -0
  455. package/dist/shared/kb-layout.d.ts.map +1 -0
  456. package/dist/shared/kb-layout.js +102 -0
  457. package/dist/shared/kb-layout.js.map +1 -0
  458. package/dist/shared/kb-layout.test.d.ts +2 -0
  459. package/dist/shared/kb-layout.test.d.ts.map +1 -0
  460. package/dist/shared/kb-layout.test.js +67 -0
  461. package/dist/shared/kb-layout.test.js.map +1 -0
  462. package/dist/shared/ssrf.d.ts +20 -0
  463. package/dist/shared/ssrf.d.ts.map +1 -0
  464. package/dist/shared/ssrf.js +89 -0
  465. package/dist/shared/ssrf.js.map +1 -0
  466. package/dist/shared/token-crypto.d.ts +16 -0
  467. package/dist/shared/token-crypto.d.ts.map +1 -0
  468. package/dist/shared/token-crypto.js +49 -0
  469. package/dist/shared/token-crypto.js.map +1 -0
  470. package/dist/shared/ttl-cache.d.ts +16 -0
  471. package/dist/shared/ttl-cache.d.ts.map +1 -0
  472. package/dist/shared/ttl-cache.js +27 -0
  473. package/dist/shared/ttl-cache.js.map +1 -0
  474. package/dist/shared/utcp-namespace.d.ts +46 -0
  475. package/dist/shared/utcp-namespace.d.ts.map +1 -0
  476. package/dist/shared/utcp-namespace.js +82 -0
  477. package/dist/shared/utcp-namespace.js.map +1 -0
  478. package/dist/version.d.ts +17 -0
  479. package/dist/version.d.ts.map +1 -0
  480. package/dist/version.js +19 -0
  481. package/dist/version.js.map +1 -0
  482. package/kb-template/.bevelignore +21 -0
  483. package/kb-template/Agents/.gitkeep +0 -0
  484. package/kb-template/Agents/README.md +38 -0
  485. package/kb-template/CLAUDE.md +419 -0
  486. package/kb-template/Data/.gitkeep +0 -0
  487. package/kb-template/Data/README.md +39 -0
  488. package/kb-template/KnowledgeBase/.gitkeep +0 -0
  489. package/kb-template/KnowledgeBase/README.md +37 -0
  490. package/kb-template/Pipelines/.gitkeep +0 -0
  491. package/kb-template/Pipelines/README.md +38 -0
  492. package/kb-template/Skills/.gitkeep +0 -0
  493. package/kb-template/Skills/README.md +32 -0
  494. package/kb-template/Tools/.gitkeep +0 -0
  495. package/kb-template/Tools/README.md +42 -0
  496. package/kb-template/access.md +36 -0
  497. package/migrations/0000_core_init.sql +243 -0
  498. package/migrations/meta/0000_snapshot.json +1480 -0
  499. package/migrations/meta/_journal.json +13 -0
  500. package/package.json +80 -0
  501. package/src/assets.ts +25 -0
  502. package/src/core/core-ports.ts +91 -0
  503. package/src/core/create-core-server.ts +338 -0
  504. package/src/core/create-core-services.ts +501 -0
  505. package/src/core-config.ts +257 -0
  506. package/src/index.ts +69 -0
  507. package/src/modules/access/__tests__/access-control.atref-batch.test.ts +98 -0
  508. package/src/modules/access/__tests__/access-control.read-batch.test.ts +132 -0
  509. package/src/modules/access/__tests__/access-control.service.test.ts +1011 -0
  510. package/src/modules/access/__tests__/access-mutation.service.test.ts +439 -0
  511. package/src/modules/access/__tests__/access-splice.test.ts +247 -0
  512. package/src/modules/access/__tests__/access.routes.revoke.test.ts +407 -0
  513. package/src/modules/access/__tests__/creator-access.test.ts +217 -0
  514. package/src/modules/access/__tests__/grant-sources.test.ts +204 -0
  515. package/src/modules/access/__tests__/kb-read-filter.test.ts +70 -0
  516. package/src/modules/access/__tests__/roles-admin.service.test.ts +469 -0
  517. package/src/modules/access/__tests__/roles-edit.test.ts +138 -0
  518. package/src/modules/access/__tests__/roles-yaml-guard.test.ts +70 -0
  519. package/src/modules/access/__tests__/roles.routes.test.ts +234 -0
  520. package/src/modules/access/access-control.interface.ts +383 -0
  521. package/src/modules/access/access-control.service.ts +1794 -0
  522. package/src/modules/access/access-errors.ts +60 -0
  523. package/src/modules/access/access-mutation.service.ts +369 -0
  524. package/src/modules/access/access-splice.ts +413 -0
  525. package/src/modules/access/access.routes.ts +894 -0
  526. package/src/modules/access/creator-access.ts +270 -0
  527. package/src/modules/access/kb-read-filter.ts +76 -0
  528. package/src/modules/access/roles-admin.service.ts +741 -0
  529. package/src/modules/access/roles-edit.ts +248 -0
  530. package/src/modules/access/roles-yaml-guard.ts +89 -0
  531. package/src/modules/admin/admin-access.routes.ts +29 -0
  532. package/src/modules/admin/admin-access.service.ts +38 -0
  533. package/src/modules/admin/admin.interface.ts +10 -0
  534. package/src/modules/auth/account-erasure.service.ts +183 -0
  535. package/src/modules/auth/auth.middleware.ts +78 -0
  536. package/src/modules/auth/auth.routes.ts +97 -0
  537. package/src/modules/auth/auth.service.ts +199 -0
  538. package/src/modules/code-mode/code-mode-names.ts +38 -0
  539. package/src/modules/code-mode/code-mode.tool.ts +117 -0
  540. package/src/modules/code-mode/index.ts +6 -0
  541. package/src/modules/database/connection.ts +15 -0
  542. package/src/modules/database/core-schema.ts +431 -0
  543. package/src/modules/database/migrate.ts +43 -0
  544. package/src/modules/database/schema.ts +11 -0
  545. package/src/modules/diff/__tests__/diff.routes.read-gate.test.ts +87 -0
  546. package/src/modules/diff/__tests__/diff.routes.rejectPathsLocked.test.ts +150 -0
  547. package/src/modules/diff/__tests__/diff.service.seed-atomicity.test.ts +184 -0
  548. package/src/modules/diff/__tests__/diff.service.test.ts +202 -0
  549. package/src/modules/diff/diff-paths.ts +9 -0
  550. package/src/modules/diff/diff.config.ts +12 -0
  551. package/src/modules/diff/diff.interface.ts +78 -0
  552. package/src/modules/diff/diff.routes.ts +277 -0
  553. package/src/modules/diff/diff.service.ts +508 -0
  554. package/src/modules/diff/line-diff.ts +79 -0
  555. package/src/modules/mcp/__tests__/bevel-oauth-provider.test.ts +287 -0
  556. package/src/modules/mcp/__tests__/mcp-auth.middleware.test.ts +249 -0
  557. package/src/modules/mcp/__tests__/mcp-proxy-helpers.test.ts +253 -0
  558. package/src/modules/mcp/__tests__/mcp-session-store.test.ts +151 -0
  559. package/src/modules/mcp/__tests__/mcp.e2e.test.ts +150 -0
  560. package/src/modules/mcp/__tests__/mcp.routes.delete.test.ts +92 -0
  561. package/src/modules/mcp/__tests__/mcp.service.test.ts +414 -0
  562. package/src/modules/mcp/mcp-auth.middleware.ts +126 -0
  563. package/src/modules/mcp/mcp-session-store.ts +162 -0
  564. package/src/modules/mcp/mcp.routes.ts +263 -0
  565. package/src/modules/mcp/mcp.service.ts +973 -0
  566. package/src/modules/mcp/oauth/bevel-oauth-provider.ts +401 -0
  567. package/src/modules/mcp/oauth/oauth-consent.routes.ts +60 -0
  568. package/src/modules/mcp/oauth/oauth-state.ts +61 -0
  569. package/src/modules/secrets-vault/__tests__/connect-pending.route.test.ts +277 -0
  570. package/src/modules/secrets-vault/__tests__/db-secrets-vault.oauth.test.ts +206 -0
  571. package/src/modules/secrets-vault/__tests__/mcp-oauth-discovery.service.test.ts +178 -0
  572. package/src/modules/secrets-vault/__tests__/scopes-covered.test.ts +101 -0
  573. package/src/modules/secrets-vault/__tests__/secrets-variable-loader.test.ts +54 -0
  574. package/src/modules/secrets-vault/__tests__/tool-owner-gate.route.test.ts +143 -0
  575. package/src/modules/secrets-vault/db-secrets-vault.service.ts +792 -0
  576. package/src/modules/secrets-vault/index.ts +25 -0
  577. package/src/modules/secrets-vault/mcp-oauth-discovery.service.ts +289 -0
  578. package/src/modules/secrets-vault/secrets-variable-loader.ts +104 -0
  579. package/src/modules/secrets-vault/secrets-vault.contract.ts +270 -0
  580. package/src/modules/secrets-vault/secrets-vault.routes.ts +526 -0
  581. package/src/modules/skills/__tests__/skills.service.test.ts +176 -0
  582. package/src/modules/skills/index.ts +10 -0
  583. package/src/modules/skills/skills.contract.ts +54 -0
  584. package/src/modules/skills/skills.routes.ts +38 -0
  585. package/src/modules/skills/skills.service.ts +245 -0
  586. package/src/modules/skills/skills.tools.ts +121 -0
  587. package/src/modules/tool-auth/__tests__/external-api-key.service.test.ts +358 -0
  588. package/src/modules/tool-auth/__tests__/internal-token.service.test.ts +79 -0
  589. package/src/modules/tool-auth/__tests__/manual-auth.middleware.test.ts +88 -0
  590. package/src/modules/tool-auth/external-api-key.errors.ts +25 -0
  591. package/src/modules/tool-auth/external-api-key.interface.ts +99 -0
  592. package/src/modules/tool-auth/external-api-key.service.ts +209 -0
  593. package/src/modules/tool-auth/internal-token.service.ts +124 -0
  594. package/src/modules/tool-auth/llm-usage-meter.ts +19 -0
  595. package/src/modules/tool-auth/tool-auth.middleware.ts +220 -0
  596. package/src/modules/tool-helpers/__tests__/phase0-loopback-spike.test.ts +129 -0
  597. package/src/modules/tool-helpers/__tests__/phase4-tools.test.ts +95 -0
  598. package/src/modules/tool-helpers/__tests__/tools-surface.test.ts +146 -0
  599. package/src/modules/tool-helpers/__tests__/validate-token.test.ts +75 -0
  600. package/src/modules/tool-helpers/index.ts +18 -0
  601. package/src/modules/tool-helpers/tool-context.ts +98 -0
  602. package/src/modules/tool-helpers/tool-def.ts +73 -0
  603. package/src/modules/tool-helpers/tool-handler.ts +91 -0
  604. package/src/modules/tool-helpers/tool.contract.ts +85 -0
  605. package/src/modules/tool-helpers/validate-token.ts +50 -0
  606. package/src/modules/tool-manuals/__tests__/tool-manuals.mcp-oauth.test.ts +200 -0
  607. package/src/modules/tool-manuals/__tests__/tool-manuals.service.test.ts +499 -0
  608. package/src/modules/tool-manuals/__tests__/tool-manuals.tools.test.ts +156 -0
  609. package/src/modules/tool-manuals/index.ts +12 -0
  610. package/src/modules/tool-manuals/tool-manuals.contract.ts +183 -0
  611. package/src/modules/tool-manuals/tool-manuals.routes.ts +110 -0
  612. package/src/modules/tool-manuals/tool-manuals.service.ts +781 -0
  613. package/src/modules/tool-manuals/tool-manuals.tools.ts +202 -0
  614. package/src/modules/tool-registry/__tests__/tool-registry.test.ts +64 -0
  615. package/src/modules/tool-registry/manual.routes.ts +87 -0
  616. package/src/modules/tool-registry/tool-registry.ts +55 -0
  617. package/src/modules/tool-registry/tool.contract.ts +52 -0
  618. package/src/modules/workflow/__tests__/event-bus.test.ts +322 -0
  619. package/src/modules/workflow/__tests__/file-change-notifier.test.ts +51 -0
  620. package/src/modules/workflow/__tests__/format-affected-owners.test.ts +67 -0
  621. package/src/modules/workflow/__tests__/locking-filesystem.test.ts +445 -0
  622. package/src/modules/workflow/__tests__/pending-commits.canonical.test.ts +36 -0
  623. package/src/modules/workflow/__tests__/pending-commits.worker.test.ts +243 -0
  624. package/src/modules/workflow/__tests__/preserve-roles-yaml.test.ts +308 -0
  625. package/src/modules/workflow/__tests__/sanitize-error.test.ts +67 -0
  626. package/src/modules/workflow/__tests__/session-ontology.policy.test.ts +62 -0
  627. package/src/modules/workflow/__tests__/session-ontology.service.test.ts +200 -0
  628. package/src/modules/workflow/__tests__/workflow.service.commitFileWhileLocked.test.ts +232 -0
  629. package/src/modules/workflow/__tests__/workflow.service.facade.test.ts +380 -0
  630. package/src/modules/workflow/__tests__/workflow.service.releaseLock.test.ts +340 -0
  631. package/src/modules/workflow/agent-tools/__tests__/workflow.tools.test.ts +192 -0
  632. package/src/modules/workflow/agent-tools/workflow.tools.ts +502 -0
  633. package/src/modules/workflow/event-bus.ts +262 -0
  634. package/src/modules/workflow/events.routes.ts +266 -0
  635. package/src/modules/workflow/file-change-notifier.ts +54 -0
  636. package/src/modules/workflow/file-lock.service.ts +269 -0
  637. package/src/modules/workflow/git/__tests__/branch-name.test.ts +86 -0
  638. package/src/modules/workflow/git/__tests__/branchAuthor.test.ts +80 -0
  639. package/src/modules/workflow/git/__tests__/clone-config.test.ts +15 -0
  640. package/src/modules/workflow/git/__tests__/git-test-helpers.ts +47 -0
  641. package/src/modules/workflow/git/__tests__/git-version.failure.test.ts +24 -0
  642. package/src/modules/workflow/git/__tests__/git-version.test.ts +49 -0
  643. package/src/modules/workflow/git/__tests__/git.service.accessGating.test.ts +389 -0
  644. package/src/modules/workflow/git/__tests__/git.service.changedFilesForPr.test.ts +124 -0
  645. package/src/modules/workflow/git/__tests__/git.service.commitChanges.test.ts +105 -0
  646. package/src/modules/workflow/git/__tests__/git.service.commitFile.test.ts +211 -0
  647. package/src/modules/workflow/git/__tests__/git.service.createBranch.test.ts +154 -0
  648. package/src/modules/workflow/git/__tests__/git.service.deleteBranch.test.ts +320 -0
  649. package/src/modules/workflow/git/__tests__/git.service.diffFileAtCommit.test.ts +202 -0
  650. package/src/modules/workflow/git/__tests__/git.service.diffFileBetweenBranches.test.ts +453 -0
  651. package/src/modules/workflow/git/__tests__/git.service.list-branches.test.ts +198 -0
  652. package/src/modules/workflow/git/__tests__/git.service.listTrackedFiles.test.ts +125 -0
  653. package/src/modules/workflow/git/__tests__/git.service.logForFile.test.ts +219 -0
  654. package/src/modules/workflow/git/__tests__/git.service.mergeChangeRequest.test.ts +145 -0
  655. package/src/modules/workflow/git/__tests__/git.service.pendingChanges.test.ts +240 -0
  656. package/src/modules/workflow/git/__tests__/git.service.postMergePull.test.ts +272 -0
  657. package/src/modules/workflow/git/__tests__/git.service.pull.test.ts +232 -0
  658. package/src/modules/workflow/git/__tests__/git.service.readFileAtRef.test.ts +101 -0
  659. package/src/modules/workflow/git/__tests__/git.service.status.test.ts +127 -0
  660. package/src/modules/workflow/git/__tests__/mutex.test.ts +78 -0
  661. package/src/modules/workflow/git/__tests__/pull-request.service.test.ts +225 -0
  662. package/src/modules/workflow/git/__tests__/pull-request.service.viewer-can-cancel.test.ts +101 -0
  663. package/src/modules/workflow/git/branch-name.ts +70 -0
  664. package/src/modules/workflow/git/clone-config.ts +71 -0
  665. package/src/modules/workflow/git/git-version.ts +70 -0
  666. package/src/modules/workflow/git/git.service.ts +2248 -0
  667. package/src/modules/workflow/git/mutex.ts +22 -0
  668. package/src/modules/workflow/git/pull-request.service.ts +447 -0
  669. package/src/modules/workflow/locking-filesystem.ts +489 -0
  670. package/src/modules/workflow/pending-commits.service.ts +444 -0
  671. package/src/modules/workflow/pending-commits.worker.ts +361 -0
  672. package/src/modules/workflow/read-only-filesystem.ts +54 -0
  673. package/src/modules/workflow/recovery-bot.ts +73 -0
  674. package/src/modules/workflow/review-workflow/__tests__/approval-states.test.ts +560 -0
  675. package/src/modules/workflow/review-workflow/__tests__/cancel-pr.test.ts +176 -0
  676. package/src/modules/workflow/review-workflow/__tests__/merge-gate.test.ts +258 -0
  677. package/src/modules/workflow/review-workflow/review-workflow.interface.ts +199 -0
  678. package/src/modules/workflow/review-workflow/review-workflow.service.ts +806 -0
  679. package/src/modules/workflow/sanitize-error.ts +62 -0
  680. package/src/modules/workflow/session-ontology.policy.ts +70 -0
  681. package/src/modules/workflow/session-ontology.service.ts +178 -0
  682. package/src/modules/workflow/workflow-hooks.ts +101 -0
  683. package/src/modules/workflow/workflow.errors.ts +285 -0
  684. package/src/modules/workflow/workflow.routes.ts +858 -0
  685. package/src/modules/workflow/workflow.service.ts +1555 -0
  686. package/src/modules/workspace/__tests__/kb-seed.service.test.ts +213 -0
  687. package/src/modules/workspace/__tests__/routine-write-policy.test.ts +68 -0
  688. package/src/modules/workspace/__tests__/session-ontology.gate.test.ts +237 -0
  689. package/src/modules/workspace/__tests__/spill-store.test.ts +43 -0
  690. package/src/modules/workspace/__tests__/workspace.routes.create-grant.test.ts +233 -0
  691. package/src/modules/workspace/__tests__/workspace.routes.delete.test.ts +176 -0
  692. package/src/modules/workspace/__tests__/workspace.routes.download.test.ts +303 -0
  693. package/src/modules/workspace/__tests__/workspace.routes.read-gate.test.ts +276 -0
  694. package/src/modules/workspace/__tests__/workspace.service.read-filter.test.ts +120 -0
  695. package/src/modules/workspace/__tests__/workspace.service.test.ts +565 -0
  696. package/src/modules/workspace/__tests__/workspace.tools.test.ts +504 -0
  697. package/src/modules/workspace/bevel-ignore.ts +62 -0
  698. package/src/modules/workspace/kb-seed.interface.ts +36 -0
  699. package/src/modules/workspace/kb-seed.service.ts +361 -0
  700. package/src/modules/workspace/routine-write-policy.ts +79 -0
  701. package/src/modules/workspace/session-ontology.gate.ts +189 -0
  702. package/src/modules/workspace/session-sink.ts +25 -0
  703. package/src/modules/workspace/spill-store.ts +87 -0
  704. package/src/modules/workspace/workspace.routes.ts +1114 -0
  705. package/src/modules/workspace/workspace.service.ts +1343 -0
  706. package/src/modules/workspace/workspace.tools.ts +885 -0
  707. package/src/shared/__tests__/frontmatter-id.test.ts +88 -0
  708. package/src/shared/__tests__/fs-walk.test.ts +42 -0
  709. package/src/shared/__tests__/ssrf.test.ts +53 -0
  710. package/src/shared/__tests__/utcp-namespace.test.ts +19 -0
  711. package/src/shared/frontmatter-id.ts +72 -0
  712. package/src/shared/fs-walk.ts +30 -0
  713. package/src/shared/hash-email.ts +14 -0
  714. package/src/shared/kb-layout.test.ts +88 -0
  715. package/src/shared/kb-layout.ts +101 -0
  716. package/src/shared/ssrf.ts +78 -0
  717. package/src/shared/token-crypto.ts +54 -0
  718. package/src/shared/ttl-cache.ts +27 -0
  719. package/src/shared/utcp-namespace.ts +88 -0
  720. package/src/version.ts +19 -0
@@ -0,0 +1,1480 @@
1
+ {
2
+ "id": "4ad00bfe-9859-4cec-a0d3-c1fe652e43cc",
3
+ "prevId": "00000000-0000-0000-0000-000000000000",
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
+ "created_at": {
1438
+ "name": "created_at",
1439
+ "type": "timestamp",
1440
+ "primaryKey": false,
1441
+ "notNull": true,
1442
+ "default": "now()"
1443
+ },
1444
+ "updated_at": {
1445
+ "name": "updated_at",
1446
+ "type": "timestamp",
1447
+ "primaryKey": false,
1448
+ "notNull": true,
1449
+ "default": "now()"
1450
+ }
1451
+ },
1452
+ "indexes": {},
1453
+ "foreignKeys": {},
1454
+ "compositePrimaryKeys": {},
1455
+ "uniqueConstraints": {
1456
+ "users_email_unique": {
1457
+ "name": "users_email_unique",
1458
+ "nullsNotDistinct": false,
1459
+ "columns": [
1460
+ "email"
1461
+ ]
1462
+ }
1463
+ },
1464
+ "policies": {},
1465
+ "checkConstraints": {},
1466
+ "isRLSEnabled": false
1467
+ }
1468
+ },
1469
+ "enums": {},
1470
+ "schemas": {},
1471
+ "sequences": {},
1472
+ "roles": {},
1473
+ "policies": {},
1474
+ "views": {},
1475
+ "_meta": {
1476
+ "columns": {},
1477
+ "schemas": {},
1478
+ "tables": {}
1479
+ }
1480
+ }