@bevel-software/platform-core-backend 0.21.0 → 0.22.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 (177) hide show
  1. package/dist/core/create-core-server.d.ts.map +1 -1
  2. package/dist/core/create-core-server.js +32 -2
  3. package/dist/core/create-core-server.js.map +1 -1
  4. package/dist/core/create-core-services.d.ts +13 -1
  5. package/dist/core/create-core-services.d.ts.map +1 -1
  6. package/dist/core/create-core-services.js +51 -5
  7. package/dist/core/create-core-services.js.map +1 -1
  8. package/dist/modules/access/access-requests.contract.d.ts +75 -0
  9. package/dist/modules/access/access-requests.contract.d.ts.map +1 -0
  10. package/dist/modules/access/access-requests.contract.js +20 -0
  11. package/dist/modules/access/access-requests.contract.js.map +1 -0
  12. package/dist/modules/access/access-requests.routes.d.ts +35 -0
  13. package/dist/modules/access/access-requests.routes.d.ts.map +1 -0
  14. package/dist/modules/access/access-requests.routes.js +237 -0
  15. package/dist/modules/access/access-requests.routes.js.map +1 -0
  16. package/dist/modules/access/access-requests.service.d.ts +123 -0
  17. package/dist/modules/access/access-requests.service.d.ts.map +1 -0
  18. package/dist/modules/access/access-requests.service.js +337 -0
  19. package/dist/modules/access/access-requests.service.js.map +1 -0
  20. package/dist/modules/access-model/access-grammar.d.ts +12 -0
  21. package/dist/modules/access-model/access-grammar.d.ts.map +1 -1
  22. package/dist/modules/access-model/access-grammar.js +24 -0
  23. package/dist/modules/access-model/access-grammar.js.map +1 -1
  24. package/dist/modules/auth/auth.service.d.ts +26 -1
  25. package/dist/modules/auth/auth.service.d.ts.map +1 -1
  26. package/dist/modules/auth/auth.service.js +11 -2
  27. package/dist/modules/auth/auth.service.js.map +1 -1
  28. package/dist/modules/github-app/github-app.client.d.ts +101 -0
  29. package/dist/modules/github-app/github-app.client.d.ts.map +1 -0
  30. package/dist/modules/github-app/github-app.client.js +222 -0
  31. package/dist/modules/github-app/github-app.client.js.map +1 -0
  32. package/dist/modules/github-app/github-app.connection.d.ts +102 -0
  33. package/dist/modules/github-app/github-app.connection.d.ts.map +1 -0
  34. package/dist/modules/github-app/github-app.connection.js +185 -0
  35. package/dist/modules/github-app/github-app.connection.js.map +1 -0
  36. package/dist/modules/github-app/github-app.routes.d.ts +59 -0
  37. package/dist/modules/github-app/github-app.routes.d.ts.map +1 -0
  38. package/dist/modules/github-app/github-app.routes.js +323 -0
  39. package/dist/modules/github-app/github-app.routes.js.map +1 -0
  40. package/dist/modules/github-app/index.d.ts +4 -0
  41. package/dist/modules/github-app/index.d.ts.map +1 -0
  42. package/dist/modules/github-app/index.js +4 -0
  43. package/dist/modules/github-app/index.js.map +1 -0
  44. package/dist/modules/kb-fs/remote-url.d.ts +22 -0
  45. package/dist/modules/kb-fs/remote-url.d.ts.map +1 -0
  46. package/dist/modules/kb-fs/remote-url.js +35 -0
  47. package/dist/modules/kb-fs/remote-url.js.map +1 -0
  48. package/dist/modules/plugins/join-proposals.d.ts +17 -5
  49. package/dist/modules/plugins/join-proposals.d.ts.map +1 -1
  50. package/dist/modules/plugins/join-proposals.js +76 -22
  51. package/dist/modules/plugins/join-proposals.js.map +1 -1
  52. package/dist/modules/plugins/join-requests.service.d.ts +111 -18
  53. package/dist/modules/plugins/join-requests.service.d.ts.map +1 -1
  54. package/dist/modules/plugins/join-requests.service.js +173 -29
  55. package/dist/modules/plugins/join-requests.service.js.map +1 -1
  56. package/dist/modules/plugins/plugins.routes.d.ts.map +1 -1
  57. package/dist/modules/plugins/plugins.routes.js +3 -2
  58. package/dist/modules/plugins/plugins.routes.js.map +1 -1
  59. package/dist/modules/settings/deployment-settings.service.d.ts +22 -1
  60. package/dist/modules/settings/deployment-settings.service.d.ts.map +1 -1
  61. package/dist/modules/settings/deployment-settings.service.js +93 -4
  62. package/dist/modules/settings/deployment-settings.service.js.map +1 -1
  63. package/dist/modules/settings/managed-repository.d.ts +43 -0
  64. package/dist/modules/settings/managed-repository.d.ts.map +1 -0
  65. package/dist/modules/settings/managed-repository.js +60 -0
  66. package/dist/modules/settings/managed-repository.js.map +1 -0
  67. package/dist/modules/settings/repository-source.d.ts +128 -0
  68. package/dist/modules/settings/repository-source.d.ts.map +1 -0
  69. package/dist/modules/settings/repository-source.js +150 -0
  70. package/dist/modules/settings/repository-source.js.map +1 -0
  71. package/dist/modules/settings/setup.routes.d.ts +27 -4
  72. package/dist/modules/settings/setup.routes.d.ts.map +1 -1
  73. package/dist/modules/settings/setup.routes.js +187 -13
  74. package/dist/modules/settings/setup.routes.js.map +1 -1
  75. package/dist/modules/skills/skill-access-requests.routes.d.ts +6 -8
  76. package/dist/modules/skills/skill-access-requests.routes.d.ts.map +1 -1
  77. package/dist/modules/skills/skill-access-requests.routes.js +24 -63
  78. package/dist/modules/skills/skill-access-requests.routes.js.map +1 -1
  79. package/dist/modules/tool-helpers/tool-context.d.ts.map +1 -1
  80. package/dist/modules/tool-helpers/tool-context.js +15 -0
  81. package/dist/modules/tool-helpers/tool-context.js.map +1 -1
  82. package/dist/modules/workflow/agent-tools/workflow.tools.d.ts.map +1 -1
  83. package/dist/modules/workflow/agent-tools/workflow.tools.js +38 -2
  84. package/dist/modules/workflow/agent-tools/workflow.tools.js.map +1 -1
  85. package/dist/modules/workflow/git/git.service.d.ts +3 -1
  86. package/dist/modules/workflow/git/git.service.d.ts.map +1 -1
  87. package/dist/modules/workflow/git/git.service.js +17 -4
  88. package/dist/modules/workflow/git/git.service.js.map +1 -1
  89. package/dist/modules/workflow/git/node-git-runner.d.ts.map +1 -1
  90. package/dist/modules/workflow/git/node-git-runner.js +5 -0
  91. package/dist/modules/workflow/git/node-git-runner.js.map +1 -1
  92. package/dist/modules/workflow/git/pull-request.service.d.ts +45 -0
  93. package/dist/modules/workflow/git/pull-request.service.d.ts.map +1 -1
  94. package/dist/modules/workflow/git/pull-request.service.js +99 -0
  95. package/dist/modules/workflow/git/pull-request.service.js.map +1 -1
  96. package/dist/modules/workflow/workflow.routes.d.ts.map +1 -1
  97. package/dist/modules/workflow/workflow.routes.js +3 -1
  98. package/dist/modules/workflow/workflow.routes.js.map +1 -1
  99. package/dist/modules/workflow/workflow.service.d.ts +34 -7
  100. package/dist/modules/workflow/workflow.service.d.ts.map +1 -1
  101. package/dist/modules/workflow/workflow.service.js +148 -48
  102. package/dist/modules/workflow/workflow.service.js.map +1 -1
  103. package/dist/modules/workspace/startup/kb-startup-runner.d.ts +66 -0
  104. package/dist/modules/workspace/startup/kb-startup-runner.d.ts.map +1 -1
  105. package/dist/modules/workspace/startup/kb-startup-runner.js +148 -0
  106. package/dist/modules/workspace/startup/kb-startup-runner.js.map +1 -1
  107. package/dist/modules/workspace/workspace.service.d.ts.map +1 -1
  108. package/dist/modules/workspace/workspace.service.js +17 -1
  109. package/dist/modules/workspace/workspace.service.js.map +1 -1
  110. package/dist/modules/workspace/workspace.tools.d.ts.map +1 -1
  111. package/dist/modules/workspace/workspace.tools.js +28 -2
  112. package/dist/modules/workspace/workspace.tools.js.map +1 -1
  113. package/dist/shared/domain-errors.d.ts +39 -0
  114. package/dist/shared/domain-errors.d.ts.map +1 -1
  115. package/dist/shared/domain-errors.js +55 -0
  116. package/dist/shared/domain-errors.js.map +1 -1
  117. package/dist/shared/git.contract.d.ts +10 -0
  118. package/dist/shared/git.contract.d.ts.map +1 -1
  119. package/dist/shared/git.contract.js.map +1 -1
  120. package/package.json +3 -3
  121. package/src/core/create-core-server.ts +37 -1
  122. package/src/core/create-core-services.ts +65 -8
  123. package/src/modules/access/__tests__/access-requests.recut.test.ts +134 -0
  124. package/src/modules/access/__tests__/access-requests.routes.test.ts +610 -0
  125. package/src/modules/access/access-requests.contract.ts +93 -0
  126. package/src/modules/access/access-requests.routes.ts +286 -0
  127. package/src/modules/access/access-requests.service.ts +420 -0
  128. package/src/modules/access-model/access-grammar.ts +22 -0
  129. package/src/modules/auth/__tests__/auth.service.test.ts +38 -0
  130. package/src/modules/auth/auth.service.ts +28 -1
  131. package/src/modules/github-app/__tests__/github-app.test.ts +848 -0
  132. package/src/modules/github-app/github-app.client.ts +268 -0
  133. package/src/modules/github-app/github-app.connection.ts +204 -0
  134. package/src/modules/github-app/github-app.routes.ts +359 -0
  135. package/src/modules/github-app/index.ts +19 -0
  136. package/src/modules/kb-fs/__tests__/remote-url.test.ts +38 -0
  137. package/src/modules/kb-fs/remote-url.ts +35 -0
  138. package/src/modules/plugins/__tests__/join-proposals.test.ts +100 -19
  139. package/src/modules/plugins/__tests__/join-requests.service.test.ts +27 -11
  140. package/src/modules/plugins/__tests__/join-requests.settlement.test.ts +371 -0
  141. package/src/modules/plugins/__tests__/plugins.routes.test.ts +1 -1
  142. package/src/modules/plugins/join-proposals.ts +87 -19
  143. package/src/modules/plugins/join-requests.service.ts +199 -39
  144. package/src/modules/plugins/plugins.routes.ts +3 -2
  145. package/src/modules/settings/__tests__/repository-source.test.ts +191 -0
  146. package/src/modules/settings/__tests__/setup.routes.git-mode.test.ts +353 -0
  147. package/src/modules/settings/__tests__/setup.routes.github-app.test.ts +282 -0
  148. package/src/modules/settings/__tests__/setup.routes.managed-phase.test.ts +233 -0
  149. package/src/modules/settings/deployment-settings.service.ts +109 -3
  150. package/src/modules/settings/managed-repository.ts +68 -0
  151. package/src/modules/settings/repository-source.ts +197 -0
  152. package/src/modules/settings/setup.routes.ts +214 -10
  153. package/src/modules/skills/__tests__/skill-access-requests.routes.test.ts +5 -1
  154. package/src/modules/skills/skill-access-requests.routes.ts +25 -75
  155. package/src/modules/tool-helpers/tool-context.ts +15 -0
  156. package/src/modules/workflow/__tests__/apply-failure.test.ts +9 -1
  157. package/src/modules/workflow/__tests__/workflow.service.facade.test.ts +159 -8
  158. package/src/modules/workflow/__tests__/workflow.service.update-from-target.test.ts +146 -40
  159. package/src/modules/workflow/agent-tools/__tests__/workflow.tools.test.ts +141 -1
  160. package/src/modules/workflow/agent-tools/workflow.tools.ts +49 -3
  161. package/src/modules/workflow/git/__tests__/git.service.pull.test.ts +121 -0
  162. package/src/modules/workflow/git/__tests__/pull-request.service.getPrDetail.test.ts +145 -2
  163. package/src/modules/workflow/git/__tests__/pull-request.service.viewer-can-delete.test.ts +166 -0
  164. package/src/modules/workflow/git/git.service.ts +25 -4
  165. package/src/modules/workflow/git/node-git-runner.ts +6 -0
  166. package/src/modules/workflow/git/pull-request.service.ts +119 -0
  167. package/src/modules/workflow/workflow.routes.ts +3 -1
  168. package/src/modules/workflow/workflow.service.ts +170 -52
  169. package/src/modules/workspace/__tests__/workspace.service.unknown-branch.test.ts +43 -0
  170. package/src/modules/workspace/__tests__/workspace.tools.branch-errors.test.ts +233 -7
  171. package/src/modules/workspace/__tests__/workspace.tools.test.ts +35 -3
  172. package/src/modules/workspace/startup/__tests__/kb-startup-runner.test.ts +211 -0
  173. package/src/modules/workspace/startup/kb-startup-runner.ts +159 -0
  174. package/src/modules/workspace/workspace.service.ts +17 -1
  175. package/src/modules/workspace/workspace.tools.ts +35 -0
  176. package/src/shared/domain-errors.ts +58 -0
  177. package/src/shared/git.contract.ts +10 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remote-url.d.ts","sourceRoot":"","sources":["../../../src/modules/kb-fs/remote-url.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAWlE;AAED,wBAAgB,cAAc,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO,CAE5D"}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Whether two repository addresses name the same repository.
3
+ *
4
+ * The answer decides whether a working copy on disk is KEPT or DELETED, so it
5
+ * errs towards "same": only differences that cannot change which repository
6
+ * is meant are ignored, and they are ignored on both sides.
7
+ *
8
+ * - a trailing slash, and a `.git` suffix — hosts serve both spellings;
9
+ * - the letter case of the scheme and the host — DNS does not distinguish;
10
+ * - userinfo (`user:token@`) — who asks does not change what is asked for,
11
+ * and a credential must never decide, or appear in, a comparison.
12
+ *
13
+ * The PATH keeps its case: hosts that fold it and hosts that do not both
14
+ * exist, and treating `Org/Repo` and `org/repo` as one would keep a clone of
15
+ * the wrong repository on a host that tells them apart — but deleting a clone
16
+ * of the right one is the worse error, and an operator who only changed the
17
+ * case gets a re-clone, not a loss: the work on that clone was pushed to the
18
+ * same place.
19
+ */
20
+ export function normalizeRepositoryAddress(address) {
21
+ let a = address.trim();
22
+ const url = /^([a-z][a-z0-9+.-]*):\/\/([^/]*)(\/.*)?$/i.exec(a);
23
+ if (url) {
24
+ const host = url[2].replace(/^[^@]*@/, '').toLowerCase();
25
+ a = `${url[1].toLowerCase()}://${host}${url[3] ?? ''}`;
26
+ }
27
+ return a
28
+ .replace(/[\\/]+$/, '')
29
+ .replace(/\.git$/i, '')
30
+ .replace(/[\\/]+$/, '');
31
+ }
32
+ export function sameRepository(a, b) {
33
+ return normalizeRepositoryAddress(a) === normalizeRepositoryAddress(b);
34
+ }
35
+ //# sourceMappingURL=remote-url.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remote-url.js","sourceRoot":"","sources":["../../../src/modules/kb-fs/remote-url.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,0BAA0B,CAAC,OAAe;IACxD,IAAI,CAAC,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;IACvB,MAAM,GAAG,GAAG,2CAA2C,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAChE,IAAI,GAAG,EAAE,CAAC;QACR,MAAM,IAAI,GAAG,GAAG,CAAC,CAAC,CAAE,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;QAC1D,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC,CAAE,CAAC,WAAW,EAAE,MAAM,IAAI,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC;IAC1D,CAAC;IACD,OAAO,CAAC;SACL,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC;SACtB,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC;SACtB,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;AAC5B,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,CAAS,EAAE,CAAS;IACjD,OAAO,0BAA0B,CAAC,CAAC,CAAC,KAAK,0BAA0B,CAAC,CAAC,CAAC,CAAC;AACzE,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import { type Verb } from '../access-model/access-grammar.js';
2
+ import type { TargetKind } from '../access/access-mutation.service.js';
2
3
  /**
3
4
  * What a join branch is PROPOSING, relative to the default branch.
4
5
  *
@@ -43,11 +44,22 @@ export interface JoinProposal {
43
44
  label: string;
44
45
  }
45
46
  /**
46
- * The grants `branchText` adds over `defaultText` — the proposals a manager
47
- * can accept. Empty ⇒ the branch's rules are a subset of the default's.
47
+ * The grants `branchText` adds over `defaultText` — the proposals an editor
48
+ * can accept. Empty ⇒ the branch's rules are a subset of the default's, which
49
+ * is the settled state.
48
50
  *
49
- * `path` is only used to label parse errors; both texts are the same file at
50
- * two refs.
51
+ * NULL when the branch's own copy is absent or unreadable, which is a
52
+ * different fact entirely and the one this surface keeps getting wrong: an
53
+ * empty answer closes somebody's request, so it has to mean "the branch asks
54
+ * for nothing more", never "the branch would not tell us".
55
+ *
56
+ * An unreadable DEFAULT copy stays what it was — every branch grant looks
57
+ * incoming. That is the safe direction on that side: an editor is shown
58
+ * proposals to consider rather than having them swallowed by a baseline
59
+ * nobody could read.
60
+ *
61
+ * `path` labels parse errors; both texts are the same file at two refs, and
62
+ * `kind` says which grammar that file is written in.
51
63
  */
52
- export declare function pendingProposals(branchText: string | null, defaultText: string | null, path: string): JoinProposal[];
64
+ export declare function pendingProposals(branchText: string | null, defaultText: string | null, path: string, kind: TargetKind): JoinProposal[] | null;
53
65
  //# sourceMappingURL=join-proposals.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"join-proposals.d.ts","sourceRoot":"","sources":["../../../src/modules/plugins/join-proposals.ts"],"names":[],"mapp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AAgB,gBAAgB,CAC9B,UAAU,EAAE,MAAM,GAAG,IAAI,EACzB,WAAW,EAAE,MAAM,GAAG,IAAI,EAC1B,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,UAAU,GACf,YAAY,EAAE,GAAG,IAAI,CA2BvB"}
@@ -1,29 +1,70 @@
1
- import { KNOWN_VERBS, parseAccessFile, } from '../access-model/access-grammar.js';
1
+ import { KNOWN_VERBS, ownAccessReadable, parseAccessFile, parseOwnAccessEntries, } from '../access-model/access-grammar.js';
2
2
  /** Canonical identity of an entry, for set comparison across the two files. */
3
3
  function identityOf(entry) {
4
4
  return entry.kind === 'user' ? `user:${entry.email}` : `role:${entry.role}`;
5
5
  }
6
6
  /**
7
- * Folder rules from one copy of an `access.md`, per verb, grants only.
7
+ * The per-verb entries one copy of an item's rules declares, or null when the
8
+ * text could not be read as rules at all.
8
9
  *
9
- * A file that fails to parse yields NO grants. On the branch side that means
10
- * a malformed proposal offers nothing to accept (fail-closed). On the default
11
- * side it means every branch grant looks incoming — which is the safe
12
- * direction too: the manager is shown proposals to consider rather than
13
- * having them silently swallowed by an unreadable baseline.
10
+ * THE GRAMMAR FOLLOWS THE ITEM, because there are two of them and the
11
+ * resolver picks by item as well:
12
+ *
13
+ * folder a `access.md`, whose folder rules are a BODY of `verb:` block
14
+ * lists — `parseAccessFile`, which fails the whole file if a verb
15
+ * is not a list.
16
+ * file the node's OWN frontmatter — `parseOwnAccessEntries`, which also
17
+ * accepts the single-value scalar form (`write: Rita <r@x.io>`),
18
+ * ignores non-access keys like `nodeType:`, and drops a bad entry
19
+ * rather than failing the file.
20
+ *
21
+ * Reading a file's frontmatter with the FOLDER grammar is what broke every
22
+ * request whose target was a file: `spliceGrant` writes one grant into a
23
+ * node's frontmatter as exactly that scalar — the same bytes the dialog's own
24
+ * grant writes, which the resolver honours — and the folder grammar rejects it
25
+ * with "'write:' must be a list", failing the parse, yielding no grants, which
26
+ * reads as a branch with nothing left to propose. The request was then closed
27
+ * on the editors' first listing, before anyone had seen it.
28
+ *
29
+ * Null is reserved for "could not be read": a folder `access.md` that does
30
+ * not parse, or a file whose frontmatter is broken (never closed, or not a
31
+ * mapping). A file with no frontmatter, or with frontmatter naming no verb,
32
+ * is perfectly readable and simply grants nothing. The file grammar's own
33
+ * null does not tell those apart, so the question is asked separately: a
34
+ * broken block read as "grants nothing" would close the request on a
35
+ * reading that failed, the same mistake by another door.
14
36
  */
15
- function grantsByVerb(text, path) {
16
- const out = new Map();
37
+ function entriesOf(text, path, kind) {
38
+ if (kind === 'file') {
39
+ return parseOwnAccessEntries(text) ?? (ownAccessReadable(text) ? emptyGrants() : null);
40
+ }
41
+ const parsed = parseAccessFile(text, path);
42
+ return parsed.ok ? parsed.file.entries : null;
43
+ }
44
+ function emptyGrants() {
45
+ const out = {};
17
46
  for (const verb of KNOWN_VERBS)
18
- out.set(verb, new Map());
47
+ out[verb] = [];
48
+ return out;
49
+ }
50
+ /** An index that grants nothing — the baseline a copy nobody could read stands in as. */
51
+ function emptyIndex() {
52
+ return new Map(KNOWN_VERBS.map((verb) => [verb, new Map()]));
53
+ }
54
+ /**
55
+ * Grants only, indexed by canonical identity, from one copy of the rules.
56
+ * Null in, null out — an unreadable copy is not an empty one.
57
+ */
58
+ function grantsByVerb(text, path, kind) {
19
59
  if (text === null)
20
- return out;
21
- const parsed = parseAccessFile(text, path);
22
- if (!parsed.ok)
23
- return out;
60
+ return null;
61
+ const entries = entriesOf(text, path, kind);
62
+ if (entries === null)
63
+ return null;
64
+ const out = emptyIndex();
24
65
  for (const verb of KNOWN_VERBS) {
25
66
  const byId = out.get(verb);
26
- for (const entry of parsed.file.entries[verb]) {
67
+ for (const entry of entries[verb]) {
27
68
  if (entry.deny)
28
69
  continue;
29
70
  byId.set(identityOf(entry), entry);
@@ -32,15 +73,28 @@ function grantsByVerb(text, path) {
32
73
  return out;
33
74
  }
34
75
  /**
35
- * The grants `branchText` adds over `defaultText` — the proposals a manager
36
- * can accept. Empty ⇒ the branch's rules are a subset of the default's.
76
+ * The grants `branchText` adds over `defaultText` — the proposals an editor
77
+ * can accept. Empty ⇒ the branch's rules are a subset of the default's, which
78
+ * is the settled state.
79
+ *
80
+ * NULL when the branch's own copy is absent or unreadable, which is a
81
+ * different fact entirely and the one this surface keeps getting wrong: an
82
+ * empty answer closes somebody's request, so it has to mean "the branch asks
83
+ * for nothing more", never "the branch would not tell us".
84
+ *
85
+ * An unreadable DEFAULT copy stays what it was — every branch grant looks
86
+ * incoming. That is the safe direction on that side: an editor is shown
87
+ * proposals to consider rather than having them swallowed by a baseline
88
+ * nobody could read.
37
89
  *
38
- * `path` is only used to label parse errors; both texts are the same file at
39
- * two refs.
90
+ * `path` labels parse errors; both texts are the same file at two refs, and
91
+ * `kind` says which grammar that file is written in.
40
92
  */
41
- export function pendingProposals(branchText, defaultText, path) {
42
- const branch = grantsByVerb(branchText, path);
43
- const base = grantsByVerb(defaultText, path);
93
+ export function pendingProposals(branchText, defaultText, path, kind) {
94
+ const branch = grantsByVerb(branchText, path, kind);
95
+ if (branch === null)
96
+ return null;
97
+ const base = grantsByVerb(defaultText, path, kind) ?? emptyIndex();
44
98
  const out = [];
45
99
  for (const verb of KNOWN_VERBS) {
46
100
  const baseIds = base.get(verb);
@@ -1 +1 @@
1
- {"version":3,"file":"join-proposals.js","sourceRoot":"","sources":["../../../src/modules/plugins/join-proposals.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,eAAe,GAGhB,MAAM,mCAAmC,CAAC;AAyC3C,+EAA+E;AAC/E,SAAS,UAAU,CAAC,KAAkB;IACpC,OAAO,KAAK,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,QAAQ,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,CAAC,IAAI,EAAE,CAAC;AAC9E,CAAC;AAED;;;;;;;;GAQG;AACH,SAAS,YAAY,CAAC,IAAmB,EAAE,IAAY;IACrD,MAAM,GAAG,GAAG,IAAI,GAAG,E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,UAAyB,EACzB,WAA0B,EAC1B,IAAY,EACZ,IAAgB;IAEhB,MAAM,MAAM,GAAG,YAAY,CAAC,UAAU,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IACpD,IAAI,MAAM,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IACjC,MAAM,IAAI,GAAG,YAAY,CAAC,WAAW,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,UAAU,EAAE,CAAC;IACnE,MAAM,GAAG,GAAmB,EAAE,CAAC;IAC/B,KAAK,MAAM,IAAI,IAAI,WAAW,EAAE,CAAC;QAC/B,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAE,CAAC;QAChC,KAAK,MAAM,CAAC,EAAE,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,IAAI,CAAE,EAAE,CAAC;YAC5C,IAAI,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;gBAAE,SAAS;YAC9B,GAAG,CAAC,IAAI,CACN,KAAK,CAAC,IAAI,KAAK,MAAM;gBACnB,CAAC,CAAC;oBACE,IAAI;oBACJ,EAAE;oBACF,SAAS,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,WAAW,EAAE,KAAK,CAAC,WAAW,EAAE;oBAC/E,KAAK,EAAE,KAAK,CAAC,WAAW;iBACzB;gBACH,CAAC,CAAC;oBACE,IAAI;oBACJ,EAAE;oBACF,SAAS,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,WAAW,EAAE;oBACpD,KAAK,EAAE,KAAK,CAAC,WAAW;iBACzB,CACN,CAAC;QACJ,CAAC;IACH,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
@@ -1,6 +1,8 @@
1
1
  import { type AuthUser, type ChangeRequest, type IWorkflowService } from '@bevel-software/platform-shared';
2
2
  import { type WorkspaceService } from '../workspace/workspace.service.js';
3
3
  import type { KbContext } from '../../shared/kb-context.js';
4
+ import type { IAccessControl } from '../access/access-control.interface.js';
5
+ import { type AccessRequestTarget, type IAccessRequestLifecycle } from '../access/access-requests.contract.js';
4
6
  import { type JoinProposal } from './join-proposals.js';
5
7
  /** One open join change request, with what it still proposes. */
6
8
  export interface JoinRequest {
@@ -12,45 +14,133 @@ export interface JoinRequest {
12
14
  proposals: JoinProposal[];
13
15
  }
14
16
  /**
15
- * Join requests as PROPOSALS, and the reconciliation that retires them.
17
+ * Access requests as PROPOSALS, and the reconciliation that retires them.
16
18
  *
17
19
  * The lifecycle has no state of its own — it is derived, every time, from two
18
- * copies of one file:
20
+ * copies of one file (a folder's `access.md`, or a file's own frontmatter):
19
21
  *
20
- * open the branch's `access.md` grants something the default's does not
22
+ * open the branch proposes something the person does not already hold
21
23
  * settled it does not
22
24
  *
23
- * so "approve" is not an operation on the request at all. A manager grants a
25
+ * so "approve" is not an operation on the request at all. An editor grants a
24
26
  * principal through the ordinary access path (the same lock + commit every
25
27
  * other access edit uses, gated the same way), the default branch gains that
26
- * entry, and the proposal stops being pending because the diff no longer
27
- * contains it. When the last one goes, the change request has nothing left to
28
- * say and is rejected, its branch deleted.
28
+ * entry, and the proposal stops being pending.
29
29
  *
30
- * That reconciliation runs LAZILY on every listing as well as on demand, so a
31
- * grant made anywhere — this banner, the Manage-access dialog, a hand edit —
32
- * settles the request that asked for it. Nothing has to remember to.
30
+ * "Does not already hold" is stronger than "is not in the file", and
31
+ * deliberately so: Owner covers Can edit, a parent folder's grant covers this
32
+ * one, and a role or group carries access without naming anybody. Each of
33
+ * those would leave a proposal nobody can usefully accept — accepting writes
34
+ * a grant that changes nothing — and the request would sit open forever. See
35
+ * {@link JoinRequestsService.unmetProposals}.
36
+ *
37
+ * That reconciliation runs LAZILY on every listing as well as on demand, so
38
+ * access gained anywhere — this banner, the Manage access dialog, a hand
39
+ * edit, a role someone joined — settles the request that asked for it.
40
+ * Nothing has to remember to.
33
41
  */
34
- export declare class JoinRequestsService {
42
+ export declare class JoinRequestsService implements IAccessRequestLifecycle {
35
43
  private readonly workspaceService;
36
44
  private readonly workflow;
37
45
  private readonly kb;
38
- constructor(workspaceService: WorkspaceService, workflow: IWorkflowService, kb: Pick<KbContext, 'defaultBranch' | 'defaultWorkspaceId'>);
39
46
  /**
40
- * Open join requests for `plugin`, each carrying only its still-pending
41
- * proposals. Requests with none left are reconciled away (rejected, branch
42
- * deleted) and omitted.
47
+ * Read-only, and asked one question only: does this person already hold
48
+ * this verb on the item, on the DEFAULT branch? See {@link unmetProposals}.
49
+ */
50
+ private readonly accessControl;
51
+ constructor(workspaceService: WorkspaceService, workflow: IWorkflowService, kb: Pick<KbContext, 'defaultBranch' | 'defaultWorkspaceId'>,
52
+ /**
53
+ * Read-only, and asked one question only: does this person already hold
54
+ * this verb on the item, on the DEFAULT branch? See {@link unmetProposals}.
55
+ */
56
+ accessControl: Pick<IAccessControl, 'canRead' | 'canWrite' | 'canOwner' | 'canDownload'>);
57
+ /**
58
+ * What `branch` still proposes for `target`, minus everything the person it
59
+ * names already holds — or NULL when the branch's own copy could not be read
60
+ * at all.
61
+ *
62
+ * That distinction is the whole point of the return type. "The branch says
63
+ * nothing" is NOT "the branch proposes nothing", and the two arrive as the
64
+ * same empty diff: `pendingProposals` reads an unreadable file as carrying
65
+ * no grants (fail-closed, which is right for deciding what to SHOW). Used as
66
+ * the settle test it is fail-open in the one direction that cannot be taken
67
+ * back — it closes a request nobody answered.
68
+ *
69
+ * And unreadable is the normal case for a few seconds. These reads go
70
+ * through `origin/<branch>` in the DEFAULT branch's clone, whose fetch is
71
+ * throttled; a request opened moments ago names a ref that clone has not
72
+ * heard of. So a miss is retried behind a FORCED fetch before it is believed,
73
+ * and if it still misses the caller is told nothing rather than something
74
+ * false.
75
+ */
76
+ proposalsOn(branch: string, target: AccessRequestTarget, opts?: {
77
+ fresh?: boolean;
78
+ }): Promise<JoinProposal[] | null>;
79
+ /**
80
+ * Drop every proposal the live workspace has already ANSWERED, however it
81
+ * was answered.
82
+ *
83
+ * The file diff alone cannot see this. A request asking for `write` is
84
+ * satisfied by an `owner:` line, by a grant on a parent folder, or by a role
85
+ * or group the person has since joined — none of which put their email into
86
+ * this file, so the diff keeps reporting a proposal nobody can usefully
87
+ * accept (accepting writes a grant that changes nothing, and the request
88
+ * never retires). Asking the resolver the question the dialog's own grant
89
+ * would have to satisfy closes those requests instead of stranding them.
90
+ *
91
+ * A proposal naming a ROLE keeps the literal rule: "does this role hold the
92
+ * verb here" is not a question the per-person resolver answers, and a role
93
+ * proposal is answered by the live rules carrying it.
94
+ */
95
+ private unmetProposals;
96
+ /**
97
+ * Does `email` hold `verb` on the ITEM, on the default branch? The verb
98
+ * folds are the resolver's own (owner covers write, write covers read), so
99
+ * this asks exactly what an accepted grant would have to achieve.
100
+ *
101
+ * Best-effort in ONE direction: a resolver that fails answers "no", which
102
+ * leaves the request open. A failure must never close somebody's request for
103
+ * them.
104
+ */
105
+ private holds;
106
+ /**
107
+ * Open requests for one item, each carrying only what it still proposes.
108
+ * Requests with nothing left are reconciled away (rejected, branch deleted)
109
+ * and omitted.
110
+ *
111
+ * `key` is what named the branch (`joinBranchFor`) — a plugin's name for a
112
+ * Subscribe request, the item's own path for everything the Manage access
113
+ * dialog opens. `target` is the item whose rules those proposals edit; the
114
+ * two differ only for plugins, whose folder is not their name.
43
115
  *
44
- * `actor` is who the reconciliation acts as — a manager of the plugin, since
116
+ * `actor` is who the reconciliation acts as — an editor of the item, since
45
117
  * rejecting a change request requires write on everything it touches.
46
118
  */
47
- list(plugin: string, folder: string, crs: ChangeRequest[], actor: AuthUser): Promise<JoinRequest[]>;
119
+ list(key: string, target: AccessRequestTarget, crs: ChangeRequest[], actor: AuthUser): Promise<JoinRequest[]>;
48
120
  /**
49
121
  * Re-check ONE request and settle it if nothing is pending. Returns whether
50
122
  * it was settled. Called right after a grant so the banner updates in the
51
123
  * same round-trip instead of waiting for the next listing.
52
124
  */
53
- reconcile(plugin: string, folder: string, cr: ChangeRequest, actor: AuthUser): Promise<boolean>;
125
+ reconcile(key: string, target: AccessRequestTarget, cr: ChangeRequest, actor: AuthUser): Promise<boolean>;
126
+ /**
127
+ * What the branch proposes, with an EMPTY answer confirmed against freshly
128
+ * fetched refs before anyone acts on it. Null keeps its meaning: nothing
129
+ * could be read, so nothing can be said.
130
+ *
131
+ * The confirmation is there because an empty answer is the terminal one.
132
+ * These reads go through `origin/<branch>` in the default branch's clone,
133
+ * and that clone's fetch is throttled — so a branch whose remote-tracking
134
+ * ref is a few seconds old answers with the commit BEFORE the proposal was
135
+ * pushed. That is a file identical to live, which is an empty diff, which
136
+ * reads as "every grant has landed". A request nobody answered is then
137
+ * closed, its branch deleted, and the person told it was not accepted.
138
+ *
139
+ * One extra fetch, on the one path that cannot be undone — and when that
140
+ * fetch turns up a proposal after all, it is the answer, not a discarded
141
+ * second opinion.
142
+ */
143
+ private confirmedProposals;
54
144
  /**
55
145
  * Close a request whose proposals have all landed, and delete its branch.
56
146
  *
@@ -77,6 +167,9 @@ export declare class JoinRequestsService {
77
167
  * Refresh remote-tracking refs before reading them. Throttled inside, and
78
168
  * best-effort: a request pushed seconds ago is worth one fetch, but a fetch
79
169
  * failure must degrade to "read what we have" rather than empty the list.
170
+ *
171
+ * `force` skips the throttle — for the one caller that has already missed
172
+ * and must not mistake a stale ref list for an answer.
80
173
  */
81
174
  private refresh;
82
175
  }
@@ -1 +1 @@
1
- {"version":3,"file":"join-requests.service.d.ts","sourceRoot":"","sources":["../../../src/modules/plugins/join-requests.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,QAAQ,EACb,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACtB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAI1E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAoB,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAE1E,iEAAiE;AACjE,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,+EAA+E;IAC/E,SAAS,EAAE,YAAY,EAAE,CAAC;CAC3B;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBAAa,mBAAmB;IAE5B,OAAO,CAAC,QAAQ,CAAC,gBAAgB;IACjC,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,EAAE;gBAFF,gBAAgB,EAAE,gBAAgB,EAClC,QAAQ,EAAE,gBAAgB,EAC1B,EAAE,EAAE,IAAI,CAAC,SAAS,EAAE,eAAe,GAAG,oBAAoB,CAAC;IAG9E;;;;;;;OAOG;IACG,IAAI,CACR,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,aAAa,EAAE,EACpB,KAAK,EAAE,QAAQ,GACd,OAAO,CAAC,WAAW,EAAE,CAAC;IA2BzB;;;;OAIG;IACG,SAAS,CACb,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,EAAE,EAAE,aAAa,EACjB,KAAK,EAAE,QAAQ,GACd,OAAO,CAAC,OAAO,CAAC;IAcnB;;;;;;;;;;;OAWG;YACW,MAAM;IAgCpB;;;;;;;OAOG;YACW,MAAM;IAYpB;;;;OAIG;YACW,OAAO;CAKtB"}
1
+ {"version":3,"file":"join-requests.service.d.ts","sourceRoot":"","sources":["../../../src/modules/plugins/join-requests.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,QAAQ,EACb,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACtB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAI1E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4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