docs(state): insert phase 32.2 and record its context session

This commit is contained in:
Jakub Zych
2026-11-20 20:39:26 +01:00
parent b70071060c
commit 6c44946dfa
2 changed files with 27 additions and 8 deletions

View File

@@ -1705,6 +1705,25 @@ Plans:
**Wave 6** *(blocked on Wave 5 completion)*
- [x] 32-06-PLAN.md — unit tests, additive and compat proof, framework patch release, plugin tags, demo mount, changelog
### Phase 32.2: MCP OAuth with administrator subjects (INSERTED)
**Goal:** As an editor of a blog-only application whose MCP tools are backend-guarded (Journal) and which has no frontend users, I want to add the site's `/mcp` as a connector and sign in once as my administrator account over OAuth, so that agents no longer need a hand-copied `g15_` personal token. Delivered as an additive, off-by-default backend-subject mode of `sm-oauthserver-plugin`, so applications on the frontend-user flow (with its verified account link) are unchanged. Decision note: `.planning/notes/2026-11-20-mcp-oauth-backend-subject.md`.
**Mode:** mvp
**Requirements**: TBD
**Depends on:** Phase 32.1 (MCP OAuth for plugin apps), Phase 19.7 (generic MCP module)
**Repos:** `summercms.go`, `sm-oauthserver-plugin`, `sm-grzybyfunkcjonalne-app`
**Plans:** 0 plans
**Success Criteria** (what must be TRUE):
1. With the backend-subject mode on, `/oauth/mcp/authorize` recognises a signed-in administrator from the cabana cookie session, sends an anonymous browser through the admin login and back, and shows a server-rendered, branded consent page; the issued grant carries the administrator (`BackendUserID`) and no frontend user. With the mode off (the default), every existing flow and test of `sm-oauthserver-plugin` and sm-bm-app passes unchanged.
2. `pier` resolves such a grant straight to the `backend` subject, with no account-link lookup; `tools/list` and tool calls are capped by the administrator's cabana permissions and the granted scopes, the same as a scope-limited `g15_` token.
3. Revoking the grant (a new connected-apps list on cabana My account), or deleting, deactivating or re-passwording the administrator, ends the grant's tokens and its open MCP sessions (`pact.MCPSubjectChanged`).
4. sm-grzybyfunkcjonalne-app mounts `golem15.oauthserver` in backend mode, its proxy routes the OAuth discovery and `/oauth/mcp/*` paths to the Go binary, and an MCP client (Claude connector) completes discovery, registration, sign-in and a Journal tool call over OAuth on a local stack; `g15_` personal tokens keep working.
5. Module READMEs, `docs/` pages and the app's DEPLOY.md are updated; the new code has unit tests in the phase's last plan; the framework and `sm-oauthserver-plugin` get patch tags.
Plans:
- [ ] TBD (run /msd-plan-phase 32.2 to break down)
### Phase 32.1: MCP OAuth for plugin apps: declared scopes, MCP subject on context, per-client MCP consent (INSERTED)
**Goal:** As an application whose plugins declare their own member token scopes, I want an agent connected to `/mcp` over OAuth to get the same tools, attribution and revocation as one using a personal token, so that OAuth sign-in can be switched on in production. A consuming app's agent-access work found three gaps (its D-36, D-37 and D-38); all three are additive and ship as patch releases of the framework (0.5.x) and `sm-oauthserver-plugin`.

View File

@@ -4,17 +4,16 @@ milestone: v1.0
current_phase: 30
current_phase_name: Płytarium cutover
status: planning
stopped_at: Phase 35 complete, ready to plan Phase 30
last_updated: "2026-11-19T14:08:02.608Z"
stopped_at: Phase 32.2 context gathered
last_updated: "2026-11-20T19:39:15.961Z"
last_activity: 2026-11-19
last_activity_desc: "Completed quick task 261119-kj8: sm-user-plugin JWT blacklist sweep as scheduled command"
state_head: 005fb4a2cb09b64dcd83483182e9327d736b6b77
state_head: b70071060c600f37c2d24cb230c21601031e53d1
progress:
total_phases: 52
total_phases: 53
completed_phases: 37
total_plans: 304
completed_plans: 293
percent: 77
gsd_state_version: "1.0"
milestone_name: milestone
---
@@ -368,6 +367,7 @@ Progress: [████████░░] 77%
- Phase 35 added: Mail templates and layouts editor: DB overrides of plugin-registered mail, editable seeded layouts, images; integer phase so follow-ups land as 35.x
- Phase 31.1 inserted after Phase 31: Phase 31 split at planning (2026-11-13): messaging routes of the WavePath community corpus
- Phase 31.2 inserted after Phase 31: Phase 31 split at planning (2026-11-13): satellites, zero-pending gate (31 D-15) and security review
- Phase 32.2 inserted after Phase 32: MCP OAuth with administrator subjects: backend-subject mode in sm-oauthserver-plugin so blog-only apps (grzybyfunkcjonalne) accept OAuth for backend-guarded Journal tools
### Decisions
@@ -1266,6 +1266,6 @@ Items acknowledged and carried forward from previous milestone close:
## Session Continuity
Last session: 2026-11-14T15:08:11.773Z
Stopped at: Phase 35 complete, ready to plan Phase 30
Resume file: None
Last session: 2026-11-20T19:39:14.066Z
Stopped at: Phase 32.2 context gathered
Resume file: .planning/phases/32.2-mcp-oauth-with-administrator-subjects/32.2-CONTEXT.md