@bevel-software/platform-core-backend 0.28.1 → 0.30.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 (274) hide show
  1. package/agent-guide/access-control.md +15 -0
  2. package/agent-guide/skills.md +8 -0
  3. package/dist/__tests__/test-repositories.d.ts +3 -0
  4. package/dist/__tests__/test-repositories.d.ts.map +1 -0
  5. package/dist/__tests__/test-repositories.js +18 -0
  6. package/dist/__tests__/test-repositories.js.map +1 -0
  7. package/dist/core/catalog-revision.d.ts.map +1 -1
  8. package/dist/core/catalog-revision.js +4 -2
  9. package/dist/core/catalog-revision.js.map +1 -1
  10. package/dist/core/compose-embed.d.ts +35 -0
  11. package/dist/core/compose-embed.d.ts.map +1 -0
  12. package/dist/core/compose-embed.js +14 -0
  13. package/dist/core/compose-embed.js.map +1 -0
  14. package/dist/core/core-ports.d.ts +10 -0
  15. package/dist/core/core-ports.d.ts.map +1 -1
  16. package/dist/core/core-ports.js.map +1 -1
  17. package/dist/core/create-core-server.d.ts.map +1 -1
  18. package/dist/core/create-core-server.js +8 -2
  19. package/dist/core/create-core-server.js.map +1 -1
  20. package/dist/core/create-core-services.d.ts +4 -1
  21. package/dist/core/create-core-services.d.ts.map +1 -1
  22. package/dist/core/create-core-services.js +57 -18
  23. package/dist/core/create-core-services.js.map +1 -1
  24. package/dist/core/lifecycle.d.ts +19 -6
  25. package/dist/core/lifecycle.d.ts.map +1 -1
  26. package/dist/core/lifecycle.js +17 -6
  27. package/dist/core/lifecycle.js.map +1 -1
  28. package/dist/modules/access/access-control.interface.d.ts +20 -0
  29. package/dist/modules/access/access-control.interface.d.ts.map +1 -1
  30. package/dist/modules/access/access-control.service.d.ts +68 -15
  31. package/dist/modules/access/access-control.service.d.ts.map +1 -1
  32. package/dist/modules/access/access-control.service.js +282 -58
  33. package/dist/modules/access/access-control.service.js.map +1 -1
  34. package/dist/modules/access/access.routes.d.ts.map +1 -1
  35. package/dist/modules/access/access.routes.js +20 -6
  36. package/dist/modules/access/access.routes.js.map +1 -1
  37. package/dist/modules/agent-instructions/shared-file-rules.d.ts +1 -1
  38. package/dist/modules/agent-instructions/shared-file-rules.js +1 -1
  39. package/dist/modules/auth/index.d.ts +15 -0
  40. package/dist/modules/auth/index.d.ts.map +1 -0
  41. package/dist/modules/auth/index.js +20 -0
  42. package/dist/modules/auth/index.js.map +1 -0
  43. package/dist/modules/diff/diff.service.d.ts.map +1 -1
  44. package/dist/modules/diff/diff.service.js +7 -1
  45. package/dist/modules/diff/diff.service.js.map +1 -1
  46. package/dist/modules/embed/embed.interface.d.ts +22 -0
  47. package/dist/modules/embed/embed.interface.d.ts.map +1 -1
  48. package/dist/modules/embed/embed.service.d.ts +28 -14
  49. package/dist/modules/embed/embed.service.d.ts.map +1 -1
  50. package/dist/modules/embed/embed.service.js +38 -17
  51. package/dist/modules/embed/embed.service.js.map +1 -1
  52. package/dist/modules/embed/embed.tools.d.ts.map +1 -1
  53. package/dist/modules/embed/embed.tools.js +10 -2
  54. package/dist/modules/embed/embed.tools.js.map +1 -1
  55. package/dist/modules/kb-fs/git-dir.d.ts +21 -0
  56. package/dist/modules/kb-fs/git-dir.d.ts.map +1 -0
  57. package/dist/modules/kb-fs/git-dir.js +58 -0
  58. package/dist/modules/kb-fs/git-dir.js.map +1 -0
  59. package/dist/modules/kb-fs/index.d.ts +9 -0
  60. package/dist/modules/kb-fs/index.d.ts.map +1 -0
  61. package/dist/modules/kb-fs/index.js +3 -0
  62. package/dist/modules/kb-fs/index.js.map +1 -0
  63. package/dist/modules/kb-fs/ref-files.d.ts +63 -0
  64. package/dist/modules/kb-fs/ref-files.d.ts.map +1 -0
  65. package/dist/modules/kb-fs/ref-files.js +249 -0
  66. package/dist/modules/kb-fs/ref-files.js.map +1 -0
  67. package/dist/modules/plugins/join-request-jobs.service.d.ts.map +1 -1
  68. package/dist/modules/plugins/join-request-jobs.service.js +43 -8
  69. package/dist/modules/plugins/join-request-jobs.service.js.map +1 -1
  70. package/dist/modules/plugins/teams.routes.d.ts +4 -0
  71. package/dist/modules/plugins/teams.routes.d.ts.map +1 -1
  72. package/dist/modules/plugins/teams.routes.js +9 -1
  73. package/dist/modules/plugins/teams.routes.js.map +1 -1
  74. package/dist/modules/skills/skills.contract.d.ts.map +1 -1
  75. package/dist/modules/skills/skills.tools.d.ts +8 -1
  76. package/dist/modules/skills/skills.tools.d.ts.map +1 -1
  77. package/dist/modules/skills/skills.tools.js +115 -11
  78. package/dist/modules/skills/skills.tools.js.map +1 -1
  79. package/dist/modules/tool-auth/internal-token.service.d.ts +1 -1
  80. package/dist/modules/tool-auth/tool-auth.middleware.d.ts +1 -2
  81. package/dist/modules/tool-auth/tool-auth.middleware.d.ts.map +1 -1
  82. package/dist/modules/tool-auth/tool-auth.middleware.js +1 -2
  83. package/dist/modules/tool-auth/tool-auth.middleware.js.map +1 -1
  84. package/dist/modules/tool-helpers/default-branch-write.d.ts +69 -0
  85. package/dist/modules/tool-helpers/default-branch-write.d.ts.map +1 -0
  86. package/dist/modules/tool-helpers/default-branch-write.js +63 -0
  87. package/dist/modules/tool-helpers/default-branch-write.js.map +1 -0
  88. package/dist/modules/tool-helpers/index.d.ts +1 -0
  89. package/dist/modules/tool-helpers/index.d.ts.map +1 -1
  90. package/dist/modules/tool-helpers/index.js +1 -0
  91. package/dist/modules/tool-helpers/index.js.map +1 -1
  92. package/dist/modules/tool-helpers/tool-handler.d.ts +2 -2
  93. package/dist/modules/tool-helpers/tool.contract.d.ts +2 -2
  94. package/dist/modules/workflow/file-lock.service.d.ts +27 -5
  95. package/dist/modules/workflow/file-lock.service.d.ts.map +1 -1
  96. package/dist/modules/workflow/file-lock.service.js +70 -18
  97. package/dist/modules/workflow/file-lock.service.js.map +1 -1
  98. package/dist/modules/workflow/git/git.service.d.ts +42 -0
  99. package/dist/modules/workflow/git/git.service.d.ts.map +1 -1
  100. package/dist/modules/workflow/git/git.service.js +201 -24
  101. package/dist/modules/workflow/git/git.service.js.map +1 -1
  102. package/dist/modules/workflow/index.d.ts +8 -0
  103. package/dist/modules/workflow/index.d.ts.map +1 -0
  104. package/dist/modules/workflow/index.js +8 -0
  105. package/dist/modules/workflow/index.js.map +1 -0
  106. package/dist/modules/workflow/pending-commits.service.d.ts +2 -17
  107. package/dist/modules/workflow/pending-commits.service.d.ts.map +1 -1
  108. package/dist/modules/workflow/pending-commits.service.js +4 -24
  109. package/dist/modules/workflow/pending-commits.service.js.map +1 -1
  110. package/dist/modules/workflow/workflow-hooks.d.ts +1 -1
  111. package/dist/modules/workflow/workflow.routes.d.ts.map +1 -1
  112. package/dist/modules/workflow/workflow.routes.js +20 -1
  113. package/dist/modules/workflow/workflow.routes.js.map +1 -1
  114. package/dist/modules/workflow/workflow.service.d.ts.map +1 -1
  115. package/dist/modules/workflow/workflow.service.js +5 -3
  116. package/dist/modules/workflow/workflow.service.js.map +1 -1
  117. package/dist/modules/workspace/agent-access.gate.d.ts +2 -2
  118. package/dist/modules/workspace/agent-access.gate.js +2 -2
  119. package/dist/modules/workspace/bounded-matcher.d.ts +79 -0
  120. package/dist/modules/workspace/bounded-matcher.d.ts.map +1 -0
  121. package/dist/modules/workspace/bounded-matcher.js +261 -0
  122. package/dist/modules/workspace/bounded-matcher.js.map +1 -0
  123. package/dist/modules/workspace/fetch-instant.d.ts +9 -0
  124. package/dist/modules/workspace/fetch-instant.d.ts.map +1 -0
  125. package/dist/modules/workspace/fetch-instant.js +13 -0
  126. package/dist/modules/workspace/fetch-instant.js.map +1 -0
  127. package/dist/modules/workspace/index.d.ts +17 -0
  128. package/dist/modules/workspace/index.d.ts.map +1 -0
  129. package/dist/modules/workspace/index.js +16 -0
  130. package/dist/modules/workspace/index.js.map +1 -0
  131. package/dist/modules/workspace/kb-repository.contract.d.ts +124 -0
  132. package/dist/modules/workspace/kb-repository.contract.d.ts.map +1 -0
  133. package/dist/modules/workspace/kb-repository.contract.js +19 -0
  134. package/dist/modules/workspace/kb-repository.contract.js.map +1 -0
  135. package/dist/modules/workspace/kb-repository.d.ts +236 -0
  136. package/dist/modules/workspace/kb-repository.d.ts.map +1 -0
  137. package/dist/modules/workspace/kb-repository.js +811 -0
  138. package/dist/modules/workspace/kb-repository.js.map +1 -0
  139. package/dist/modules/workspace/pattern-matcher.contract.d.ts +50 -0
  140. package/dist/modules/workspace/pattern-matcher.contract.d.ts.map +1 -0
  141. package/dist/modules/workspace/pattern-matcher.contract.js +27 -0
  142. package/dist/modules/workspace/pattern-matcher.contract.js.map +1 -0
  143. package/dist/modules/workspace/routine-write-policy.d.ts +0 -7
  144. package/dist/modules/workspace/routine-write-policy.d.ts.map +1 -1
  145. package/dist/modules/workspace/routine-write-policy.js +0 -5
  146. package/dist/modules/workspace/routine-write-policy.js.map +1 -1
  147. package/dist/modules/workspace/set-aside-clone.d.ts +40 -0
  148. package/dist/modules/workspace/set-aside-clone.d.ts.map +1 -1
  149. package/dist/modules/workspace/set-aside-clone.js +139 -0
  150. package/dist/modules/workspace/set-aside-clone.js.map +1 -1
  151. package/dist/modules/workspace/startup/kb-startup-runner.d.ts +99 -0
  152. package/dist/modules/workspace/startup/kb-startup-runner.d.ts.map +1 -1
  153. package/dist/modules/workspace/startup/kb-startup-runner.js +407 -29
  154. package/dist/modules/workspace/startup/kb-startup-runner.js.map +1 -1
  155. package/dist/modules/workspace/workspace.service.d.ts +68 -32
  156. package/dist/modules/workspace/workspace.service.d.ts.map +1 -1
  157. package/dist/modules/workspace/workspace.service.js +240 -161
  158. package/dist/modules/workspace/workspace.service.js.map +1 -1
  159. package/dist/modules/workspace/workspace.tools.d.ts +13 -4
  160. package/dist/modules/workspace/workspace.tools.d.ts.map +1 -1
  161. package/dist/modules/workspace/workspace.tools.js +268 -356
  162. package/dist/modules/workspace/workspace.tools.js.map +1 -1
  163. package/dist/shared/workspace-id.d.ts +17 -0
  164. package/dist/shared/workspace-id.d.ts.map +1 -1
  165. package/dist/shared/workspace-id.js +24 -0
  166. package/dist/shared/workspace-id.js.map +1 -1
  167. package/dist/test-setup.js +4 -0
  168. package/dist/test-setup.js.map +1 -1
  169. package/mcp-app/page.html +142 -8
  170. package/package.json +3 -3
  171. package/src/__tests__/test-repositories.ts +22 -0
  172. package/src/__tests__/workspace-service.ts +69 -0
  173. package/src/core/__tests__/compose-embed.test.ts +65 -0
  174. package/src/core/__tests__/lifecycle.test.ts +45 -26
  175. package/src/core/catalog-revision.ts +4 -2
  176. package/src/core/compose-embed.ts +50 -0
  177. package/src/core/core-ports.ts +10 -0
  178. package/src/core/create-core-server.ts +8 -2
  179. package/src/core/create-core-services.ts +63 -24
  180. package/src/core/lifecycle.ts +34 -12
  181. package/src/modules/access/__tests__/access-control.atref-cache.test.ts +443 -25
  182. package/src/modules/access/__tests__/access-control.group-read.test.ts +73 -0
  183. package/src/modules/access/__tests__/access.routes.group-grant.test.ts +66 -0
  184. package/src/modules/access/__tests__/access.routes.unknown-email.test.ts +2 -0
  185. package/src/modules/access/access-control.interface.ts +22 -0
  186. package/src/modules/access/access-control.service.ts +302 -58
  187. package/src/modules/access/access.routes.ts +22 -6
  188. package/src/modules/agent-instructions/shared-file-rules.ts +1 -1
  189. package/src/modules/auth/index.ts +29 -0
  190. package/src/modules/diff/__tests__/diff.service.seed-atomicity.test.ts +2 -1
  191. package/src/modules/diff/__tests__/diff.service.test.ts +2 -1
  192. package/src/modules/diff/__tests__/diff.service.worktree.test.ts +76 -0
  193. package/src/modules/diff/diff.service.ts +6 -4
  194. package/src/modules/embed/__tests__/embed.service.test.ts +76 -3
  195. package/src/modules/embed/__tests__/embed.tools.test.ts +29 -0
  196. package/src/modules/embed/embed.interface.ts +24 -0
  197. package/src/modules/embed/embed.service.ts +44 -19
  198. package/src/modules/embed/embed.tools.ts +10 -2
  199. package/src/modules/kb-fs/__tests__/git-dir.test.ts +77 -0
  200. package/src/modules/kb-fs/__tests__/ref-files.test.ts +338 -0
  201. package/src/modules/kb-fs/git-dir.ts +53 -0
  202. package/src/modules/kb-fs/index.ts +8 -0
  203. package/src/modules/kb-fs/ref-files.ts +279 -0
  204. package/src/modules/plugins/__tests__/join-request-jobs.service.test.ts +73 -6
  205. package/src/modules/plugins/__tests__/teams.routes.test.ts +55 -0
  206. package/src/modules/plugins/join-request-jobs.service.ts +45 -8
  207. package/src/modules/plugins/teams.routes.ts +14 -1
  208. package/src/modules/settings/__tests__/setup.routes.layout-phase.test.ts +2 -2
  209. package/src/modules/settings/__tests__/setup.routes.managed-phase.test.ts +2 -2
  210. package/src/modules/skills/__tests__/branch-skills.tools.test.ts +1 -1
  211. package/src/modules/skills/skills.contract.ts +4 -0
  212. package/src/modules/skills/skills.tools.ts +120 -10
  213. package/src/modules/tool-auth/internal-token.service.ts +1 -1
  214. package/src/modules/tool-auth/tool-auth.middleware.ts +1 -2
  215. package/src/modules/tool-helpers/__tests__/branch-declaration.test.ts +2 -2
  216. package/src/modules/tool-helpers/__tests__/can-write.tools.test.ts +581 -0
  217. package/src/modules/tool-helpers/default-branch-write.ts +90 -0
  218. package/src/modules/tool-helpers/index.ts +5 -0
  219. package/src/modules/tool-helpers/tool-handler.ts +2 -2
  220. package/src/modules/tool-helpers/tool.contract.ts +2 -2
  221. package/src/modules/tool-registry/__tests__/tool-description-length.test.ts +42 -3
  222. package/src/modules/workflow/__tests__/fake-file-lock-db.ts +13 -2
  223. package/src/modules/workflow/__tests__/workflow.routes.lock-path.test.ts +168 -1
  224. package/src/modules/workflow/__tests__/workflow.service.delete-branch.test.ts +102 -6
  225. package/src/modules/workflow/file-lock.service.ts +79 -18
  226. package/src/modules/workflow/git/__tests__/git.service.changedPathsMemo.test.ts +175 -0
  227. package/src/modules/workflow/git/__tests__/git.service.readFileAtRef.test.ts +42 -0
  228. package/src/modules/workflow/git/__tests__/git.service.worktrees.test.ts +284 -0
  229. package/src/modules/workflow/git/git.service.ts +207 -22
  230. package/src/modules/workflow/index.ts +7 -0
  231. package/src/modules/workflow/pending-commits.service.ts +4 -23
  232. package/src/modules/workflow/workflow-hooks.ts +1 -1
  233. package/src/modules/workflow/workflow.routes.ts +24 -1
  234. package/src/modules/workflow/workflow.service.ts +3 -2
  235. package/src/modules/workspace/__tests__/agent-downloads.test.ts +2 -2
  236. package/src/modules/workspace/__tests__/bounded-matcher.test.ts +213 -0
  237. package/src/modules/workspace/__tests__/git-internals.security.test.ts +22 -7
  238. package/src/modules/workspace/__tests__/kb-repository.test.ts +481 -0
  239. package/src/modules/workspace/__tests__/rest-tool-arguments.test.ts +14 -0
  240. package/src/modules/workspace/__tests__/routine-write-policy.test.ts +0 -11
  241. package/src/modules/workspace/__tests__/workspace-paths-inside-the-repo.test.ts +2 -2
  242. package/src/modules/workspace/__tests__/workspace.routes.folder-zip-access.test.ts +2 -2
  243. package/src/modules/workspace/__tests__/workspace.routes.folders.test.ts +4 -3
  244. package/src/modules/workspace/__tests__/workspace.service.any-workspace-credentials.test.ts +2 -2
  245. package/src/modules/workspace/__tests__/workspace.service.ensure-remotes-fetched.test.ts +2 -2
  246. package/src/modules/workspace/__tests__/workspace.service.forget-clone-races.test.ts +12 -5
  247. package/src/modules/workspace/__tests__/workspace.service.list-cloned.test.ts +6 -6
  248. package/src/modules/workspace/__tests__/workspace.service.move-never-overwrites.test.ts +2 -1
  249. package/src/modules/workspace/__tests__/workspace.service.read-filter.test.ts +2 -1
  250. package/src/modules/workspace/__tests__/workspace.service.replaced-repository.test.ts +2 -1
  251. package/src/modules/workspace/__tests__/workspace.service.test.ts +24 -23
  252. package/src/modules/workspace/__tests__/workspace.service.unknown-branch.test.ts +2 -1
  253. package/src/modules/workspace/__tests__/workspace.service.worktrees.test.ts +620 -0
  254. package/src/modules/workspace/__tests__/workspace.tools.agents-file.test.ts +15 -1
  255. package/src/modules/workspace/__tests__/workspace.tools.branch-errors.test.ts +71 -5
  256. package/src/modules/workspace/__tests__/workspace.tools.test.ts +174 -309
  257. package/src/modules/workspace/agent-access.gate.ts +2 -2
  258. package/src/modules/workspace/bounded-matcher.ts +328 -0
  259. package/src/modules/workspace/fetch-instant.ts +13 -0
  260. package/src/modules/workspace/index.ts +26 -0
  261. package/src/modules/workspace/kb-repository.contract.ts +124 -0
  262. package/src/modules/workspace/kb-repository.ts +844 -0
  263. package/src/modules/workspace/pattern-matcher.contract.ts +69 -0
  264. package/src/modules/workspace/routine-write-policy.ts +0 -15
  265. package/src/modules/workspace/set-aside-clone.ts +140 -0
  266. package/src/modules/workspace/startup/__tests__/kb-startup-runner.degraded.test.ts +3 -2
  267. package/src/modules/workspace/startup/__tests__/kb-startup-runner.test.ts +12 -10
  268. package/src/modules/workspace/startup/__tests__/kb-startup-runner.worktrees.test.ts +613 -0
  269. package/src/modules/workspace/startup/kb-startup-runner.ts +422 -29
  270. package/src/modules/workspace/startup/steps/__tests__/steps.test.ts +4 -3
  271. package/src/modules/workspace/workspace.service.ts +247 -169
  272. package/src/modules/workspace/workspace.tools.ts +299 -385
  273. package/src/shared/workspace-id.ts +24 -0
  274. package/src/test-setup.ts +5 -0
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Where a checkout's git directory is, read from its `.git` without spawning
3
+ * git — the one resolver every reader of a worktree's own files uses.
4
+ *
5
+ * A full clone's `.git` is the git directory itself. A worktree's `.git` is a
6
+ * FILE (`gitdir: <path>`) naming its folder in the repository, resolved
7
+ * against the file's own folder as git does.
8
+ */
9
+ /**
10
+ * The folder a gitfile (`gitdir: <path>`) names; null when the file is absent,
11
+ * is a folder, or says nothing of the kind. Any other read error propagates:
12
+ * a `.git` that could not be read has not been shown to be anything.
13
+ */
14
+ export declare function readGitfile(gitfile: string): Promise<string | null>;
15
+ /**
16
+ * The git directory of the checkout at `checkoutDir`: its `.git` folder, or
17
+ * the folder its `.git` file names. Null when there is no `.git`, or a `.git`
18
+ * file that names no folder. Errors other than absence propagate.
19
+ */
20
+ export declare function gitDirOf(checkoutDir: string): Promise<string | null>;
21
+ //# sourceMappingURL=git-dir.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"git-dir.d.ts","sourceRoot":"","sources":["../../../src/modules/kb-fs/git-dir.ts"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AAEH;;;;GAIG;AACH,wBAAsB,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAezE;AAED;;;;GAIG;AACH,wBAAsB,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAY1E"}
@@ -0,0 +1,58 @@
1
+ import fs from 'node:fs/promises';
2
+ import path from 'node:path';
3
+ import { isAbsence } from '../../shared/fs.contract.js';
4
+ /**
5
+ * Where a checkout's git directory is, read from its `.git` without spawning
6
+ * git — the one resolver every reader of a worktree's own files uses.
7
+ *
8
+ * A full clone's `.git` is the git directory itself. A worktree's `.git` is a
9
+ * FILE (`gitdir: <path>`) naming its folder in the repository, resolved
10
+ * against the file's own folder as git does.
11
+ */
12
+ /**
13
+ * The folder a gitfile (`gitdir: <path>`) names; null when the file is absent,
14
+ * is a folder, or says nothing of the kind. Any other read error propagates:
15
+ * a `.git` that could not be read has not been shown to be anything.
16
+ */
17
+ export async function readGitfile(gitfile) {
18
+ let text;
19
+ try {
20
+ text = await fs.readFile(gitfile, 'utf-8');
21
+ }
22
+ catch (err) {
23
+ if (isAbsence(err) || err.code === 'EISDIR')
24
+ return null;
25
+ throw err;
26
+ }
27
+ // Exactly what git reads (setup.c, `read_gitfile_gently`): the whole file
28
+ // is `gitdir: ` and a path, with nothing after the path but line ends. A
29
+ // second line, other spacing before the path, or anything after it is no
30
+ // gitfile to git, so it names no folder here either.
31
+ const m = /^gitdir: ([^\r\n]+?)[\r\n]*$/.exec(text);
32
+ if (!m)
33
+ return null;
34
+ return path.resolve(path.dirname(gitfile), m[1]);
35
+ }
36
+ /**
37
+ * The git directory of the checkout at `checkoutDir`: its `.git` folder, or
38
+ * the folder its `.git` file names. Null when there is no `.git`, or a `.git`
39
+ * file that names no folder. Errors other than absence propagate.
40
+ */
41
+ export async function gitDirOf(checkoutDir) {
42
+ const dotGit = path.join(checkoutDir, '.git');
43
+ let stat;
44
+ try {
45
+ stat = await fs.stat(dotGit);
46
+ }
47
+ catch (err) {
48
+ if (isAbsence(err))
49
+ return null;
50
+ throw err;
51
+ }
52
+ if (stat.isDirectory())
53
+ return dotGit;
54
+ if (!stat.isFile())
55
+ return null;
56
+ return readGitfile(dotGit);
57
+ }
58
+ //# sourceMappingURL=git-dir.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"git-dir.js","sourceRoot":"","sources":["../../../src/modules/kb-fs/git-dir.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAExD;;;;;;;GAOG;AAEH;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,OAAe;IAC/C,IAAI,IAAY,CAAC;IACjB,IAAI,CAAC;QACH,IAAI,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC7C,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,IAAI,SAAS,CAAC,GAAG,CAAC,IAAK,GAA6B,CAAC,IAAI,KAAK,QAAQ;YAAE,OAAO,IAAI,CAAC;QACpF,MAAM,GAAG,CAAC;IACZ,CAAC;IACD,0EAA0E;IAC1E,yEAAyE;IACzE,yEAAyE;IACzE,qDAAqD;IACrD,MAAM,CAAC,GAAG,8BAA8B,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACpD,IAAI,CAAC,CAAC;QAAE,OAAO,IAAI,CAAC;IACpB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,CAAE,CAAC,CAAC;AACpD,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,QAAQ,CAAC,WAAmB;IAChD,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IAC9C,IAAI,IAAI,CAAC;IACT,IAAI,CAAC;QACH,IAAI,GAAG,MAAM,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC/B,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,IAAI,SAAS,CAAC,GAAG,CAAC;YAAE,OAAO,IAAI,CAAC;QAChC,MAAM,GAAG,CAAC;IACZ,CAAC;IACD,IAAI,IAAI,CAAC,WAAW,EAAE;QAAE,OAAO,MAAM,CAAC;IACtC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;QAAE,OAAO,IAAI,CAAC;IAChC,OAAO,WAAW,CAAC,MAAM,CAAC,CAAC;AAC7B,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * What the kb-fs module offers the other modules. The filesystem and the
3
+ * locks are wired by the composition root; a module that writes through the
4
+ * workspace needs only the shape of the gate every write passes first.
5
+ */
6
+ export type { WriteValidator } from './locking-filesystem.js';
7
+ export { readRefSha, readRevSha, type RefFileAnswer } from './ref-files.js';
8
+ export { gitDirOf, readGitfile } from './git-dir.js';
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/kb-fs/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,YAAY,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,KAAK,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC5E,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { readRefSha, readRevSha } from './ref-files.js';
2
+ export { gitDirOf, readGitfile } from './git-dir.js';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/kb-fs/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAsB,MAAM,gBAAgB,CAAC;AAC5E,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC"}
@@ -0,0 +1,63 @@
1
+ /**
2
+ * Where a ref points, read from the repository's own files instead of a
3
+ * `git rev-parse` process.
4
+ *
5
+ * A branch tip is a small file git maintains: `refs/remotes/origin/<branch>`
6
+ * as a loose file, or one line of `packed-refs`. Reading it costs a file read
7
+ * and no fork, and it is exactly as current as the last fetch — the same
8
+ * freshness a `rev-parse` has. A change-request listing resolves two tips per
9
+ * open request and the access gates resolve every ref they decide at; with a
10
+ * hundred open requests that was hundreds of forks per listing, each costing
11
+ * tens of milliseconds of the main thread on a server holding a large heap.
12
+ *
13
+ * What is read, in git's own order: a loose file under the common directory
14
+ * (a worktree shares `refs/` with the repository it belongs to), then
15
+ * `packed-refs`. `HEAD` and the per-worktree namespaces (`refs/worktree/`,
16
+ * `refs/bisect/`, `refs/rewritten/`) are a worktree's own: read loose from
17
+ * its git directory, never from the common directory, and never packed. A
18
+ * symbolic ref (`ref: refs/heads/main`) is followed. A tag is never decided
19
+ * here: its file may hold a tag object, and what that peels to is git's to
20
+ * say.
21
+ *
22
+ * The answer is one of three things, and the caller treats them differently:
23
+ * `{ sha }` is what git would answer too; `'missing'` means every file git
24
+ * would consult says there is no such ref, which is as authoritative as
25
+ * `rev-parse` answering nothing; `'unreadable'` means this reader could not
26
+ * decide — a repository it does not understand (one whose refs live in a
27
+ * reftable, say), a tag, a corrupt file, a name it refuses — and the caller
28
+ * asks git, which is authoritative. Never a guess: a read error is
29
+ * `'unreadable'`, not `'missing'`, so a flaky disk sends the caller to git
30
+ * rather than making a branch disappear.
31
+ *
32
+ * What the files guarantee about the object: git itself refuses to write a
33
+ * non-commit under `refs/heads/`, and `refs/remotes/origin/` mirrors the
34
+ * remote's `refs/heads/`, so a branch tip read here is a commit as surely
35
+ * as `rev-parse <branch>^{commit}` would make it one. A caller that holds
36
+ * an object id rather than a name, or a `<rev>^{...}` form, asks git.
37
+ */
38
+ export type RefFileAnswer = {
39
+ sha: string;
40
+ } | 'missing' | 'unreadable';
41
+ /**
42
+ * The commit a full ref name (`refs/...`) or `HEAD` points at in the
43
+ * repository behind `repoDir` (a clone, or a worktree of one). See the module
44
+ * doc for the three answers and what each means to the caller.
45
+ *
46
+ * "Missing" is what `rev-parse` answers nothing for, and `rev-parse` tries
47
+ * the same prefixes for a full name as for a short one (`refs/heads/x` is
48
+ * also looked for as `refs/heads/refs/heads/x`), so a name that is missing
49
+ * as itself but present under a prefix is git's to resolve.
50
+ */
51
+ export declare function readRefSha(repoDir: string, ref: string): Promise<RefFileAnswer>;
52
+ /**
53
+ * {@link readRefSha} for a name as a caller holds it (`main`, `origin/main`,
54
+ * `HEAD`, `refs/heads/main`): the first of git's candidates that resolves,
55
+ * starting where git starts, at `$GIT_DIR/<name>` itself. Whatever is found
56
+ * there (`MERGE_HEAD`, `FETCH_HEAD`, `AUTO_MERGE`, which may name a tree) is
57
+ * git's to resolve; only its absence lets the `refs/` candidates be read.
58
+ * `'missing'` only when every candidate is missing; `'unreadable'` as soon
59
+ * as one cannot be decided, because the undecided one might be the one git
60
+ * would pick.
61
+ */
62
+ export declare function readRevSha(repoDir: string, rev: string): Promise<RefFileAnswer>;
63
+ //# sourceMappingURL=ref-files.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ref-files.d.ts","sourceRoot":"","sources":["../../../src/modules/kb-fs/ref-files.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,MAAM,MAAM,aAAa,GAAG;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,GAAG,YAAY,CAAC;AAqJvE;;;;;;;;;GASG;AACH,wBAAsB,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CASrF;AA+BD;;;;;;;;;GASG;AACH,wBAAsB,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAUrF"}
@@ -0,0 +1,249 @@
1
+ import fs from 'node:fs/promises';
2
+ import path from 'node:path';
3
+ import { isAbsence } from '../../shared/fs.contract.js';
4
+ import { gitDirOf } from './git-dir.js';
5
+ const SHA = /^(?:[0-9a-f]{40}|[0-9a-f]{64})$/;
6
+ const MAX_SYMREF_DEPTH = 5;
7
+ const PER_WORKTREE = /^refs\/(?:worktree|bisect|rewritten)\//;
8
+ /** A ref name this reader is willing to turn into a path under `.git`. */
9
+ function isSafeRefName(ref) {
10
+ if (ref === 'HEAD')
11
+ return true;
12
+ if (!ref.startsWith('refs/'))
13
+ return false;
14
+ if (!/^[A-Za-z0-9._\-/@+]+$/.test(ref))
15
+ return false;
16
+ return !ref.split('/').some((segment) => segment === '' || segment === '.' || segment === '..');
17
+ }
18
+ async function gitDirsOf(repoDir) {
19
+ let gitDir;
20
+ try {
21
+ gitDir = await gitDirOf(repoDir);
22
+ }
23
+ catch {
24
+ return null;
25
+ }
26
+ if (gitDir === null)
27
+ return null;
28
+ let commonDir = gitDir;
29
+ try {
30
+ const pointer = (await fs.readFile(path.join(gitDir, 'commondir'), 'utf-8')).trim();
31
+ if (pointer)
32
+ commonDir = path.resolve(gitDir, pointer);
33
+ }
34
+ catch (err) {
35
+ if (!isAbsence(err))
36
+ return null;
37
+ }
38
+ // A repository whose refs live in a reftable (`extensions.refStorage`)
39
+ // keeps nothing this reader understands under `refs/` or in `packed-refs`:
40
+ // every name would read as missing. Not a repository for this reader.
41
+ try {
42
+ await fs.stat(path.join(commonDir, 'reftable'));
43
+ return null;
44
+ }
45
+ catch (err) {
46
+ if (!isAbsence(err))
47
+ return null;
48
+ }
49
+ try {
50
+ if (/^\s*refstorage\s*=\s*reftable\s*$/im.test(await fs.readFile(path.join(commonDir, 'config'), 'utf-8'))) {
51
+ return null;
52
+ }
53
+ }
54
+ catch (err) {
55
+ if (!isAbsence(err))
56
+ return null;
57
+ }
58
+ return { gitDir, commonDir };
59
+ }
60
+ /**
61
+ * `packed-refs`: `<sha> <name>` lines, `^<sha>` peel lines, `#` comments.
62
+ * Absent file → an empty table. A line that is none of those is a file this
63
+ * reader does not understand, and the whole table is null (unreadable): a
64
+ * record it skipped could be the one that was asked for.
65
+ */
66
+ async function readPackedRefs(commonDir) {
67
+ let text;
68
+ try {
69
+ text = await fs.readFile(path.join(commonDir, 'packed-refs'), 'utf-8');
70
+ }
71
+ catch (err) {
72
+ return isAbsence(err) ? new Map() : null;
73
+ }
74
+ const table = new Map();
75
+ for (const raw of text.split('\n')) {
76
+ const line = raw.trim();
77
+ if (!line || line.startsWith('#'))
78
+ continue;
79
+ if (line.startsWith('^')) {
80
+ if (!SHA.test(line.slice(1)))
81
+ return null;
82
+ continue;
83
+ }
84
+ const space = line.indexOf(' ');
85
+ const sha = space < 0 ? '' : line.slice(0, space);
86
+ const name = space < 0 ? '' : line.slice(space + 1).trim();
87
+ if (!SHA.test(sha) || !name)
88
+ return null;
89
+ table.set(name, sha);
90
+ }
91
+ return table;
92
+ }
93
+ /**
94
+ * The file at `<dir>/<relative>`, read as git reads a loose ref: a symbolic
95
+ * ref is followed, an object id is the answer, anything else is not decided.
96
+ */
97
+ async function readLooseRef(dirs, dir, relative, depth) {
98
+ let text;
99
+ try {
100
+ text = (await fs.readFile(path.join(dir, ...relative.split('/')), 'utf-8')).trim();
101
+ }
102
+ catch (err) {
103
+ return isAbsence(err) ? 'missing' : 'unreadable';
104
+ }
105
+ if (text.startsWith('ref:')) {
106
+ const answer = await resolveIn(dirs, text.slice('ref:'.length).trim(), depth + 1);
107
+ // A symbolic ref whose target is gone is dangling, and git reports it
108
+ // as such; a packed entry under the symbolic ref's own name does not
109
+ // stand in for it. Git's to report, then.
110
+ return answer === 'missing' ? 'unreadable' : answer;
111
+ }
112
+ return SHA.test(text) ? { sha: text } : 'unreadable';
113
+ }
114
+ async function resolveIn(dirs, ref, depth) {
115
+ if (depth > MAX_SYMREF_DEPTH)
116
+ return 'unreadable';
117
+ if (!isSafeRefName(ref))
118
+ return 'unreadable';
119
+ // `HEAD` and the per-worktree namespaces (`refs/worktree/`, `refs/bisect/`,
120
+ // `refs/rewritten/`) are a worktree's own, kept loose in its git directory
121
+ // and never packed; everything else is the repository's.
122
+ const own = ref === 'HEAD' || PER_WORKTREE.test(ref);
123
+ const loose = await readLooseRef(dirs, own ? dirs.gitDir : dirs.commonDir, ref, depth);
124
+ if (loose !== 'missing')
125
+ return decidedHere(ref, loose);
126
+ if (own)
127
+ return 'missing';
128
+ const packed = await (dirs.packed ??= readPackedRefs(dirs.commonDir));
129
+ if (!packed)
130
+ return 'unreadable';
131
+ const sha = packed.get(ref);
132
+ return sha ? decidedHere(ref, { sha }) : 'missing';
133
+ }
134
+ /**
135
+ * The files decide only where git itself guarantees the object is a commit:
136
+ * `HEAD` and `refs/heads/*`, which git refuses to point at anything else,
137
+ * and `refs/remotes/*`, fetched from a remote's `refs/heads/*` under the
138
+ * same refusal. Anything else that exists — a tag, a ref directly under
139
+ * `refs/` — may name a tree or a blob, which only git's `^{commit}` refuses,
140
+ * so it is git's to resolve. Anything that does not exist is as missing as
141
+ * any other ref, so a short name can move on to the branch git would find
142
+ * next.
143
+ */
144
+ function decidedHere(ref, answer) {
145
+ if (answer !== 'missing' && answer !== 'unreadable' && !commitGuaranteed(ref))
146
+ return 'unreadable';
147
+ return answer;
148
+ }
149
+ function commitGuaranteed(ref) {
150
+ return ref === 'HEAD' || ref.startsWith('refs/heads/') || ref.startsWith('refs/remotes/');
151
+ }
152
+ /**
153
+ * The commit a full ref name (`refs/...`) or `HEAD` points at in the
154
+ * repository behind `repoDir` (a clone, or a worktree of one). See the module
155
+ * doc for the three answers and what each means to the caller.
156
+ *
157
+ * "Missing" is what `rev-parse` answers nothing for, and `rev-parse` tries
158
+ * the same prefixes for a full name as for a short one (`refs/heads/x` is
159
+ * also looked for as `refs/heads/refs/heads/x`), so a name that is missing
160
+ * as itself but present under a prefix is git's to resolve.
161
+ */
162
+ export async function readRefSha(repoDir, ref) {
163
+ const dirs = await gitDirsOf(repoDir);
164
+ if (!dirs)
165
+ return 'unreadable';
166
+ const exact = await resolveIn(dirs, ref, 0);
167
+ if (exact !== 'missing')
168
+ return exact;
169
+ for (const name of prefixedCandidates(ref)) {
170
+ if ((await resolveIn(dirs, name, 0)) !== 'missing')
171
+ return 'unreadable';
172
+ }
173
+ return 'missing';
174
+ }
175
+ /**
176
+ * The names `git rev-parse` tries for `<name>` after `$GIT_DIR/<name>`
177
+ * itself, in git's order (gitrevisions(7)): `refs/<name>`,
178
+ * `refs/tags/<name>`, `refs/heads/<name>`, `refs/remotes/<name>`,
179
+ * `refs/remotes/<name>/HEAD`. The same for every spelling, a full `refs/...`
180
+ * name included.
181
+ */
182
+ function prefixedCandidates(name) {
183
+ return [`refs/${name}`, `refs/tags/${name}`, `refs/heads/${name}`, `refs/remotes/${name}`, `refs/remotes/${name}/HEAD`];
184
+ }
185
+ /**
186
+ * Every name `git rev-parse` tries for a spelling, in git's order: the
187
+ * spelling itself at `$GIT_DIR/<name>` (which for `HEAD` and a full
188
+ * `refs/...` name is the ref file), then the prefixed forms. Null for a
189
+ * spelling this reader does not resolve — an object id or its abbreviation,
190
+ * a `<rev>^{...}` or `@{...}` form, an empty or option-looking name — which
191
+ * the caller sends to git.
192
+ */
193
+ function refNameCandidates(ref) {
194
+ if (!ref || ref.startsWith('-'))
195
+ return null;
196
+ if (/[\^~:@{}\\\s]/.test(ref))
197
+ return null;
198
+ if (/^[0-9a-f]{4,64}$/i.test(ref))
199
+ return null;
200
+ // `main-worktree/<ref>` and `worktrees/<name>/<ref>` reach another
201
+ // worktree's own refs (gitrevisions(7)): git's to resolve.
202
+ if (/^(?:main-worktree|worktrees)\//.test(ref))
203
+ return null;
204
+ return [ref, ...prefixedCandidates(ref)];
205
+ }
206
+ /**
207
+ * {@link readRefSha} for a name as a caller holds it (`main`, `origin/main`,
208
+ * `HEAD`, `refs/heads/main`): the first of git's candidates that resolves,
209
+ * starting where git starts, at `$GIT_DIR/<name>` itself. Whatever is found
210
+ * there (`MERGE_HEAD`, `FETCH_HEAD`, `AUTO_MERGE`, which may name a tree) is
211
+ * git's to resolve; only its absence lets the `refs/` candidates be read.
212
+ * `'missing'` only when every candidate is missing; `'unreadable'` as soon
213
+ * as one cannot be decided, because the undecided one might be the one git
214
+ * would pick.
215
+ */
216
+ export async function readRevSha(repoDir, rev) {
217
+ const candidates = refNameCandidates(rev);
218
+ if (!candidates)
219
+ return 'unreadable';
220
+ const dirs = await gitDirsOf(repoDir);
221
+ if (!dirs)
222
+ return 'unreadable';
223
+ for (const name of candidates) {
224
+ const answer = name === rev ? await resolveAsItself(dirs, rev) : await resolveIn(dirs, name, 0);
225
+ if (answer !== 'missing')
226
+ return answer;
227
+ }
228
+ return 'missing';
229
+ }
230
+ /**
231
+ * Git's first step for any spelling: `$GIT_DIR/<name>`. For `HEAD` and a
232
+ * full `refs/...` name that is the ref itself, read as such. For anything
233
+ * else it is a pseudoref (`MERGE_HEAD`, `AUTO_MERGE`, which may name a
234
+ * tree), and whatever exists there is git's to resolve.
235
+ */
236
+ async function resolveAsItself(dirs, rev) {
237
+ if (rev === 'HEAD' || rev.startsWith('refs/'))
238
+ return resolveIn(dirs, rev, 0);
239
+ if (!isSafeRefName(`refs/${rev}`))
240
+ return 'unreadable';
241
+ try {
242
+ await fs.stat(path.join(dirs.gitDir, ...rev.split('/')));
243
+ return 'unreadable';
244
+ }
245
+ catch (err) {
246
+ return isAbsence(err) ? 'missing' : 'unreadable';
247
+ }
248
+ }
249
+ //# sourceMappingURL=ref-files.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ref-files.js","sourceRoot":"","sources":["../../../src/modules/kb-fs/ref-files.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,kBAA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KAAK,GAAG,CAAC,CAAC,CAAC,MAAM,eAAe,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;QAChG,IAAI,MAAM,KAAK,SAAS;YAAE,OAAO,MAAM,CAAC;IAC1C,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;;;;GAKG;AACH,KAAK,UAAU,eAAe,CAAC,IAAa,EAAE,GAAW;IACvD,IAAI,GAAG,KAAK,MAAM,IAAI,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC;QAAE,OAAO,SAAS,CAAC,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC;IAC9E,IAAI,CAAC,aAAa,CAAC,QAAQ,GAAG,EAAE,CAAC;QAAE,OAAO,YAAY,CAAC;IACvD,IAAI,CAAC;QACH,MAAM,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QACzD,OAAO,YAAY,CAAC;IACtB,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,YAAY,CAAC;IACnD,CAAC;AACH,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"join-request-jobs.service.d.ts","sourceRoot":"","sources":["../../../src/modules/plugins/join-request-jobs.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,QAAQ,EACb,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACtB,MAAM,iCAAiC,CAAC;AAKzC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,KAAK,EAEV,iBAAiB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E,gBAAgB,EACvB,IAAI,EAAE,mBAAmB;IAG5C;;;;OAIG;IACG,MAAM,CAAC,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAQ3E;;;;;;;;;;;OAWG;IACG,gBAAgB,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAO7E,0EAA0E;IACpE,mBAAmB,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;IAI/F,8EAA8E;IACxE,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC;IAI7D;;;;;OAKG;IACH,KAAK,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IAW/C;;;;;;;OAOG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAS5B;;;;;;;;;;;OAWG;IACH,aAAa,CAAC,UAAU,GAAE,MAA0B,GAAG,IAAI;IAe3D;;;;OAIG;IACH,YAAY,IAAI,IAAI;IAOpB;;;OAGG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;YAId,GAAG;IAyGjB;;;;;;OAMG;YACW,OAAO;IAoHrB;;;;;;;;;;;;;;;;;OAiBG;YACW,YAAY;CAc3B"}
1
+ {"version":3,"file":"join-request-jobs.service.d.ts","sourceRoot":"","sources":["../../../src/modules/plugins/join-request-jobs.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,QAAQ,EACb,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACtB,MAAM,iCAAiC,CAAC;AAMzC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,KAAK,EAEV,iBAAiB,EACjB,gBA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EACvB,IAAI,EAAE,mBAAmB;IAG5C;;;;OAIG;IACG,MAAM,CAAC,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAQ3E;;;;;;;;;;;OAWG;IACG,gBAAgB,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAO7E,0EAA0E;IACpE,mBAAmB,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;IAI/F,8EAA8E;IACxE,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC;IAI7D;;;;;OAKG;IACH,KAAK,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IAW/C;;;;;;;OAOG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAS5B;;;;;;;;;;;OAWG;IACH,aAAa,CAAC,UAAU,GAAE,MAA0B,GAAG,IAAI;IAe3D;;;;OAIG;IACH,YAAY,IAAI,IAAI;IAOpB;;;OAGG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;YAId,GAAG;IAqHjB;;;;;;OAMG;YACW,OAAO;IAoHrB;;;;;;;;;;;;;;;;;OAiBG;YACW,YAAY;CAc3B"}
@@ -1,4 +1,5 @@
1
1
  import { joinBranchFor, } from '@bevel-software/platform-shared';
2
+ import { DrizzleQueryError } from 'drizzle-orm';
2
3
  import { spliceGrant } from '../access-model/access-splice.js';
3
4
  import { sanitizeError } from '../workflow/sanitize-error.js';
4
5
  import { logger } from '../../shared/logging.js';
@@ -292,13 +293,13 @@ export class PluginJoinRequestJobs {
292
293
  */
293
294
  startSweeping(intervalMs = SWEEP_INTERVAL_MS) {
294
295
  void this.sweep().catch((err) => {
295
- log.warn(`could not look at the join requests still owed: ${loggable(sanitizeError(err))}`);
296
+ log.warn(`could not look at the join requests still owed: ${loggable(sanitizeError(underlying(err)))}`);
296
297
  });
297
298
  if (this.sweepTimer)
298
299
  return;
299
300
  this.sweepTimer = setInterval(() => {
300
301
  void this.sweep().catch((err) => {
301
- log.warn(`could not look at the join requests still owed: ${loggable(sanitizeError(err))}`);
302
+ log.warn(`could not look at the join requests still owed: ${loggable(sanitizeError(underlying(err)))}`);
302
303
  });
303
304
  }, intervalMs);
304
305
  // Never a reason for the process to stay alive: every row is durable, and
@@ -332,7 +333,7 @@ export class PluginJoinRequestJobs {
332
333
  // wrap the whole attempt: the claim has to be refreshed for as long as
333
334
  // the work runs, and the work is the part that can take minutes.
334
335
  const live = await this.store.claim(record.id, CLAIM_STALE_AFTER_MS).catch((err) => {
335
- log.warn(`could not claim a join request: ${loggable(sanitizeError(err))}`);
336
+ log.warn(`could not claim a join request: ${loggable(sanitizeError(underlying(err)))}`);
336
337
  return null;
337
338
  });
338
339
  if (!live) {
@@ -362,7 +363,7 @@ export class PluginJoinRequestJobs {
362
363
  return still ? 'held' : 'lost';
363
364
  }
364
365
  catch (err) {
365
- log.warn(`could not refresh a join-request claim: ${loggable(sanitizeError(err))}`);
366
+ log.warn(`could not refresh a join-request claim: ${loggable(sanitizeError(underlying(err)))}`);
366
367
  return 'unknown';
367
368
  }
368
369
  };
@@ -389,7 +390,10 @@ export class PluginJoinRequestJobs {
389
390
  });
390
391
  }
391
392
  catch (err) {
392
- const reason = sanitizeError(err);
393
+ // The cause when there is one (see `underlying`), for the log; a
394
+ // database's reason, where a wrapper's cut-off column list is not.
395
+ const cause = underlying(err);
396
+ const reason = sanitizeError(cause);
393
397
  // `pluginKey` is a persisted folder path, so it is escaped before it
394
398
  // reaches a log line: a folder carrying control characters could
395
399
  // otherwise write newlines of its own into the log.
@@ -409,22 +413,31 @@ export class PluginJoinRequestJobs {
409
413
  // claim held by a process that never really started.
410
414
  log.warn(`join request for ${key} postponed: ${loggable(reason)}`);
411
415
  await this.store.release(record.id, live.claimToken).catch((releaseErr) => {
412
- log.warn(`could not release that claim: ${loggable(sanitizeError(releaseErr))}`);
416
+ log.warn(`could not release that claim: ${loggable(sanitizeError(underlying(releaseErr)))}`);
413
417
  });
414
418
  return;
415
419
  }
416
420
  log.error(`join request for ${key} failed: ${loggable(reason)}`);
421
+ // What the requester reads on their card. The git work's own words
422
+ // are theirs to see (credentials stripped); a database's reason is
423
+ // not — it names tables and columns and is for the operator, who has
424
+ // it in the line above — so a database failure is recorded in one
425
+ // stable sentence. The database's failures are the ones the query
426
+ // layer wraps (`DrizzleQueryError`, its cause the driver's error);
427
+ // any other wrapped error keeps its own sanitised words, which may be
428
+ // what the requester needs to act on.
429
+ const shown = err instanceof DrizzleQueryError ? DATABASE_FAILURE_REASON : reason;
417
430
  await this.store
418
431
  // Named with the token, so this lands only if the row is still this
419
432
  // process's. A worker that overran the window and had its row taken
420
433
  // writes nothing here rather than stamping its failure on the attempt
421
434
  // that replaced it — which would show the requester a failure for
422
435
  // work that is, at that moment, succeeding.
423
- .markFailed(record.id, live.claimToken, reason)
436
+ .markFailed(record.id, live.claimToken, shown)
424
437
  // Nothing left to do if even that write fails: the row stays
425
438
  // `pending` and the next boot's sweep tries the whole thing again.
426
439
  .catch((writeErr) => {
427
- log.error(`could not record that failure: ${loggable(sanitizeError(writeErr))}`);
440
+ log.error(`could not record that failure: ${loggable(sanitizeError(underlying(writeErr)))}`);
428
441
  });
429
442
  }
430
443
  finally {
@@ -594,6 +607,28 @@ export class PluginJoinRequestJobs {
594
607
  function loggable(reason) {
595
608
  return printable(reason);
596
609
  }
610
+ /**
611
+ * The error behind a wrapped one. Drizzle reports a failed query as its own
612
+ * error whose message is the SQL and whose `cause` is the database's reason;
613
+ * the sanitizer caps a message at a couple of hundred characters, so logging
614
+ * the wrapper showed a cut-off column list and never the reason. The reason
615
+ * is what every LOG line this service writes needs — "the pool has been
616
+ * ended", "relation does not exist" — the sweep's warning, the claim and
617
+ * heartbeat warnings, the failure line. The requester's card is the one
618
+ * place it does not go: a wrapped failure is recorded there as
619
+ * `DATABASE_FAILURE_REASON`, since a table name is the operator's to read.
620
+ * An error with no cause (git's, the claim's own) is reported as it is.
621
+ */
622
+ function underlying(err) {
623
+ const cause = typeof err === 'object' && err !== null ? err.cause : undefined;
624
+ return cause instanceof Error ? cause : err;
625
+ }
626
+ /**
627
+ * The sentence a requester's card carries when the database, not the git
628
+ * work, refused the request: stable, and naming no table or column. The
629
+ * database's own words go to the server log beside it.
630
+ */
631
+ const DATABASE_FAILURE_REASON = 'the request could not be recorded; an admin can find the reason in the server log';
597
632
  /** Node's "there is no such file" errors, and only those. */
598
633
  function isFileAbsent(err) {
599
634
  const code = err?.code;
@@ -1 +1 @@
1
- {"version":3,"file":"join-request-jobs.service.js","sourceRoot":"","sources":["../../../src/modules/plugins/join-request-jobs.service.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,GAId,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAStD,MAAM,GAAG,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;AAE9B;;;;;;;;;GASG;AACH,MAAM,kBAAkB,GAAG,EAAE,GAAG,IAAI,CAAC;AAErC;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,EAAE,GAAG,IAAI,CAAC;AAE9C;;;;;;;;;;GAUG;AACH,MAAM,iBAAiB,GAAG,EAAE,GAAG,IAAI,CAAC;AAEpC;;;;;;;;;;GAUG;AACH,MAAM,OAAO,wBAAyB,SAAQ,KAAK;IACjD,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,0BAA0B,CAAC;IACzC,CAAC;CACF;A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AAI,EAAE,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC;YAChF,OAAO;QACT,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,IAAI,EAAE;gBAC3D,UAAU,EAAE,IAAI;gBAChB,WAAW,EAAE,IAAI;aAClB,CAAC,CAAC;YACH,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,MAAM,CAAC;gBAAE,MAAM,GAAG,CAAC;YACxD,sEAAsE;QACxE,CAAC;IACH,CAAC;CACF;AAED;;;;;;;;;;;GAWG;AACH,SAAS,QAAQ,CAAC,MAAc;IAC9B,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC;AAC3B,CAAC;AAED,6DAA6D;AAC7D,SAAS,YAAY,CAAC,GAAY;IAChC,MAAM,IAAI,GAAI,GAAoC,EAAE,IAAI,CAAC;IACzD,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,SAAS,CAAC;AACjD,CAAC"}
1
+ {"version":3,"file":"join-request-jobs.service.js","sourceRoot":"","sources":["../../../src/modules/plugins/join-request-jobs.service.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,GAId,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAStD,MAAM,GAAG,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;AAE9B;;;;;;;;;GASG;AACH,MAAM,kBAA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;IACH,CAAC;CACF;AAED;;;;;;;;;;;GAWG;AACH,SAAS,QAAQ,CAAC,MAAc;IAC9B,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC;AAC3B,CAAC;AAED;;;;;;;;;;;GAWG;AACH,SAAS,UAAU,CAAC,GAAY;IAC9B,MAAM,KAAK,GAAG,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,IAAI,CAAC,CAAC,CAAE,GAA2B,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;IACvG,OAAO,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC;AAC9C,CAAC;AAED;;;;GAIG;AACH,MAAM,uBAAuB,GAAG,mFAAmF,CAAC;AAEpH,6DAA6D;AAC7D,SAAS,YAAY,CAAC,GAAY;IAChC,MAAM,IAAI,GAAI,GAAoC,EAAE,IAAI,CAAC;IACzD,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,SAAS,CAAC;AACjD,CAAC"}
@@ -27,6 +27,10 @@ import type { IPluginIndexService } from './plugins.contract.js';
27
27
  * what `read: everyone` (or a public plugin) reaches. Same slice, same
28
28
  * caller gate, asked of the resolver as `canReadAsEveryoneBatch`. The name
29
29
  * cannot collide with a group's: `everyone` is reserved by the grammar.
30
+ *
31
+ * The groups listed after it are every group for an admin, and only the
32
+ * caller's own groups for anyone else (`groupsOfUser`), so the lens never
33
+ * names a group the caller has no part in.
30
34
  */
31
35
  export interface TeamAccess {
32
36
  name: string;