@bevel-software/platform-core-backend 0.33.0 → 0.34.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 (497) hide show
  1. package/agent-guide/access-control.md +19 -8
  2. package/agent-guide/html-views.md +231 -5
  3. package/agent-guide/tool-manuals.md +1 -1
  4. package/dist/core/catalog-revision.d.ts +12 -1
  5. package/dist/core/catalog-revision.d.ts.map +1 -1
  6. package/dist/core/catalog-revision.js +23 -3
  7. package/dist/core/catalog-revision.js.map +1 -1
  8. package/dist/core/core-ports.d.ts +41 -0
  9. package/dist/core/core-ports.d.ts.map +1 -1
  10. package/dist/core/core-ports.js.map +1 -1
  11. package/dist/core/create-core-server.d.ts.map +1 -1
  12. package/dist/core/create-core-server.js +14 -7
  13. package/dist/core/create-core-server.js.map +1 -1
  14. package/dist/core/create-core-services.d.ts +16 -5
  15. package/dist/core/create-core-services.d.ts.map +1 -1
  16. package/dist/core/create-core-services.js +37 -12
  17. package/dist/core/create-core-services.js.map +1 -1
  18. package/dist/core/lifecycle.d.ts +16 -0
  19. package/dist/core/lifecycle.d.ts.map +1 -1
  20. package/dist/core/lifecycle.js +12 -2
  21. package/dist/core/lifecycle.js.map +1 -1
  22. package/dist/index.d.ts +1 -1
  23. package/dist/index.d.ts.map +1 -1
  24. package/dist/index.js.map +1 -1
  25. package/dist/modules/access/access-control.interface.d.ts +17 -9
  26. package/dist/modules/access/access-control.interface.d.ts.map +1 -1
  27. package/dist/modules/access/access-control.service.d.ts +12 -2
  28. package/dist/modules/access/access-control.service.d.ts.map +1 -1
  29. package/dist/modules/access/access-control.service.js +164 -75
  30. package/dist/modules/access/access-control.service.js.map +1 -1
  31. package/dist/modules/access/access-mutation.service.d.ts +22 -24
  32. package/dist/modules/access/access-mutation.service.d.ts.map +1 -1
  33. package/dist/modules/access/access-mutation.service.js +48 -51
  34. package/dist/modules/access/access-mutation.service.js.map +1 -1
  35. package/dist/modules/access/access-view.d.ts.map +1 -1
  36. package/dist/modules/access/access-view.js +12 -11
  37. package/dist/modules/access/access-view.js.map +1 -1
  38. package/dist/modules/access/access.routes.d.ts +3 -0
  39. package/dist/modules/access/access.routes.d.ts.map +1 -1
  40. package/dist/modules/access/access.routes.js +35 -29
  41. package/dist/modules/access/access.routes.js.map +1 -1
  42. package/dist/modules/access/groups-admin.routes.d.ts.map +1 -1
  43. package/dist/modules/access/groups-admin.routes.js +4 -2
  44. package/dist/modules/access/groups-admin.routes.js.map +1 -1
  45. package/dist/modules/access/groups-admin.service.d.ts +44 -13
  46. package/dist/modules/access/groups-admin.service.d.ts.map +1 -1
  47. package/dist/modules/access/groups-admin.service.js +80 -38
  48. package/dist/modules/access/groups-admin.service.js.map +1 -1
  49. package/dist/modules/access/groups-edit.d.ts +1 -1
  50. package/dist/modules/access/groups-edit.d.ts.map +1 -1
  51. package/dist/modules/access/groups-edit.js +1 -1
  52. package/dist/modules/access/groups-edit.js.map +1 -1
  53. package/dist/modules/access/reference-scan.d.ts +116 -24
  54. package/dist/modules/access/reference-scan.d.ts.map +1 -1
  55. package/dist/modules/access/reference-scan.js +305 -44
  56. package/dist/modules/access/reference-scan.js.map +1 -1
  57. package/dist/modules/access/roles-admin.service.d.ts +17 -8
  58. package/dist/modules/access/roles-admin.service.d.ts.map +1 -1
  59. package/dist/modules/access/roles-admin.service.js +32 -23
  60. package/dist/modules/access/roles-admin.service.js.map +1 -1
  61. package/dist/modules/access-model/access-grammar.d.ts +35 -10
  62. package/dist/modules/access-model/access-grammar.d.ts.map +1 -1
  63. package/dist/modules/access-model/access-grammar.js +60 -20
  64. package/dist/modules/access-model/access-grammar.js.map +1 -1
  65. package/dist/modules/access-model/access-splice.d.ts +22 -18
  66. package/dist/modules/access-model/access-splice.d.ts.map +1 -1
  67. package/dist/modules/access-model/access-splice.js +20 -14
  68. package/dist/modules/access-model/access-splice.js.map +1 -1
  69. package/dist/modules/access-model/group-files.d.ts +1 -0
  70. package/dist/modules/access-model/group-files.d.ts.map +1 -1
  71. package/dist/modules/access-model/group-files.js +5 -1
  72. package/dist/modules/access-model/group-files.js.map +1 -1
  73. package/dist/modules/agent-guide/agent-guide.tools.d.ts.map +1 -1
  74. package/dist/modules/agent-guide/agent-guide.tools.js +13 -3
  75. package/dist/modules/agent-guide/agent-guide.tools.js.map +1 -1
  76. package/dist/modules/agent-instructions/compose.d.ts +3 -1
  77. package/dist/modules/agent-instructions/compose.d.ts.map +1 -1
  78. package/dist/modules/agent-instructions/compose.js +3 -1
  79. package/dist/modules/agent-instructions/compose.js.map +1 -1
  80. package/dist/modules/agent-instructions/shared-file-rules.d.ts +5 -1
  81. package/dist/modules/agent-instructions/shared-file-rules.d.ts.map +1 -1
  82. package/dist/modules/agent-instructions/shared-file-rules.js +16 -1
  83. package/dist/modules/agent-instructions/shared-file-rules.js.map +1 -1
  84. package/dist/modules/agent-scope/agent-scope.contract.d.ts +67 -0
  85. package/dist/modules/agent-scope/agent-scope.contract.d.ts.map +1 -0
  86. package/dist/modules/agent-scope/agent-scope.contract.js +27 -0
  87. package/dist/modules/agent-scope/agent-scope.contract.js.map +1 -0
  88. package/dist/modules/agent-scope/connection-scope.d.ts +111 -0
  89. package/dist/modules/agent-scope/connection-scope.d.ts.map +1 -0
  90. package/dist/modules/agent-scope/connection-scope.js +165 -0
  91. package/dist/modules/agent-scope/connection-scope.js.map +1 -0
  92. package/dist/modules/agent-scope/index.d.ts +3 -0
  93. package/dist/modules/agent-scope/index.d.ts.map +1 -0
  94. package/dist/modules/agent-scope/index.js +3 -0
  95. package/dist/modules/agent-scope/index.js.map +1 -0
  96. package/dist/modules/audit/agent-audit.service.d.ts.map +1 -1
  97. package/dist/modules/audit/agent-audit.service.js +2 -0
  98. package/dist/modules/audit/agent-audit.service.js.map +1 -1
  99. package/dist/modules/audit/audit.contract.d.ts +6 -0
  100. package/dist/modules/audit/audit.contract.d.ts.map +1 -1
  101. package/dist/modules/audit/audit.contract.js.map +1 -1
  102. package/dist/modules/auth/account-admission.d.ts +12 -0
  103. package/dist/modules/auth/account-admission.d.ts.map +1 -1
  104. package/dist/modules/auth/account-admission.js +15 -0
  105. package/dist/modules/auth/account-admission.js.map +1 -1
  106. package/dist/modules/auth/auth.middleware.d.ts +27 -1
  107. package/dist/modules/auth/auth.middleware.d.ts.map +1 -1
  108. package/dist/modules/auth/auth.middleware.js +42 -4
  109. package/dist/modules/auth/auth.middleware.js.map +1 -1
  110. package/dist/modules/auth/auth.routes.d.ts +13 -9
  111. package/dist/modules/auth/auth.routes.d.ts.map +1 -1
  112. package/dist/modules/auth/auth.routes.js +35 -29
  113. package/dist/modules/auth/auth.routes.js.map +1 -1
  114. package/dist/modules/auth/auth.service.d.ts +55 -6
  115. package/dist/modules/auth/auth.service.d.ts.map +1 -1
  116. package/dist/modules/auth/auth.service.js +128 -34
  117. package/dist/modules/auth/auth.service.js.map +1 -1
  118. package/dist/modules/auth/index.d.ts +1 -1
  119. package/dist/modules/auth/index.d.ts.map +1 -1
  120. package/dist/modules/auth/index.js +1 -1
  121. package/dist/modules/auth/index.js.map +1 -1
  122. package/dist/modules/auth/oidc-auth-provider.d.ts.map +1 -1
  123. package/dist/modules/auth/oidc-auth-provider.js +2 -9
  124. package/dist/modules/auth/oidc-auth-provider.js.map +1 -1
  125. package/dist/modules/database/core-schema.d.ts +68 -0
  126. package/dist/modules/database/core-schema.d.ts.map +1 -1
  127. package/dist/modules/database/core-schema.js +33 -0
  128. package/dist/modules/database/core-schema.js.map +1 -1
  129. package/dist/modules/declared-variables/declared-variables.routes.d.ts +8 -1
  130. package/dist/modules/declared-variables/declared-variables.routes.d.ts.map +1 -1
  131. package/dist/modules/declared-variables/declared-variables.routes.js +13 -2
  132. package/dist/modules/declared-variables/declared-variables.routes.js.map +1 -1
  133. package/dist/modules/embed/embed.tools.d.ts.map +1 -1
  134. package/dist/modules/embed/embed.tools.js +5 -0
  135. package/dist/modules/embed/embed.tools.js.map +1 -1
  136. package/dist/modules/kb-fs/index.d.ts +2 -0
  137. package/dist/modules/kb-fs/index.d.ts.map +1 -1
  138. package/dist/modules/kb-fs/index.js +1 -0
  139. package/dist/modules/kb-fs/index.js.map +1 -1
  140. package/dist/modules/kb-fs/locking-filesystem.d.ts.map +1 -1
  141. package/dist/modules/kb-fs/locking-filesystem.js +7 -1
  142. package/dist/modules/kb-fs/locking-filesystem.js.map +1 -1
  143. package/dist/modules/kb-fs/repo-path.d.ts +26 -6
  144. package/dist/modules/kb-fs/repo-path.d.ts.map +1 -1
  145. package/dist/modules/kb-fs/repo-path.js +22 -7
  146. package/dist/modules/kb-fs/repo-path.js.map +1 -1
  147. package/dist/modules/kb-fs/tmp-ref.d.ts +36 -0
  148. package/dist/modules/kb-fs/tmp-ref.d.ts.map +1 -0
  149. package/dist/modules/kb-fs/tmp-ref.js +76 -0
  150. package/dist/modules/kb-fs/tmp-ref.js.map +1 -0
  151. package/dist/modules/mcp/mcp-auth.middleware.d.ts +7 -0
  152. package/dist/modules/mcp/mcp-auth.middleware.d.ts.map +1 -1
  153. package/dist/modules/mcp/mcp-auth.middleware.js +14 -1
  154. package/dist/modules/mcp/mcp-auth.middleware.js.map +1 -1
  155. package/dist/modules/mcp/mcp.routes.d.ts +7 -1
  156. package/dist/modules/mcp/mcp.routes.d.ts.map +1 -1
  157. package/dist/modules/mcp/mcp.routes.js +39 -4
  158. package/dist/modules/mcp/mcp.routes.js.map +1 -1
  159. package/dist/modules/mcp/mcp.service.d.ts +11 -0
  160. package/dist/modules/mcp/mcp.service.d.ts.map +1 -1
  161. package/dist/modules/mcp/mcp.service.js +68 -13
  162. package/dist/modules/mcp/mcp.service.js.map +1 -1
  163. package/dist/modules/mcp/oauth/bevel-oauth-provider.d.ts +24 -1
  164. package/dist/modules/mcp/oauth/bevel-oauth-provider.d.ts.map +1 -1
  165. package/dist/modules/mcp/oauth/bevel-oauth-provider.js +45 -10
  166. package/dist/modules/mcp/oauth/bevel-oauth-provider.js.map +1 -1
  167. package/dist/modules/mcp/oauth/oauth-consent.routes.d.ts +9 -0
  168. package/dist/modules/mcp/oauth/oauth-consent.routes.d.ts.map +1 -1
  169. package/dist/modules/mcp/oauth/oauth-consent.routes.js +34 -1
  170. package/dist/modules/mcp/oauth/oauth-consent.routes.js.map +1 -1
  171. package/dist/modules/plugins/index.d.ts +1 -1
  172. package/dist/modules/plugins/index.d.ts.map +1 -1
  173. package/dist/modules/plugins/index.js.map +1 -1
  174. package/dist/modules/plugins/plugin-links.d.ts +18 -2
  175. package/dist/modules/plugins/plugin-links.d.ts.map +1 -1
  176. package/dist/modules/plugins/plugin-links.js.map +1 -1
  177. package/dist/modules/plugins/plugins.routes.d.ts +5 -1
  178. package/dist/modules/plugins/plugins.routes.d.ts.map +1 -1
  179. package/dist/modules/plugins/plugins.routes.js +32 -5
  180. package/dist/modules/plugins/plugins.routes.js.map +1 -1
  181. package/dist/modules/secrets-vault/secrets-vault.routes.d.ts +9 -0
  182. package/dist/modules/secrets-vault/secrets-vault.routes.d.ts.map +1 -1
  183. package/dist/modules/secrets-vault/secrets-vault.routes.js +15 -3
  184. package/dist/modules/secrets-vault/secrets-vault.routes.js.map +1 -1
  185. package/dist/modules/skills/index.d.ts +3 -3
  186. package/dist/modules/skills/index.d.ts.map +1 -1
  187. package/dist/modules/skills/index.js +0 -2
  188. package/dist/modules/skills/index.js.map +1 -1
  189. package/dist/modules/skills/skills.contract.d.ts +16 -0
  190. package/dist/modules/skills/skills.contract.d.ts.map +1 -1
  191. package/dist/modules/skills/skills.service.d.ts.map +1 -1
  192. package/dist/modules/skills/skills.service.js +6 -1
  193. package/dist/modules/skills/skills.service.js.map +1 -1
  194. package/dist/modules/skills/skills.tools.d.ts.map +1 -1
  195. package/dist/modules/skills/skills.tools.js +24 -12
  196. package/dist/modules/skills/skills.tools.js.map +1 -1
  197. package/dist/modules/tool-auth/external-api-key.interface.d.ts +11 -0
  198. package/dist/modules/tool-auth/external-api-key.interface.d.ts.map +1 -1
  199. package/dist/modules/tool-auth/external-api-key.interface.js.map +1 -1
  200. package/dist/modules/tool-auth/external-api-key.service.d.ts +1 -0
  201. package/dist/modules/tool-auth/external-api-key.service.d.ts.map +1 -1
  202. package/dist/modules/tool-auth/external-api-key.service.js +4 -1
  203. package/dist/modules/tool-auth/external-api-key.service.js.map +1 -1
  204. package/dist/modules/tool-auth/index.d.ts +1 -1
  205. package/dist/modules/tool-auth/index.d.ts.map +1 -1
  206. package/dist/modules/tool-auth/internal-token.service.d.ts +9 -0
  207. package/dist/modules/tool-auth/internal-token.service.d.ts.map +1 -1
  208. package/dist/modules/tool-auth/internal-token.service.js +1 -0
  209. package/dist/modules/tool-auth/internal-token.service.js.map +1 -1
  210. package/dist/modules/tool-auth/tool-auth.middleware.d.ts +27 -3
  211. package/dist/modules/tool-auth/tool-auth.middleware.d.ts.map +1 -1
  212. package/dist/modules/tool-auth/tool-auth.middleware.js +32 -6
  213. package/dist/modules/tool-auth/tool-auth.middleware.js.map +1 -1
  214. package/dist/modules/tool-helpers/tool-context.d.ts +7 -0
  215. package/dist/modules/tool-helpers/tool-context.d.ts.map +1 -1
  216. package/dist/modules/tool-helpers/tool-context.js +3 -0
  217. package/dist/modules/tool-helpers/tool-context.js.map +1 -1
  218. package/dist/modules/tool-helpers/tool-handler.d.ts +15 -0
  219. package/dist/modules/tool-helpers/tool-handler.d.ts.map +1 -1
  220. package/dist/modules/tool-helpers/tool-handler.js +19 -0
  221. package/dist/modules/tool-helpers/tool-handler.js.map +1 -1
  222. package/dist/modules/tool-helpers/tool.contract.d.ts +10 -0
  223. package/dist/modules/tool-helpers/tool.contract.d.ts.map +1 -1
  224. package/dist/modules/tool-helpers/tool.contract.js.map +1 -1
  225. package/dist/modules/tool-helpers/validate-token.d.ts +3 -1
  226. package/dist/modules/tool-helpers/validate-token.d.ts.map +1 -1
  227. package/dist/modules/tool-helpers/validate-token.js +1 -1
  228. package/dist/modules/tool-helpers/validate-token.js.map +1 -1
  229. package/dist/modules/tool-manuals/index.d.ts +3 -3
  230. package/dist/modules/tool-manuals/index.d.ts.map +1 -1
  231. package/dist/modules/tool-manuals/index.js +0 -2
  232. package/dist/modules/tool-manuals/index.js.map +1 -1
  233. package/dist/modules/tool-manuals/tool-manuals.contract.d.ts +19 -6
  234. package/dist/modules/tool-manuals/tool-manuals.contract.d.ts.map +1 -1
  235. package/dist/modules/tool-manuals/tool-manuals.routes.d.ts +7 -1
  236. package/dist/modules/tool-manuals/tool-manuals.routes.d.ts.map +1 -1
  237. package/dist/modules/tool-manuals/tool-manuals.routes.js +41 -4
  238. package/dist/modules/tool-manuals/tool-manuals.routes.js.map +1 -1
  239. package/dist/modules/tool-manuals/tool-manuals.service.d.ts +13 -6
  240. package/dist/modules/tool-manuals/tool-manuals.service.d.ts.map +1 -1
  241. package/dist/modules/tool-manuals/tool-manuals.service.js +23 -15
  242. package/dist/modules/tool-manuals/tool-manuals.service.js.map +1 -1
  243. package/dist/modules/tool-manuals/tool-manuals.tools.d.ts.map +1 -1
  244. package/dist/modules/tool-manuals/tool-manuals.tools.js +25 -10
  245. package/dist/modules/tool-manuals/tool-manuals.tools.js.map +1 -1
  246. package/dist/modules/tool-registry/manual.routes.d.ts +8 -1
  247. package/dist/modules/tool-registry/manual.routes.d.ts.map +1 -1
  248. package/dist/modules/tool-registry/manual.routes.js +27 -7
  249. package/dist/modules/tool-registry/manual.routes.js.map +1 -1
  250. package/dist/modules/tool-registry/tool.contract.d.ts +7 -0
  251. package/dist/modules/tool-registry/tool.contract.d.ts.map +1 -1
  252. package/dist/modules/tool-registry/tool.contract.js.map +1 -1
  253. package/dist/modules/workflow/agent-tools/workflow.tools.d.ts.map +1 -1
  254. package/dist/modules/workflow/agent-tools/workflow.tools.js +14 -9
  255. package/dist/modules/workflow/agent-tools/workflow.tools.js.map +1 -1
  256. package/dist/modules/workflow/git/git.service.d.ts +2 -2
  257. package/dist/modules/workflow/git/git.service.d.ts.map +1 -1
  258. package/dist/modules/workflow/git/git.service.js +20 -35
  259. package/dist/modules/workflow/git/git.service.js.map +1 -1
  260. package/dist/modules/workflow/workflow.service.d.ts +2 -1
  261. package/dist/modules/workflow/workflow.service.d.ts.map +1 -1
  262. package/dist/modules/workflow/workflow.service.js +3 -0
  263. package/dist/modules/workflow/workflow.service.js.map +1 -1
  264. package/dist/modules/workspace/file-readers/doc-extract.service.d.ts +28 -4
  265. package/dist/modules/workspace/file-readers/doc-extract.service.d.ts.map +1 -1
  266. package/dist/modules/workspace/file-readers/doc-extract.service.js +61 -40
  267. package/dist/modules/workspace/file-readers/doc-extract.service.js.map +1 -1
  268. package/dist/modules/workspace/index.d.ts +8 -0
  269. package/dist/modules/workspace/index.d.ts.map +1 -1
  270. package/dist/modules/workspace/index.js +8 -0
  271. package/dist/modules/workspace/index.js.map +1 -1
  272. package/dist/modules/workspace/nul-scan.d.ts +19 -0
  273. package/dist/modules/workspace/nul-scan.d.ts.map +1 -0
  274. package/dist/modules/workspace/nul-scan.js +55 -0
  275. package/dist/modules/workspace/nul-scan.js.map +1 -0
  276. package/dist/modules/workspace/pattern-matcher.contract.d.ts +110 -27
  277. package/dist/modules/workspace/pattern-matcher.contract.d.ts.map +1 -1
  278. package/dist/modules/workspace/pattern-matcher.contract.js +30 -13
  279. package/dist/modules/workspace/pattern-matcher.contract.js.map +1 -1
  280. package/dist/modules/workspace/ripgrep-search.d.ts +54 -0
  281. package/dist/modules/workspace/ripgrep-search.d.ts.map +1 -0
  282. package/dist/modules/workspace/ripgrep-search.js +657 -0
  283. package/dist/modules/workspace/ripgrep-search.js.map +1 -0
  284. package/dist/modules/workspace/ripgrep-version.d.ts +15 -0
  285. package/dist/modules/workspace/ripgrep-version.d.ts.map +1 -0
  286. package/dist/modules/workspace/ripgrep-version.js +31 -0
  287. package/dist/modules/workspace/ripgrep-version.js.map +1 -0
  288. package/dist/modules/workspace/startup/beside-checkout.d.ts +8 -5
  289. package/dist/modules/workspace/startup/beside-checkout.d.ts.map +1 -1
  290. package/dist/modules/workspace/startup/beside-checkout.js +14 -5
  291. package/dist/modules/workspace/startup/beside-checkout.js.map +1 -1
  292. package/dist/modules/workspace/worker-pool.d.ts +3 -4
  293. package/dist/modules/workspace/worker-pool.d.ts.map +1 -1
  294. package/dist/modules/workspace/worker-pool.js.map +1 -1
  295. package/dist/modules/workspace/workspace-tmp.d.ts +146 -0
  296. package/dist/modules/workspace/workspace-tmp.d.ts.map +1 -0
  297. package/dist/modules/workspace/workspace-tmp.js +435 -0
  298. package/dist/modules/workspace/workspace-tmp.js.map +1 -0
  299. package/dist/modules/workspace/workspace.routes.d.ts.map +1 -1
  300. package/dist/modules/workspace/workspace.routes.js +5 -26
  301. package/dist/modules/workspace/workspace.routes.js.map +1 -1
  302. package/dist/modules/workspace/workspace.service.d.ts +47 -6
  303. package/dist/modules/workspace/workspace.service.d.ts.map +1 -1
  304. package/dist/modules/workspace/workspace.service.js +86 -6
  305. package/dist/modules/workspace/workspace.service.js.map +1 -1
  306. package/dist/modules/workspace/workspace.tools.d.ts.map +1 -1
  307. package/dist/modules/workspace/workspace.tools.js +460 -116
  308. package/dist/modules/workspace/workspace.tools.js.map +1 -1
  309. package/dist/shared/path-order.d.ts +28 -8
  310. package/dist/shared/path-order.d.ts.map +1 -1
  311. package/dist/shared/path-order.js +37 -8
  312. package/dist/shared/path-order.js.map +1 -1
  313. package/migrations/0022_session_version.sql +6 -0
  314. package/migrations/0023_agent_path.sql +3 -0
  315. package/migrations/meta/0022_snapshot.json +2360 -0
  316. package/migrations/meta/0023_snapshot.json +2378 -0
  317. package/migrations/meta/_journal.json +14 -0
  318. package/package.json +3 -3
  319. package/src/__tests__/pg-scratch.test.ts +69 -0
  320. package/src/__tests__/pg-scratch.ts +31 -0
  321. package/src/__tests__/slow-ripgrep.ts +65 -0
  322. package/src/core/__tests__/boot-without-ripgrep.test.ts +34 -0
  323. package/src/core/__tests__/catalog-revision.test.ts +89 -0
  324. package/src/core/__tests__/damaged-document.tools.test.ts +2 -2
  325. package/src/core/__tests__/gated-boot.test.ts +8 -1
  326. package/src/core/__tests__/lifecycle.test.ts +46 -13
  327. package/src/core/catalog-revision.ts +24 -2
  328. package/src/core/core-ports.ts +42 -0
  329. package/src/core/create-core-server.ts +13 -0
  330. package/src/core/create-core-services.ts +49 -12
  331. package/src/core/lifecycle.ts +26 -2
  332. package/src/index.ts +1 -1
  333. package/src/modules/access/__tests__/access-control.admin-root-floor.test.ts +12 -0
  334. package/src/modules/access/__tests__/access-control.colliding-name-cases.test.ts +113 -0
  335. package/src/modules/access/__tests__/access-control.frontmatter-head.test.ts +117 -0
  336. package/src/modules/access/__tests__/access-control.group-named-admin.test.ts +122 -0
  337. package/src/modules/access/__tests__/access-control.preview-relocation.test.ts +50 -0
  338. package/src/modules/access/__tests__/access-declarations.test.ts +19 -0
  339. package/src/modules/access/__tests__/access-groups.test.ts +55 -22
  340. package/src/modules/access/__tests__/access-mutation.service.test.ts +85 -59
  341. package/src/modules/access/__tests__/access-restrict-here.test.ts +7 -5
  342. package/src/modules/access/__tests__/access.routes.admins.test.ts +1 -0
  343. package/src/modules/access/__tests__/access.routes.batch.test.ts +2 -0
  344. package/src/modules/access/__tests__/access.routes.folder-governs.test.ts +2 -0
  345. package/src/modules/access/__tests__/access.routes.group-grant.test.ts +50 -14
  346. package/src/modules/access/__tests__/access.routes.overrides.test.ts +2 -1
  347. package/src/modules/access/__tests__/access.routes.proposal-branch.test.ts +1 -0
  348. package/src/modules/access/__tests__/access.routes.prospective.test.ts +2 -0
  349. package/src/modules/access/__tests__/access.routes.revoke.test.ts +18 -13
  350. package/src/modules/access/__tests__/access.routes.unknown-email.test.ts +2 -0
  351. package/src/modules/access/__tests__/grant-sources.test.ts +20 -15
  352. package/src/modules/access/__tests__/groups-admin.routes.test.ts +61 -0
  353. package/src/modules/access/__tests__/groups-admin.service.test.ts +211 -18
  354. package/src/modules/access/__tests__/reference-scan.test.ts +366 -14
  355. package/src/modules/access/__tests__/roles-admin.security.test.ts +1 -1
  356. package/src/modules/access/__tests__/roles-admin.service.test.ts +43 -22
  357. package/src/modules/access/__tests__/roles-capabilities.test.ts +6 -2
  358. package/src/modules/access/__tests__/roles.routes.test.ts +1 -1
  359. package/src/modules/access/access-control.interface.ts +17 -10
  360. package/src/modules/access/access-control.service.ts +158 -72
  361. package/src/modules/access/access-mutation.service.ts +48 -53
  362. package/src/modules/access/access-view.ts +12 -10
  363. package/src/modules/access/access.routes.ts +43 -33
  364. package/src/modules/access/groups-admin.routes.ts +4 -2
  365. package/src/modules/access/groups-admin.service.ts +114 -44
  366. package/src/modules/access/groups-edit.ts +1 -1
  367. package/src/modules/access/reference-scan.ts +319 -46
  368. package/src/modules/access/roles-admin.service.ts +43 -26
  369. package/src/modules/access/synced-groups-writer.ts +1 -1
  370. package/src/modules/access-model/__tests__/access-grammar.test.ts +38 -1
  371. package/src/modules/access-model/__tests__/access-splice.test.ts +50 -8
  372. package/src/modules/access-model/access-grammar.ts +65 -20
  373. package/src/modules/access-model/access-splice.ts +31 -23
  374. package/src/modules/access-model/group-files.ts +5 -0
  375. package/src/modules/agent-guide/__tests__/agent-guide.test.ts +31 -0
  376. package/src/modules/agent-guide/agent-guide.tools.ts +13 -2
  377. package/src/modules/agent-instructions/__tests__/shared-file-rules.test.ts +1 -0
  378. package/src/modules/agent-instructions/compose.ts +3 -1
  379. package/src/modules/agent-instructions/shared-file-rules.ts +17 -1
  380. package/src/modules/agent-scope/__tests__/agent-surfaces.connect-as.test.ts +421 -0
  381. package/src/modules/agent-scope/__tests__/connection-scope.test.ts +46 -0
  382. package/src/modules/agent-scope/__tests__/in-memory-kb.ts +148 -0
  383. package/src/modules/agent-scope/agent-scope.contract.ts +83 -0
  384. package/src/modules/agent-scope/connection-scope.ts +199 -0
  385. package/src/modules/agent-scope/index.ts +15 -0
  386. package/src/modules/audit/agent-audit.service.ts +2 -0
  387. package/src/modules/audit/audit.contract.ts +6 -0
  388. package/src/modules/auth/__tests__/auth.middleware.test.ts +30 -2
  389. package/src/modules/auth/__tests__/auth.routes.test.ts +71 -5
  390. package/src/modules/auth/__tests__/auth.service.test.ts +90 -9
  391. package/src/modules/auth/__tests__/password-change-sessions.pg.test.ts +269 -0
  392. package/src/modules/auth/account-admission.ts +19 -0
  393. package/src/modules/auth/auth.middleware.ts +45 -4
  394. package/src/modules/auth/auth.routes.ts +46 -29
  395. package/src/modules/auth/auth.service.ts +135 -34
  396. package/src/modules/auth/index.ts +2 -0
  397. package/src/modules/auth/oidc-auth-provider.ts +2 -9
  398. package/src/modules/database/__tests__/session-version-migration.pg.test.ts +133 -0
  399. package/src/modules/database/core-schema.ts +33 -0
  400. package/src/modules/declared-variables/__tests__/declared-variables.route.test.ts +44 -1
  401. package/src/modules/declared-variables/declared-variables.routes.ts +12 -1
  402. package/src/modules/embed/__tests__/embed.tools.test.ts +12 -0
  403. package/src/modules/embed/embed.tools.ts +5 -0
  404. package/src/modules/kb-fs/__tests__/locking-filesystem.test.ts +25 -0
  405. package/src/modules/kb-fs/__tests__/repo-path.test.ts +53 -8
  406. package/src/modules/kb-fs/index.ts +2 -0
  407. package/src/modules/kb-fs/locking-filesystem.ts +7 -1
  408. package/src/modules/kb-fs/repo-path.ts +33 -7
  409. package/src/modules/kb-fs/tmp-ref.ts +81 -0
  410. package/src/modules/mcp/__tests__/connect-as.pg.test.ts +137 -0
  411. package/src/modules/mcp/__tests__/mcp-auth.middleware.test.ts +29 -5
  412. package/src/modules/mcp/__tests__/mcp-routes-harness.ts +8 -0
  413. package/src/modules/mcp/__tests__/mcp.connect-as.test.ts +195 -0
  414. package/src/modules/mcp/__tests__/mcp.routes.connect-as.test.ts +192 -0
  415. package/src/modules/mcp/__tests__/oauth-consent.connect-as.test.ts +146 -0
  416. package/src/modules/mcp/mcp-auth.middleware.ts +19 -2
  417. package/src/modules/mcp/mcp.routes.ts +39 -3
  418. package/src/modules/mcp/mcp.service.ts +107 -17
  419. package/src/modules/mcp/oauth/bevel-oauth-provider.ts +46 -8
  420. package/src/modules/mcp/oauth/oauth-consent.routes.ts +41 -1
  421. package/src/modules/plugins/__tests__/plugins.tools.test.ts +38 -2
  422. package/src/modules/plugins/index.ts +1 -1
  423. package/src/modules/plugins/plugin-links.ts +19 -2
  424. package/src/modules/plugins/plugins.routes.ts +35 -4
  425. package/src/modules/secrets-vault/__tests__/connect-pending.route.test.ts +113 -0
  426. package/src/modules/secrets-vault/secrets-vault.routes.ts +23 -3
  427. package/src/modules/skills/__tests__/skills.service.test.ts +34 -0
  428. package/src/modules/skills/index.ts +7 -2
  429. package/src/modules/skills/skills.contract.ts +17 -0
  430. package/src/modules/skills/skills.service.ts +5 -1
  431. package/src/modules/skills/skills.tools.ts +44 -13
  432. package/src/modules/tool-auth/__tests__/external-api-key.service.test.ts +4 -0
  433. package/src/modules/tool-auth/external-api-key.interface.ts +11 -1
  434. package/src/modules/tool-auth/external-api-key.service.ts +5 -2
  435. package/src/modules/tool-auth/index.ts +1 -1
  436. package/src/modules/tool-auth/internal-token.service.ts +10 -0
  437. package/src/modules/tool-auth/tool-auth.middleware.ts +45 -3
  438. package/src/modules/tool-helpers/__tests__/can-write.tools.test.ts +3 -1
  439. package/src/modules/tool-helpers/tool-context.ts +10 -0
  440. package/src/modules/tool-helpers/tool-handler.ts +34 -0
  441. package/src/modules/tool-helpers/tool.contract.ts +10 -0
  442. package/src/modules/tool-helpers/validate-token.ts +4 -2
  443. package/src/modules/tool-manuals/__tests__/tool-manuals.archive.route.test.ts +80 -4
  444. package/src/modules/tool-manuals/__tests__/tool-manuals.service.test.ts +42 -0
  445. package/src/modules/tool-manuals/__tests__/tool-manuals.tools.test.ts +3 -3
  446. package/src/modules/tool-manuals/index.ts +6 -2
  447. package/src/modules/tool-manuals/tool-manuals.contract.ts +18 -6
  448. package/src/modules/tool-manuals/tool-manuals.routes.ts +40 -3
  449. package/src/modules/tool-manuals/tool-manuals.service.ts +31 -15
  450. package/src/modules/tool-manuals/tool-manuals.tools.ts +28 -11
  451. package/src/modules/tool-registry/__tests__/tool-description-length.test.ts +2 -2
  452. package/src/modules/tool-registry/manual.routes.ts +26 -5
  453. package/src/modules/tool-registry/tool.contract.ts +7 -0
  454. package/src/modules/workflow/__tests__/workflow.service.facade.test.ts +1 -1
  455. package/src/modules/workflow/__tests__/workflow.service.sync.test.ts +1 -1
  456. package/src/modules/workflow/agent-tools/__tests__/workflow.tools.test.ts +54 -3
  457. package/src/modules/workflow/agent-tools/workflow.tools.ts +14 -9
  458. package/src/modules/workflow/git/__tests__/git.service.list-branches.test.ts +130 -3
  459. package/src/modules/workflow/git/git.service.ts +29 -48
  460. package/src/modules/workflow/workflow.service.ts +5 -0
  461. package/src/modules/workspace/__tests__/git-internals.security.test.ts +2 -2
  462. package/src/modules/workspace/__tests__/holds-nul.test.ts +66 -0
  463. package/src/modules/workspace/__tests__/rest-tool-arguments.test.ts +3 -3
  464. package/src/modules/workspace/__tests__/ripgrep-search.test.ts +570 -0
  465. package/src/modules/workspace/__tests__/ripgrep-version.test.ts +29 -0
  466. package/src/modules/workspace/__tests__/workspace-tmp.tools.test.ts +928 -0
  467. package/src/modules/workspace/__tests__/workspace.routes.read-gate.test.ts +17 -37
  468. package/src/modules/workspace/__tests__/workspace.service.read-filter.test.ts +20 -8
  469. package/src/modules/workspace/__tests__/workspace.tools.agents-file.test.ts +2 -2
  470. package/src/modules/workspace/__tests__/workspace.tools.branch-errors.test.ts +22 -10
  471. package/src/modules/workspace/__tests__/workspace.tools.test.ts +393 -113
  472. package/src/modules/workspace/file-readers/__tests__/doc-extract.service.test.ts +10 -0
  473. package/src/modules/workspace/file-readers/doc-extract.service.ts +71 -38
  474. package/src/modules/workspace/index.ts +20 -0
  475. package/src/modules/workspace/nul-scan.ts +50 -0
  476. package/src/modules/workspace/pattern-matcher.contract.ts +123 -32
  477. package/src/modules/workspace/ripgrep-search.ts +715 -0
  478. package/src/modules/workspace/ripgrep-version.ts +35 -0
  479. package/src/modules/workspace/startup/__tests__/beside-checkout.test.ts +11 -0
  480. package/src/modules/workspace/startup/beside-checkout.ts +13 -5
  481. package/src/modules/workspace/worker-pool.ts +3 -4
  482. package/src/modules/workspace/workspace-tmp.ts +457 -0
  483. package/src/modules/workspace/workspace.routes.ts +6 -27
  484. package/src/modules/workspace/workspace.service.ts +92 -15
  485. package/src/modules/workspace/workspace.tools.ts +500 -155
  486. package/src/shared/path-order.ts +37 -8
  487. package/starter-packs/engineering/Plugins/engineering-starter/access.md +1 -1
  488. package/starter-packs/general/Plugins/general-starter/access.md +1 -1
  489. package/starter-packs/operations/Plugins/operations-starter/access.md +1 -1
  490. package/starter-packs/sales/Plugins/sales-starter/access.md +1 -1
  491. package/starter-packs/support/Plugins/support-starter/access.md +1 -1
  492. package/dist/modules/workspace/bounded-matcher.d.ts +0 -73
  493. package/dist/modules/workspace/bounded-matcher.d.ts.map +0 -1
  494. package/dist/modules/workspace/bounded-matcher.js +0 -200
  495. package/dist/modules/workspace/bounded-matcher.js.map +0 -1
  496. package/src/modules/workspace/__tests__/bounded-matcher.test.ts +0 -213
  497. package/src/modules/workspace/bounded-matcher.ts +0 -271
@@ -0,0 +1,111 @@
1
+ import { NOT_AVAILABLE_TO_CONNECTION, connectionRefusal, describeConnection, type ConnectionScopeWire, type ScopeAgent } from '@bevel-software/platform-mcp-core';
2
+ export { NOT_AVAILABLE_TO_CONNECTION, connectionRefusal, describeConnection, type ConnectionScopeWire, type ScopeAgent };
3
+ /**
4
+ * The resolved roots a usable agent configuration narrows a connection to — what
5
+ * {@link ConnectionScope.narrowed} is built from.
6
+ */
7
+ export interface ScopeRoots {
8
+ /** Skill folders and subtrees: the `skills:` entries, each plugin folder, and the skills its manifest links. */
9
+ skills: readonly string[];
10
+ /** Connector files and subtrees: the `connectors:` entries and each plugin folder. */
11
+ connectors: readonly string[];
12
+ /** Platform tool names; null for all of them. */
13
+ platformTools: readonly string[] | null;
14
+ }
15
+ /**
16
+ * What one connection may load — the ONE answer every agent surface asks
17
+ * (`all-tools`, the `/agent/utcp` manual, the tool route, the skill tools,
18
+ * the setup tools, the catalog revision). Everything is the scope of every
19
+ * connection made without a choice, and asks nothing of anyone: each of its
20
+ * predicates is true, so a surface that consults it serves exactly what it
21
+ * served before connections could be narrowed.
22
+ *
23
+ * A scope only ever NARROWS. It is applied to what the person may already
24
+ * read — each surface asks it about items that passed the person's own read
25
+ * gate — so no list in an agent configuration can add an item to a connection.
26
+ */
27
+ export declare class ConnectionScope {
28
+ private readonly state;
29
+ private constructor();
30
+ static everything(): ConnectionScope;
31
+ static narrowed(agent: ScopeAgent, roots: ScopeRoots, fingerprint: string): ConnectionScope;
32
+ /** A chosen file that cannot be used: nothing at all is loaded, and `sentence` says why. */
33
+ static unavailable(agent: ScopeAgent, sentence: string, fingerprint: string): ConnectionScope;
34
+ /**
35
+ * A chosen file that is not there for the person — missing, or one they may
36
+ * no longer read: ONE answer for both, so the sentence discloses neither.
37
+ */
38
+ static gone(agentPath: string): ConnectionScope;
39
+ /** True for Everything: the connection was made without choosing an agent. */
40
+ isEverything(): boolean;
41
+ /** Whether the skill in `skillFolder` (repo-relative) is loaded. */
42
+ allowsSkill(skillFolder: string): boolean;
43
+ /** Whether the connector defined at `definitionPath` (a `.tool` file or an MCP server definition) is loaded. */
44
+ allowsConnector(definitionPath: string): boolean;
45
+ /**
46
+ * Whether any connector this connection loads is defined in `folder`
47
+ * (repo-relative) or in a folder that contains it — what a plugin's
48
+ * archive asks, since the local MCP server materializes a plugin only to
49
+ * run a connector it defines.
50
+ */
51
+ loadsConnectorIn(folder: string): boolean;
52
+ /**
53
+ * {@link allowsSkill} as the narrowing a skill listing takes, or undefined
54
+ * for Everything — so an Everything caller's listing runs exactly the code
55
+ * it ran before connections could be narrowed.
56
+ */
57
+ skillFilter(): ((skillFolder: string) => boolean) | undefined;
58
+ /** {@link allowsConnector} as the narrowing a catalog read takes, or undefined for Everything. */
59
+ connectorFilter(): ((definitionPath: string) => boolean) | undefined;
60
+ /**
61
+ * Whether the connection's surface may be discovered: its skills read as
62
+ * MCP prompts, and its local-only connectors read by the local server so
63
+ * it can materialize them. Neither is a platform tool, so `platformTools`
64
+ * has no say — an agent that names skills gets them as prompts, and one
65
+ * that names connectors gets them served, whatever tools it is offered.
66
+ * False only for a file that cannot be used, which loads nothing at all.
67
+ */
68
+ allowsDiscovery(): boolean;
69
+ /** Whether the platform's own tool `name` is loaded. */
70
+ allowsPlatformTool(name: string): boolean;
71
+ /**
72
+ * The answer to a call of `toolName`, a tool this connection does not load:
73
+ * names the tool and the agent, so the caller knows the tool was refused by
74
+ * the connection's choice and not missing from the deployment. For a file
75
+ * that cannot be used, the sentence that says why.
76
+ */
77
+ refusal(toolName: string): string;
78
+ /**
79
+ * THE policy for a call of the platform tool `toolName` by this connection:
80
+ * null when the call may proceed, else the body the route answers with a
81
+ * 403 — the refusal naming the tool and the agent, and the code that says
82
+ * it was the connection's choice. Every route that IS a platform tool asks
83
+ * this, whether `toolHandler` hosts it or it is mounted on its own (the
84
+ * plugin-creation routes), so the rule is written once and the answers
85
+ * cannot drift. `discovery` marks a route that is a discovery read of the
86
+ * surface (the skill routes, the local-only tool list), which a narrowed
87
+ * connection is answered even when its `platformTools` omits the tool;
88
+ * a connection that loads nothing is refused it like everything else.
89
+ */
90
+ platformToolRefusal(toolName: string, opts?: {
91
+ discovery?: boolean;
92
+ }): {
93
+ error: string;
94
+ code: typeof NOT_AVAILABLE_TO_CONNECTION;
95
+ } | null;
96
+ /**
97
+ * One line for the text an agent is told about its connection (the MCP
98
+ * handshake, the agent guide); null for Everything, which is told nothing
99
+ * new.
100
+ */
101
+ describe(): string | null;
102
+ /**
103
+ * What moves the catalog revision when the agent's FILE changes — its path
104
+ * and a digest of its bytes, or the reason it cannot be used. Null for
105
+ * Everything, whose revision is exactly what it was before agents existed.
106
+ */
107
+ fingerprint(): string | null;
108
+ /** See {@link ConnectionScopeWire}; undefined for Everything. */
109
+ toWire(): ConnectionScopeWire | undefined;
110
+ }
111
+ //# sourceMappingURL=connection-scope.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connection-scope.d.ts","sourceRoot":"","sources":["../../../src/modules/agent-scope/connection-scope.ts"],"names":[],"mappings":"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GAAkG;IAClG,eAAe,IAAI,CAAC,CAAC,cAAc,EAAE,MAAM,KAAK,OAAO,CAAC,GAAG,SAAS;IAIpE;;;;;;;OAOG;IACH,eAAe,IAAI,OAAO;IAI1B,wDAAwD;IACxD,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAOzC;;;;;OAKG;IACH,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM;IAIjC;;;;;;;;;;;OAWG;IACH,mBAAmB,CACjB,QAAQ,EAAE,MAAM,EAChB,IAAI,GAAE;QAAE,SAAS,CAAC,EAAE,OAAO,CAAA;KAAO,GACjC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,OAAO,2BAA2B,CAAA;KAAE,GAAG,IAAI;IAMrE;;;;OAIG;IACH,QAAQ,IAAI,MAAM,GAAG,IAAI;IAIzB;;;;OAIG;IACH,WAAW,IAAI,MAAM,GAAG,IAAI;IAK5B,iEAAiE;IACjE,MAAM,IAAI,mBAAmB,GAAG,SAAS;CAM1C"}
@@ -0,0 +1,165 @@
1
+ import { pathUnderRoot } from '@bevel-software/platform-shared';
2
+ import { NOT_AVAILABLE_TO_CONNECTION, connectionRefusal, describeConnection, } from '@bevel-software/platform-mcp-core';
3
+ // The wire and its words are the MCP core's (`connection-scope-wire.ts`),
4
+ // so the hosted proxy and the local server read and word a connection the
5
+ // same way; offered here too, as this module's callers learnt them.
6
+ export { NOT_AVAILABLE_TO_CONNECTION, connectionRefusal, describeConnection };
7
+ /**
8
+ * What one connection may load — the ONE answer every agent surface asks
9
+ * (`all-tools`, the `/agent/utcp` manual, the tool route, the skill tools,
10
+ * the setup tools, the catalog revision). Everything is the scope of every
11
+ * connection made without a choice, and asks nothing of anyone: each of its
12
+ * predicates is true, so a surface that consults it serves exactly what it
13
+ * served before connections could be narrowed.
14
+ *
15
+ * A scope only ever NARROWS. It is applied to what the person may already
16
+ * read — each surface asks it about items that passed the person's own read
17
+ * gate — so no list in an agent configuration can add an item to a connection.
18
+ */
19
+ export class ConnectionScope {
20
+ state;
21
+ constructor(state) {
22
+ this.state = state;
23
+ }
24
+ static everything() {
25
+ return new ConnectionScope({ kind: 'everything' });
26
+ }
27
+ static narrowed(agent, roots, fingerprint) {
28
+ return new ConnectionScope({ kind: 'narrowed', agent, roots, fingerprint });
29
+ }
30
+ /** A chosen file that cannot be used: nothing at all is loaded, and `sentence` says why. */
31
+ static unavailable(agent, sentence, fingerprint) {
32
+ return new ConnectionScope({ kind: 'unavailable', agent, sentence, fingerprint });
33
+ }
34
+ /**
35
+ * A chosen file that is not there for the person — missing, or one they may
36
+ * no longer read: ONE answer for both, so the sentence discloses neither.
37
+ */
38
+ static gone(agentPath) {
39
+ return ConnectionScope.unavailable({ path: agentPath, name: agentPath }, `This connection was made as the agent \`${agentPath}\`, which no longer exists or which you can no ` +
40
+ 'longer read, so it loads no tools and no skills. Reconnect and choose another agent, or Everything.', `agent\u0000${agentPath}\u0000gone`);
41
+ }
42
+ /** True for Everything: the connection was made without choosing an agent. */
43
+ isEverything() {
44
+ return this.state.kind === 'everything';
45
+ }
46
+ /** Whether the skill in `skillFolder` (repo-relative) is loaded. */
47
+ allowsSkill(skillFolder) {
48
+ const s = this.state;
49
+ if (s.kind === 'everything')
50
+ return true;
51
+ if (s.kind === 'unavailable')
52
+ return false;
53
+ return s.roots.skills.some((root) => pathUnderRoot(skillFolder, root));
54
+ }
55
+ /** Whether the connector defined at `definitionPath` (a `.tool` file or an MCP server definition) is loaded. */
56
+ allowsConnector(definitionPath) {
57
+ const s = this.state;
58
+ if (s.kind === 'everything')
59
+ return true;
60
+ if (s.kind === 'unavailable')
61
+ return false;
62
+ return s.roots.connectors.some((root) => pathUnderRoot(definitionPath, root));
63
+ }
64
+ /**
65
+ * Whether any connector this connection loads is defined in `folder`
66
+ * (repo-relative) or in a folder that contains it — what a plugin's
67
+ * archive asks, since the local MCP server materializes a plugin only to
68
+ * run a connector it defines.
69
+ */
70
+ loadsConnectorIn(folder) {
71
+ const s = this.state;
72
+ if (s.kind === 'everything')
73
+ return true;
74
+ if (s.kind === 'unavailable')
75
+ return false;
76
+ return s.roots.connectors.some((root) => pathUnderRoot(folder, root) || pathUnderRoot(root, folder));
77
+ }
78
+ /**
79
+ * {@link allowsSkill} as the narrowing a skill listing takes, or undefined
80
+ * for Everything — so an Everything caller's listing runs exactly the code
81
+ * it ran before connections could be narrowed.
82
+ */
83
+ skillFilter() {
84
+ return this.state.kind === 'everything' ? undefined : (p) => this.allowsSkill(p);
85
+ }
86
+ /** {@link allowsConnector} as the narrowing a catalog read takes, or undefined for Everything. */
87
+ connectorFilter() {
88
+ return this.state.kind === 'everything' ? undefined : (p) => this.allowsConnector(p);
89
+ }
90
+ /**
91
+ * Whether the connection's surface may be discovered: its skills read as
92
+ * MCP prompts, and its local-only connectors read by the local server so
93
+ * it can materialize them. Neither is a platform tool, so `platformTools`
94
+ * has no say — an agent that names skills gets them as prompts, and one
95
+ * that names connectors gets them served, whatever tools it is offered.
96
+ * False only for a file that cannot be used, which loads nothing at all.
97
+ */
98
+ allowsDiscovery() {
99
+ return this.state.kind !== 'unavailable';
100
+ }
101
+ /** Whether the platform's own tool `name` is loaded. */
102
+ allowsPlatformTool(name) {
103
+ const s = this.state;
104
+ if (s.kind === 'everything')
105
+ return true;
106
+ if (s.kind === 'unavailable')
107
+ return false;
108
+ return s.roots.platformTools === null || s.roots.platformTools.includes(name);
109
+ }
110
+ /**
111
+ * The answer to a call of `toolName`, a tool this connection does not load:
112
+ * names the tool and the agent, so the caller knows the tool was refused by
113
+ * the connection's choice and not missing from the deployment. For a file
114
+ * that cannot be used, the sentence that says why.
115
+ */
116
+ refusal(toolName) {
117
+ return connectionRefusal(toolName, this.toWire());
118
+ }
119
+ /**
120
+ * THE policy for a call of the platform tool `toolName` by this connection:
121
+ * null when the call may proceed, else the body the route answers with a
122
+ * 403 — the refusal naming the tool and the agent, and the code that says
123
+ * it was the connection's choice. Every route that IS a platform tool asks
124
+ * this, whether `toolHandler` hosts it or it is mounted on its own (the
125
+ * plugin-creation routes), so the rule is written once and the answers
126
+ * cannot drift. `discovery` marks a route that is a discovery read of the
127
+ * surface (the skill routes, the local-only tool list), which a narrowed
128
+ * connection is answered even when its `platformTools` omits the tool;
129
+ * a connection that loads nothing is refused it like everything else.
130
+ */
131
+ platformToolRefusal(toolName, opts = {}) {
132
+ if (this.allowsPlatformTool(toolName))
133
+ return null;
134
+ if (opts.discovery === true && this.allowsDiscovery())
135
+ return null;
136
+ return { error: this.refusal(toolName), code: NOT_AVAILABLE_TO_CONNECTION };
137
+ }
138
+ /**
139
+ * One line for the text an agent is told about its connection (the MCP
140
+ * handshake, the agent guide); null for Everything, which is told nothing
141
+ * new.
142
+ */
143
+ describe() {
144
+ return describeConnection(this.toWire());
145
+ }
146
+ /**
147
+ * What moves the catalog revision when the agent's FILE changes — its path
148
+ * and a digest of its bytes, or the reason it cannot be used. Null for
149
+ * Everything, whose revision is exactly what it was before agents existed.
150
+ */
151
+ fingerprint() {
152
+ const s = this.state;
153
+ return s.kind === 'everything' ? null : s.fingerprint;
154
+ }
155
+ /** See {@link ConnectionScopeWire}; undefined for Everything. */
156
+ toWire() {
157
+ const s = this.state;
158
+ if (s.kind === 'everything')
159
+ return undefined;
160
+ if (s.kind === 'unavailable')
161
+ return { agent: s.agent, unavailable: s.sentence };
162
+ return { agent: s.agent };
163
+ }
164
+ }
165
+ //# sourceMappingURL=connection-scope.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connection-scope.js","sourceRoot":"","sources":["../../../src/modules/agent-scope/connection-scope.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EACL,2BAA2B,EAC3B,iBAAiB,EACjB,kBAAkB,GAGnB,MAAM,mCAAmC,CAAC;AAE3C,0EAA0E;AAC1E,0EAA0E;AAC1E,oEAAoE;AACpE,OAAO,EAAE,2BAA2B,EAAE,iBAAiB,EAAE,kBAAkB,EAA6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AC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC;IACxD,CAAC;IAED,iEAAiE;IACjE,MAAM;QACJ,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC;QACrB,IAAI,CAAC,CAAC,IAAI,KAAK,YAAY;YAAE,OAAO,SAAS,CAAC;QAC9C,IAAI,CAAC,CAAC,IAAI,KAAK,aAAa;YAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,WAAW,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC;QACjF,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC;IAC5B,CAAC;CACF"}
@@ -0,0 +1,3 @@
1
+ export { noAgentConfigurations, resolveConnectionScope, type AgentChoice, type IAgentScopeResolver, } from './agent-scope.contract.js';
2
+ export { ConnectionScope, NOT_AVAILABLE_TO_CONNECTION, connectionRefusal, describeConnection, type ConnectionScopeWire, type ScopeAgent, type ScopeRoots, } from './connection-scope.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/agent-scope/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,KAAK,WAAW,EAChB,KAAK,mBAAmB,GACzB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,eAAe,EACf,2BAA2B,EAC3B,iBAAiB,EACjB,kBAAkB,EAClB,KAAK,mBAAmB,EACxB,KAAK,UAAU,EACf,KAAK,UAAU,GAChB,MAAM,uBAAuB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { noAgentConfigurations, resolveConnectionScope, } from './agent-scope.contract.js';
2
+ export { ConnectionScope, NOT_AVAILABLE_TO_CONNECTION, connectionRefusal, describeConnection, } from './connection-scope.js';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/agent-scope/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,sBAAsB,GAGvB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,eAAe,EACf,2BAA2B,EAC3B,iBAAiB,EACjB,kBAAkB,GAInB,MAAM,uBAAuB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"agent-audit.service.d.ts","sourceRoot":"","sources":["../../../src/modules/audit/agent-audit.service.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAErD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AACpE,OAAO,EAOL,KAAK,eAAe,EACpB,KAAK,cAAc,EAEnB,KAAK,QAAQ,EACb,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,UAAU,EACf,KAAK,kBAAkB,EACvB,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EACzB,MAAM,qBAAqB,CAAC;AAI7B,kEAAkE;AAClE,eAAO,MAAM,cAAc,MAAM,CAAC;AAKlC;;;;;;;;;;;;GAYG;AACH,qBAAa,iBAAkB,YAAW,kBAAkB,EAAE,mBAAmB,EAAE,sBAAsB;IAIrG,OAAO,CAAC,QAAQ,CAAC,EAAE;IACnB,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB,2FAA2F;IAC3F,OAAO,CAAC,QAAQ,CAAC,aAAa;IAC9B,OAAO,CAAC,QAAQ,CAAC,GAAG;IAPtB,OAAO,CAAC,WAAW,CAAK;gBAGL,EAAE,EAAE,QAAQ,EACZ,IAAI,EAAE,IAAI,CAAC,sBAAsB,EAAE,aAAa,GAAG,mBAAmB,GAAG,SAAS,CAAC;IACpG,2FAA2F;IAC1E,aAAa,EAAE,MAAM,MAAM,GAAG,IAAI,EAClC,GAAG,GAAE,MAAM,MAAiB;IAG/C,MAAM,CAAC,KAAK,EAAE,eAAe,GAAG,IAAI;IAqBpC;;;;OAI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7 @@ export class AgentAuditService {
128
128
  deletedAt: k.deletedAt,
129
129
  eventCount: counts.get(k.id) ?? 0,
130
130
  user: k.user,
131
+ agentPath: k.agentPath ?? null,
131
132
  })),
132
133
  ...connectionRows.map(({ connection: c, user }) => ({
133
134
  kind: 'agent',
@@ -139,6 +140,7 @@ export class AgentAuditService {
139
140
  revokedBy: c.revokedBy ?? null,
140
141
  eventCount: counts.get(c.id) ?? 0,
141
142
  user,
143
+ agentPath: c.agentPath ?? null,
142
144
  })),
143
145
  ...pageRows.flatMap((r) => r.pagePath
144
146
  ? [
@@ -1 +1 @@
1
- {"version":3,"file":"agent-audit.service.js","sourceRoot":"","sources":["../../../src/modules/audit/agent-audit.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAY,MAAM,aAAa,CAAC;AAClG,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAEjD,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,eAAe,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAE1G,OAAO,EACL,2BAA2B,EAC3B,kBAAkB,EAClB,MAAM,EACN,eAAe,EACf,oBAAoB,EACpB,oBAAoB,GAWrB,MAAM,qBAAqB,CAAC;AAE7B,MAAM,GAAG,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC;AAE5B,kEAAkE;AAClE,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,CAAC;AAElC,+EAA+E;AAC/E,MAAM,iBAAiB,GAAG,EAAE,GAAG,MAAM,CAAC;AAEtC;;;;;;;;;;;;GAYG;AACH,MAAM,OAAO,iBAAiB;IAIT;IACA;IAEA;IACA;IAPX,WAAW,GAAG,CAAC,CAAC;IAExB,YACmB,EAAY,EACZ,IAAmF;IACpG,2FAA2F;IAC1E,aAAkC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AI,sBAAsB,GAAkB,IAAI,CAAC;AAEjD;;;;;;GAMG;AACH,MAAM,UAAU,iBAAiB,CAAC,GAAW;IAC3C,MAAM,MAAM,GAAG,oBAAoB,CAAC,GAAG,CAAC,CAAC;IACzC,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO,IAAI,CAAC;IACtC,IAAI,MAAM,KAAK,IAAI;QAAE,OAAO,MAAM,CAAC,IAAI,CAAC;IACxC,IAAI,GAAG,KAAK,sBAAsB,EAAE,CAAC;QACnC,sBAAsB,GAAG,GAAG,CAAC;QAC7B,GAAG,CAAC,IAAI,CACN,0BAA0B,GAAG,oFAAoF,CAClH,CAAC;IACJ,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -122,6 +122,12 @@ export interface AuditPrincipal {
122
122
  email: string;
123
123
  name: string;
124
124
  };
125
+ /**
126
+ * For a key or an agent connection: the agent configuration it connects as (a
127
+ * repo-relative knowledge-base path), or null for Everything. Absent for a
128
+ * page, which acts as its viewer.
129
+ */
130
+ agentPath?: string | null;
125
131
  }
126
132
  /** One event as the page reads it. */
127
133
  export interface AgentEventView {
@@ -1 +1 @@
1
- {"version":3,"file":"audit.contract.d.ts","sourceRoot":"","sources":["../../../src/modules/audit/audit.contract.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,CAAC,MAAM,CAAC;IAEb,UAAU,OAAO,CAAC;QAChB,UAAU,OAAO;YACf;;;;;;eAMG;YACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;SAC5B;KACF;CACF;AAED,kFAAkF;AAClF,MAAM,MAAM,cAAc,GAAG,YAAY,GAAG,MAAM,GAAG,OAAO,CAAC;AAE7D;;;;;GAKG;AACH,MAAM,MAAM,iBAAiB,GAAG,IAAI,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEtE;;;;;;;;GAQG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,EAAE,EAA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AAC;QACf,IAAI,CAAC,MAAM,IAAI,oBAAoB;QACnC,yFAAyF;QACzF,CAAC,0CAA0C,CAAC,IAAI,CAAC,IAAI,CAAC,CACvD,CAAC;AACJ,CAAC;AA0HD,MAAM,OAAO,2BAA4B,SAAQ,KAAK;IACpD;QACE,KAAK,CAAC,eAAe,CAAC,CAAC;QACvB,IAAI,CAAC,IAAI,GAAG,6BAA6B,CAAC;IAC5C,CAAC;CACF;AAED,sGAAsG;AACtG,MAAM,OAAO,kBAAmB,SAAQ,KAAK;IAC3C;QACE,KAAK,CAAC,gBAAgB,CAAC,CAAC;QACxB,IAAI,CAAC,IAAI,GAAG,oBAAoB,CAAC;IACnC,CAAC;CACF;AAED,oEAAoE;AACpE,MAAM,OAAO,GAAG,iEAAiE,CAAC;AAElF,MAAM,UAAU,MAAM,CAAC,KAAa;IAClC,OAAO,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC7B,CAAC;AAaD,0FAA0F;AAC1F,MAAM,UAAU,oBAAoB,CAAC,GAAW;IAC9C,MAAM,OAAO,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC;IAC3B,IAAI,OAAO,KAAK,EAAE;QAAE,OAAO,SAAS,CAAC;IACrC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC;QAAE,OAAO,IAAI,CAAC;IAC1C,MAAM,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC;IAC1B,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;AACzC,CAAC"}
@@ -67,6 +67,18 @@ export declare class AccountDeactivatedError extends Error {
67
67
  readonly status = 403;
68
68
  constructor(message?: string);
69
69
  }
70
+ /**
71
+ * A session token that verifies but is no longer honoured: the account's
72
+ * password was changed after the token was issued, which ends every session
73
+ * opened before it. A 401 with these words, so the person knows why they are
74
+ * back at the sign-in form rather than reading "invalid token".
75
+ */
76
+ export declare class SessionEndedError extends Error {
77
+ readonly status = 401;
78
+ constructor(message?: string);
79
+ }
80
+ /** What a person whose session a password change ended is told. */
81
+ export declare const SESSION_ENDED_MESSAGE = "Your password was changed after this session was opened. Sign in again with the new password.";
70
82
  /**
71
83
  * Whether the account behind a credential is on could not be asked — the
72
84
  * database failed. Not the caller's fault and not a verdict on them: a
@@ -1 +1 @@
1
- {"version":3,"file":"account-admission.d.ts","sourceRoot":"","sources":["../../../src/modules/auth/account-admission.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,sBAAsB;AAChC,2EAA2E;AACzE,KAAK;AACP,iDAAiD;GAC/C,cAAc;AAChB,8EAA8E;GAC5E,WAAW;AACb,wFAAwF;GACtF,OAAO;AACT,wDAAwD;GACtD,YAAY,CAAC;AAEjB,MAAM,MAAM,uBAAuB,GAC/B;IAAE,EAAE,EAAE,IAAI,CAAA;CAAE,GACZ;IACE,EAAE,EAAE,KAAK,CAAC;IACV,OAAO,EAAE,MAAM,CAAC;IAChB;;;;;;;;;;;OAWG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAEN,MAAM,WAAW,iBAAiB;IAChC,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,sBAAsB,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAC;CAC/F;AAED,iDAAiD;AACjD,eAAO,MAAM,aAAa,EAAE,iBAE3B,CAAC;AAEF;;;;GAIG;AACH,qBAAa,4BAA6B,SAAQ,KAAK;IACrD,QAAQ,CAAC,MAAM,OAAO;IACtB,gGAAgG;IAChG,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAC;gBAEtB,OAAO,EAAE,MAAM,EAAE,IAAI,GAAE;QAAE,eAAe,CAAC,EAAE,OAAO,CAAA;KAAO;CAKtE;AAED;;;;GAIG;AACH,qBAAa,uBAAwB,SAAQ,KAAK;IAChD,QAAQ,CAAC,MAAM,OAAO;gBAEV,OAAO,SAA8B;CAIlD;AAED;;;;;GAKG;AACH,qBAAa,gBAAiB,SAAQ,KAAK;IAC7B,QAAQ,CAAC,KAAK,EAAE,OAAO;gBAAd,KAAK,EAAE,OAAO;CAIpC;AAED;;;;GAIG;AACH,qBAAa,yBAA0B,SAAQ,KAAK;IAClD,QAAQ,CAAC,MAAM,OAAO;gBAEV,OAAO,EAAE,MAAM;CAI5B;AAED,6EAA6E;AAC7E,eAAO,MAAM,2BAA2B,sFAAsF,CAAC"}
1
+ {"version":3,"file":"account-admission.d.ts","sourceRoot":"","sources":["../../../src/modules/auth/account-admission.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,sBAAsB;AAChC,2EAA2E;AACzE,KAAK;AACP,iDAAiD;GAC/C,cAAc;AAChB,8EAA8E;GAC5E,WAAW;AACb,wFAAwF;GACtF,OAAO;AACT,wDAAwD;GACtD,YAAY,CAAC;AAEjB,MAAM,MAAM,uBAAuB,GAC/B;IAAE,EAAE,EAAE,IAAI,CAAA;CAAE,GACZ;IACE,EAAE,EAAE,KAAK,CAAC;IACV,OAAO,EAAE,MAAM,CAAC;IAChB;;;;;;;;;;;OAWG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAEN,MAAM,WAAW,iBAAiB;IAChC,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,sBAAsB,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAC;CAC/F;AAED,iDAAiD;AACjD,eAAO,MAAM,aAAa,EAAE,iBAE3B,CAAC;AAEF;;;;GAIG;AACH,qBAAa,4BAA6B,SAAQ,KAAK;IACrD,QAAQ,CAAC,MAAM,OAAO;IACtB,gGAAgG;IAChG,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAC;gBAEtB,OAAO,EAAE,MAAM,EAAE,IAAI,GAAE;QAAE,eAAe,CAAC,EAAE,OAAO,CAAA;KAAO;CAKtE;AAED;;;;GAIG;AACH,qBAAa,uBAAwB,SAAQ,KAAK;IAChD,QAAQ,CAAC,MAAM,OAAO;gBAEV,OAAO,SAA8B;CAIlD;AAED;;;;;GAKG;AACH,qBAAa,iBAAkB,SAAQ,KAAK;IAC1C,QAAQ,CAAC,MAAM,OAAO;gBAEV,OAAO,SAAwB;CAI5C;AAED,mEAAmE;AACnE,eAAO,MAAM,qBAAqB,kGAC+D,CAAC;AAElG;;;;;GAKG;AACH,qBAAa,gBAAiB,SAAQ,KAAK;IAC7B,QAAQ,CAAC,KAAK,EAAE,OAAO;gBAAd,KAAK,EAAE,OAAO;CAIpC;AAED;;;;GAIG;AACH,qBAAa,yBAA0B,SAAQ,KAAK;IAClD,QAAQ,CAAC,MAAM,OAAO;gBAEV,OAAO,EAAE,MAAM;CAI5B;AAED,6EAA6E;AAC7E,eAAO,MAAM,2BAA2B,sFAAsF,CAAC"}
@@ -29,6 +29,21 @@ export class AccountDeactivatedError extends Error {
29
29
  this.name = 'AccountDeactivatedError';
30
30
  }
31
31
  }
32
+ /**
33
+ * A session token that verifies but is no longer honoured: the account's
34
+ * password was changed after the token was issued, which ends every session
35
+ * opened before it. A 401 with these words, so the person knows why they are
36
+ * back at the sign-in form rather than reading "invalid token".
37
+ */
38
+ export class SessionEndedError extends Error {
39
+ status = 401;
40
+ constructor(message = SESSION_ENDED_MESSAGE) {
41
+ super(message);
42
+ this.name = 'SessionEndedError';
43
+ }
44
+ }
45
+ /** What a person whose session a password change ended is told. */
46
+ export const SESSION_ENDED_MESSAGE = 'Your password was changed after this session was opened. Sign in again with the new password.';
32
47
  /**
33
48
  * Whether the account behind a credential is on could not be asked — the
34
49
  * database failed. Not the caller's fault and not a verdict on them: a
@@ -1 +1 @@
1
- {"version":3,"file":"account-admission.js","sourceRoot":"","sources":["../../../src/modules/auth/account-admission.ts"],"names":[],"mappings":"AAgDA,iDAAiD;AACjD,MAAM,CAAC,MAAM,aAAa,GAAsB;IAC9C,YAAY,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC;CACzC,CAAC;AAEF;;;;GAIG;AACH,MAAM,OAAO,4BAA6B,SAAQ,KAAK;IAC5C,MAAM,GAAG,GAAG,CAAC;IACtB,gGAAgG;IACvF,eAAe,CAAU;IAElC,YAAY,OAAe,EAAE,OAAsC,EAAE;QACnE,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,8BAA8B,CAAC;QAC3C,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,eAAe,IAAI,KAAK,CAAC;IACvD,CAAC;CACF;AAED;;;;GAIG;AACH,MAAM,OAAO,uBAAwB,SAAQ,KAAK;IACvC,MAAM,GAAG,GAAG,CAAC;IAEtB,YAAY,OAAO,GAAG,2BAA2B;QAC/C,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,yBAAyB,CAAC;IACxC,CAAC;CACF;AAED;;;;;GAKG;AACH,MAAM,OAAO,gBAAiB,SAAQ,KAAK;IACpB;IAArB,YAAqB,KAAc;QACjC,KAAK,CAAC,oCAAoC,CAAC,CAAC;QADzB,UAAK,GAAL,KAAK,CAAS;QAEjC,IAAI,CAAC,IAAI,GAAG,kBAAkB,CAAC;IACjC,CAAC;CACF;AAED;;;;GAIG;AACH,MAAM,OAAO,yBAA0B,SAAQ,KAAK;IACzC,MAAM,GAAG,GAAG,CAAC;IAEtB,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,2BAA2B,CAAC;IAC1C,CAAC;CACF;AAED,6EAA6E;AAC7E,MAAM,CAAC,MAAM,2BAA2B,GAAG,mFAAmF,CAAC"}
1
+ {"version":3,"file":"account-admission.js","sourceRoot":"","sources":["../../../src/modules/auth/account-admission.ts"],"names":[],"mappings":"AAgDA,iDAAiD;AACjD,MAAM,CAAC,MAAM,aAAa,GAAsB;IAC9C,YAAY,EAAE,KAAK,IAAI,EAAE,CAAC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AC,IAAI,GAAG,2BAA2B,CAAC;IAC1C,CAAC;CACF;AAED,6EAA6E;AAC7E,MAAM,CAAC,MAAM,2BAA2B,GAAG,mFAAmF,CAAC"}
@@ -16,9 +16,35 @@ declare global {
16
16
  * header, which the frontend stores in memory and attaches via `authFetch`.
17
17
  *
18
18
  * Same JWT value as the Bearer token. The cookie is `HttpOnly` + `SameSite=Lax`
19
- * + `Secure` (in prod) — see `auth.routes.ts` for the issue site.
19
+ * + `Secure` when the deployment is reached over https — {@link setAuthCookie}
20
+ * is its one issue site, for every sign-in path and the password change.
20
21
  */
21
22
  export declare const AUTH_COOKIE_NAME = "bevel_token";
23
+ /**
24
+ * Max age of the JWT cookie (seconds). Matches the JWT's own `expiresIn:
25
+ * '7d'` so the cookie expires when the token does — browsers stop
26
+ * sending it past expiry, sparing the auth middleware verifying tokens
27
+ * that are guaranteed to fail.
28
+ */
29
+ export declare const AUTH_COOKIE_MAX_AGE_S: number;
30
+ /**
31
+ * Whether the auth cookie is marked `Secure`, from the scheme the deployment
32
+ * is reached on: a browser never sends a `Secure` cookie over plain http, so
33
+ * deriving it from `NODE_ENV` left a production deployment served over http
34
+ * (a private network, a proxy that terminates nothing) without SSE and
35
+ * images. One rule, asked by the composition root for every path that sets
36
+ * the cookie. Read by the URL parser, as the deployment's URL is everywhere
37
+ * else: a scheme is case-insensitive, and `HTTPS://` is https.
38
+ */
39
+ export declare function authCookieSecure(publicUrl: string): boolean;
40
+ /**
41
+ * Set the JWT as the HttpOnly auth cookie so transports that can't carry
42
+ * headers (EventSource for SSE, image tags) authenticate automatically. JSON
43
+ * callers continue to use the Bearer header returned in the body. The one
44
+ * place the cookie's attributes are spelled: password login, the password
45
+ * change and every SSO provider set it through here.
46
+ */
47
+ export declare function setAuthCookie(res: Response, token: string, secure: boolean): void;
22
48
  /**
23
49
  * Read the auth cookie out of the raw `Cookie` header without pulling in
24
50
  * `cookie-parser`. We only ever look for one cookie, so a tiny parser
@@ -1 +1 @@
1
- {"version":3,"file":"auth.middleware.d.ts","sourceRoot":"","sources":["../../../src/modules/auth/auth.middleware.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIrD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,OAAO,CAAC;QAChB,UAAU,OAAO;YACf,MAAM,CAAC,EAAE,MAAM,CAAC;YAChB,SAAS,CAAC,EAAE,MAAM,CAAC;SACpB;KACF;CACF;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,gBAAgB,gBAAgB,CAAC;AAE9C;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAe1D;AAED,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,gBAAgB,CAAC,IACrE,KAAK,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,YAAY,mBAsC9D"}
1
+ {"version":3,"file":"auth.middleware.d.ts","sourceRoot":"","sources":["../../../src/modules/auth/auth.middleware.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIrD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,OAAO,CAAC;QAChB,UAAU,OAAO;YACf,MAAM,CAAC,EAAE,MAAM,CAAC;YAChB,SAAS,CAAC,EAAE,MAAM,CAAC;SACpB;KACF;CACF;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,gBAAgB,gBAAgB,CAAC;AAE9C;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,QAAmB,CAAC;AAEtD;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAE3D;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,IAAI,CAQjF;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAe1D;AAED,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,gBAAgB,CAAC,IACrE,KAAK,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,YAAY,mBAwC9D"}
@@ -1,4 +1,4 @@
1
- import { AccountDeactivatedError, AuthBackendError } from './account-admission.js';
1
+ import { AccountDeactivatedError, AuthBackendError, SessionEndedError } from './account-admission.js';
2
2
  /**
3
3
  * Name of the auth cookie set alongside the Bearer JWT at login. The cookie
4
4
  * exists solely so the SSE route can authenticate — the browser's
@@ -7,9 +7,45 @@ import { AccountDeactivatedError, AuthBackendError } from './account-admission.j
7
7
  * header, which the frontend stores in memory and attaches via `authFetch`.
8
8
  *
9
9
  * Same JWT value as the Bearer token. The cookie is `HttpOnly` + `SameSite=Lax`
10
- * + `Secure` (in prod) — see `auth.routes.ts` for the issue site.
10
+ * + `Secure` when the deployment is reached over https — {@link setAuthCookie}
11
+ * is its one issue site, for every sign-in path and the password change.
11
12
  */
12
13
  export const AUTH_COOKIE_NAME = 'bevel_token';
14
+ /**
15
+ * Max age of the JWT cookie (seconds). Matches the JWT's own `expiresIn:
16
+ * '7d'` so the cookie expires when the token does — browsers stop
17
+ * sending it past expiry, sparing the auth middleware verifying tokens
18
+ * that are guaranteed to fail.
19
+ */
20
+ export const AUTH_COOKIE_MAX_AGE_S = 7 * 24 * 60 * 60;
21
+ /**
22
+ * Whether the auth cookie is marked `Secure`, from the scheme the deployment
23
+ * is reached on: a browser never sends a `Secure` cookie over plain http, so
24
+ * deriving it from `NODE_ENV` left a production deployment served over http
25
+ * (a private network, a proxy that terminates nothing) without SSE and
26
+ * images. One rule, asked by the composition root for every path that sets
27
+ * the cookie. Read by the URL parser, as the deployment's URL is everywhere
28
+ * else: a scheme is case-insensitive, and `HTTPS://` is https.
29
+ */
30
+ export function authCookieSecure(publicUrl) {
31
+ return new URL(publicUrl).protocol === 'https:';
32
+ }
33
+ /**
34
+ * Set the JWT as the HttpOnly auth cookie so transports that can't carry
35
+ * headers (EventSource for SSE, image tags) authenticate automatically. JSON
36
+ * callers continue to use the Bearer header returned in the body. The one
37
+ * place the cookie's attributes are spelled: password login, the password
38
+ * change and every SSO provider set it through here.
39
+ */
40
+ export function setAuthCookie(res, token, secure) {
41
+ res.cookie(AUTH_COOKIE_NAME, token, {
42
+ httpOnly: true,
43
+ sameSite: 'lax',
44
+ secure,
45
+ maxAge: AUTH_COOKIE_MAX_AGE_S * 1000,
46
+ path: '/',
47
+ });
48
+ }
13
49
  /**
14
50
  * Read the auth cookie out of the raw `Cookie` header without pulling in
15
51
  * `cookie-parser`. We only ever look for one cookie, so a tiny parser
@@ -67,8 +103,10 @@ export function createAuthMiddleware(authService) {
67
103
  return;
68
104
  }
69
105
  // A 401 otherwise, so the app drops the session and shows the login
70
- // page; a switched-off account is told why there.
71
- res.status(401).json({ error: err instanceof AccountDeactivatedError ? err.message : 'Invalid or expired token' });
106
+ // page; a switched-off account, and a session a password change
107
+ // ended, are told why there.
108
+ const worded = err instanceof AccountDeactivatedError || err instanceof SessionEndedError;
109
+ res.status(401).json({ error: worded ? err.message : 'Invalid or expired token' });
72
110
  return;
73
111
  }
74
112
  req.userId = session.userId;