@bevel-software/platform-core-backend 0.9.0 → 0.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -110,11 +110,17 @@ Write access to any path is governed by `roles.yaml` (who has which role) and
110
110
  - **Roles** in `roles.yaml` map a role name to a list of emails. Role names are
111
111
  case- and whitespace-insensitive (`Admin` = `admin` = `ADMIN`; `Product Team`
112
112
  = `product team`). The reserved name `deny` cannot be used.
113
- - **Access rules** live in `access.md` files. Each declares a `write:` list
114
- whose entries are either grants (bare principal — a role name or
115
- `Name <email>`) or denials (the lowercase word `deny`, a space, then the
116
- principal). Capitalised forms like `Deny` are *not* triggers; they are
117
- treated as part of a name.
113
+ - **Access rules** live in `access.md` files, which carry **two blocks with two
114
+ scopes**: the body declares the rules for the folder the file sits in, and the
115
+ frontmatter declares who may read and write that `access.md` itself. Each
116
+ block names verbs (`read`, `write`, `download`, `owner`) whose entries are
117
+ either grants (bare principal — a role name or `Name <email>`) or denials
118
+ (the lowercase word `deny`, a space, then the principal). Capitalised forms
119
+ like `Deny` are *not* triggers; they are treated as part of a name.
120
+ - **Keep an `access.md` body pure YAML**, with any explanation in `#` comments.
121
+ A body that does not parse as YAML naming at least one verb is read in the
122
+ older format instead, where the FRONTMATTER carried the folder's rules — so a
123
+ stray line of prose silently changes which block governs the folder.
118
124
  - **Resolution** walks repo root → file directory, accumulating per-principal
119
125
  state. User-level entries trump role-level entries. A role denial removes
120
126
  only that role's contribution; it does not undo grants from other roles.
@@ -1,36 +1,46 @@
1
1
  ---
2
+ # Frontmatter governs THIS FILE — who may change the repository-wide rules below.
3
+ owner:
4
+ - Admin
5
+ ---
6
+ # Body governs the FOLDER. This is the root of the access-control tree, so every
7
+ # path inherits what is declared here unless a nearer access.md overrides it.
8
+ #
9
+ # Two blocks, two scopes: the frontmatter above is about this file, the body
10
+ # here is about the folder. Keep the body pure YAML and put prose in `#`
11
+ # comments like these — a body that does not parse as YAML naming at least one
12
+ # verb falls back to the older format, in which the FRONTMATTER carried the
13
+ # folder's rules. That fallback is silent.
14
+ #
15
+ # Verbs are read, write, download and owner. `owner` implies the rest and
16
+ # `write` implies `read`. Read is default-deny: a folder with no `read:` grant
17
+ # is invisible to everyone except admins, who read through `write: Admin`.
18
+ #
19
+ # Each entry is a grant (a bare principal) or a denial (the lowercase word
20
+ # `deny`, a space, then the principal — capitalised forms like `Deny` are
21
+ # treated as part of a name). A principal is a role name from roles.yaml,
22
+ # matched case-insensitively, or a user reference in `Name <email>` form.
23
+ # See roles.yaml for the identity to role mapping.
24
+ #
25
+ # To tighten or widen a subtree, drop an access.md into any folder at any depth,
26
+ # with the same two blocks. For example, in KnowledgeBase/Finance/access.md:
27
+ #
28
+ # ---
29
+ # owner:
30
+ # - Admin
31
+ # ---
32
+ # read:
33
+ # - Finance
34
+ # write:
35
+ # - Admin
36
+ # - Jane Doe <jane.doe@example.com>
37
+ # - deny Mallory Bad <mallory@example.com>
38
+ #
39
+ # Resolution walks the repo root down to the file's own directory; for each
40
+ # principal, the closest rule naming them wins. Rules are enforced at runtime,
41
+ # so a malformed roles.yaml or access.md surfaces when access is resolved.
2
42
  write:
3
43
  - Admin
4
44
  download:
5
45
  - Admin
6
46
  owner: []
7
- ---
8
-
9
- # Repository access
10
-
11
- This file is the root of the access-control tree for this knowledge base. It grants
12
- write access only to the `Admin` role by default. Subfolders can broaden or narrow
13
- access by adding their own `access.md`.
14
-
15
- See [roles.yaml](roles.yaml) for the identity → role mapping. Access resolution and validation
16
- run in the Bevel platform.
17
-
18
- ## Adding a folder-level rule
19
-
20
- Drop an `access.md` into any folder, at any depth. Frontmatter
21
- only — the body is ignored. Example:
22
-
23
- ```yaml
24
- ---
25
- write:
26
- - Admin
27
- - Editor
28
- - Jane Doe <jane.doe@example.com>
29
- - deny Mallory Bad <mallory@example.com>
30
- ---
31
- ```
32
-
33
- Each entry is either a grant (bare principal) or a denial (`deny <principal>` —
34
- **lowercase `deny` only**; capitalised forms like `Deny` are treated as part of a
35
- name). A principal is either a role name (matched case-insensitively against
36
- `roles.yaml`) or a user reference in `Name <email>` form.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bevel-software/platform-core-backend",
3
- "version": "0.9.0",
3
+ "version": "0.9.1",
4
4
  "description": "Open-source core backend of the Bevel platform: git-backed knowledge workspace, workflow (branches/change requests/locks/SSE), skills, tools, secrets vault, access control and the remote MCP surface.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -46,8 +46,8 @@
46
46
  "pg": "^8.20.0",
47
47
  "yaml": "^2.9.0",
48
48
  "zod": "^3.24.0",
49
- "@bevel-software/platform-mcp-core": "0.9.0",
50
- "@bevel-software/platform-shared": "0.9.0"
49
+ "@bevel-software/platform-mcp-core": "0.9.1",
50
+ "@bevel-software/platform-shared": "0.9.1"
51
51
  },
52
52
  "devDependencies": {
53
53
  "@types/adm-zip": "^0.5.8",