docs: insert phase 19.6.1 Backend Administrators screen; record 19.7 post-research decisions

This commit is contained in:
Jakub Zych
2026-10-21 17:42:56 +02:00
parent 39c0c42db7
commit a0ad2b5fa3
2 changed files with 36 additions and 1 deletions

View File

@@ -41,6 +41,7 @@ Decimal phases appear between their surrounding integers in numeric order.
- [ ] **Phase 19.4.1: Early public demo on demo.summercms.io** - sm-demo-app with today's shared plugins on rome: open registration, guided tour, journal, bm's presentation system, quizzes, payments; backend by request
- [x] **Phase 19.5: Social login in sm-user-plugin** - Google and Facebook login with the SPA one-time-code handoff (completed 2026-10-21)
- [ ] **Phase 19.6: Two-factor auth and device flow in sm-user-plugin** - TOTP, WebAuthn, email and recovery codes, trusted devices, device authorization
- [ ] **Phase 19.6.1: Backend Administrators screen** - Admins and roles CRUD in cabana, WinterCMS-style, with server-side privilege rules
- [ ] **Phase 19.7: Generic MCP module** - Opt-in MCP endpoint, plugin-declared tools filtered by permissions, one connector per person via OAuth and a verified account link
- [ ] **Phase 19.8: Console commands overhaul** - `diary` logging module, Artisan-grade global flags, help and `list` in `bonfire`, sweep of every command
- [ ] **Phase 20: Demo instance with every shared plugin** - Add the chat family (chat, channels, video calls, chatbots, forum, herald, friends) to the live demo from Phase 19.4.1
@@ -1410,10 +1411,26 @@ Plans:
**Wave 4** *(blocked on Wave 3 completion)*
- [ ] 19.6-04-PLAN.md — Unit tests for every decision, login-path invariant, PHP security test map, security review with the explicit D-14 section, scripts/check-phase19.6.sh, gated release of post-release fixes (wave 4)
### Phase 19.6.1: Backend Administrators screen (INSERTED)
**Goal:** cabana gets WinterCMS's Administrators screens, so backend admins and their roles are managed in the admin SPA instead of only through `admin:*` console commands. Kept short (1-2 plans): it reuses cabana's CRUD, permission field and record actions, and follows the sm-user-plugin Users/Groups screens and WinterCMS `Backend\Controllers\Users`/`UserRoles`.
**Depends on:** Phase 8 (cabana); 19.7 builds on it (the frontend-link record action lands on this screen)
**Repos:** `summercms.go`
**Requirements**: TBD
**Success Criteria** (what must be TRUE):
1. An admin with the new manage-administrators permission lists, creates, edits and deactivates backend users (login, email, name, role, password set/reset) and edits roles with the permission editor; existing cabana payloads and `admin:*` commands are unchanged.
2. Privilege rules hold on the server: only a superuser can create, edit or grant superuser; an admin cannot raise their own role or permissions; the last active superuser cannot be deactivated, demoted or deleted.
3. The record-action seam on the Administrators list is usable by plugins (19.7's link action), and unit tests cover the privilege rules.
**Plans:** 0 plans
Plans:
- [ ] TBD (run /msd-plan-phase 19.6.1 to break down)
### Phase 19.7: Generic MCP module (INSERTED)
**Goal:** A SummerCMS application can expose its plugins' APIs as an opt-in MCP endpoint inside the binary. Plugins declare their tools in Go, and an editor connects one MCP client once to reach both frontend-user tools and the backend tools of their linked admin account.
**Depends on:** Phase 8; todos `2026-10-17-plugin-registered-frontend-permissions` and `2026-10-17-frontend-backend-account-link`
**Depends on:** Phase 8, Phase 19.6.1; todos `2026-10-17-plugin-registered-frontend-permissions` and `2026-10-17-frontend-backend-account-link`
**Repos:** `summercms.go`, `sm-user-plugin`
**Design:** `.planning/notes/2026-10-17-generic-mcp-module.md`
**Requirements**: TBD
@@ -1561,6 +1578,7 @@ Phases execute in numeric order: 1 → 2 → 3 → 4 → 5 → 6 → 7 → 8 →
| 19.4.1. Early public demo on demo.summercms.io | 5/5 | In Progress| |
| 19.5. Social login in sm-user-plugin | 5/5 | Complete | 2026-10-21 |
| 19.6. Two-factor auth and device flow in sm-user-plugin | 0/TBD | Not started | - |
| 19.6.1. Backend Administrators screen (INSERTED) | 0/TBD | Not started | - |
| 19.7. Generic MCP module | 0/TBD | Not started | - |
| 19.8. Console commands overhaul (INSERTED) | 2/4 | In Progress| |
| 20. Demo instance with every shared plugin | 0/TBD | Not started | - |

View File

@@ -108,6 +108,23 @@ Out of scope: MCP resources (the capability is designed for them, but they ship
fonoteka.go and sm-bm-app must still build and pass at the bumped pins. Push, tag and repo work need the user's go-ahead.
### Decisions after research (2026-10-21, plan-phase)
- **D-32:** **Hybrid protocol.** pier also answers MCP 2026-07-28 clients, which have no sessions, through a stateless path next to D-25's stateful one (go-sdk v1.8.0 serves 2026-07-28 only statelessly). Both paths share identity, dispatch and per-principal filtering. Push for stateless clients follows the 2026-07-28 mechanism (`subscriptions/listen`). Amends D-25.
- **D-33:** **pier is compiled in only with a build tag** (for example `summercms_mcp` in `summer.yaml` `build.tags`, the `summercms_s3` pattern). Without the tag the binary carries no go-sdk. With the tag, the config flag still keeps pier off by default (D-30). Plugin-facing `pact` types stay SDK-free, so plugins compile either way. Amends D-30 and SC-1.
- **D-34:** **Admins set and remove links on the Administrators screen from Phase 19.6.1**, through its record-action seam. It is no longer a cabana "backend Users" screen 19.7 has to invent. Amends D-04 part 2 and D-07.
- **D-35:** Defaults taken from research:
- frontend tool filtering uses group grants, matching what `user.permission` enforces (not `MergedPermissions`);
- sessions bind to `(client_id, user_id)`, so they survive token refresh;
- the `ai` scope plays no part in the read/write ceiling;
- consent is served as JSON endpoints in sm-oauthserver-plugin, with a `/connect` page in vue-demo-app;
- the permission code is `golem15.users.manage_backend_links`.
- **D-36:** **Plan split, 5 plans** (user-confirmed):
1. framework seams;
2. the pier module and framework release;
3. sm-user-plugin;
4. oauthserver, Journal and demo;
5. unit tests, `check-phase19.7.sh` and the security review.
### Claude's Discretion
- Exact Go identifiers: the pact capability and tool/prompt struct names, the link service, the context marker, the table name and the permission code.
- Config key spellings (enable flag, endpoint path with default `/mcp`, the personal-token flag, the session TTL).