You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Replace the untyped ctx.adminContext bag with a typed, optional capability registry #97
Core and the admin plugin communicate through BootstrapResult.adminContext, a Record<string, unknown> | null that plugin-admin fills and core reads with casts. Core reads it in four files:
src/cli/serve.ts: writes jobScheduler, reads the scheduler and executeScheduledAction
src/runtime/register-feeds.ts: staging (staged-content preview in feeds)
src/runtime/register-middleware.ts and src/runtime/server.ts: auth (admin-session detection for role-gated pages)
It is untyped, so the shape is an unwritten contract that would be frozen at 1.0 by accident. It also hides which public behaviour depends on an admin being present.
Proposal
A typed, optional capability registry owned by core. An admin (or any plugin) contributes capabilities through typed slots (staging, auth / session resolver, jobs, and whatever else the audit finds); core reads them with proper types and treats a missing slot as "feature absent". "No admin" then just means "no contributions". adminContext is removed, not kept as an alias (deprecated bits are gone by 1.0).
Notes
Breaking for @dune/plugin-admin, which fills the bag today: ships in 0.36 with an admin major.
Feeds the @dune/plugin-api contract: the slot types belong in it.
Acceptance: the headless smoke test (admin off) keeps passing, and a test with a stub plugin contributing each slot shows core using it.
Done: the capability registry (#109), core consuming it (#110) and the removal of adminContext, adminServices, adminPages, adminBarActions and mountEarly (#111), with the follow-ups that came out of the work (#112 to #116, #125, #126, #133, #134; later hardened in #144). Acceptance: the headless smoke test passes in CI, and the registry is covered by tests with stub plugins contributing slots and points (tests/plugin-api/capabilities_test.ts); @dune/testing's stub admin and conformance suite (testing#3 to #5) are the broader proof and ship with testing 2.0.0.
Activity
feat(plugin-api)!: core consumes capabilities instead of the adminCon…
feat(plugin-api)!: remove adminContext, adminServices, adminPages, ad…
feat(plugin-api): a capability registry for what plugins provide (#97,…
feat(plugin-api): admin.routes contribution point for guarded admin r…
feat(plugin-api)!: core consumes capabilities instead of the adminCon…
feat(plugin-api)!: remove adminContext, adminServices, adminPages, ad…
feat(plugin-api): admin.routes contribution point for guarded admin r…
feat(plugin-api)!: core consumes capabilities instead of the adminCon…
fix(plugin-api): core no longer assumes the built-in admin's cookie o…
feat(plugin-api)!: remove adminContext, adminServices, adminPages, ad…
feat(plugin-api): admin.routes contribution point for guarded admin r…
feat(plugin-api)!: remove adminContext, adminServices, adminPages, ad…
feat(plugin-api): admin.routes contribution point for guarded admin r…
fix(plugin-api): core no longer assumes the built-in admin's cookie o…
fix(plugin-api): core no longer assumes the built-in admin's cookie o…
6 remaining items
docs(skills): hook list no longer has dead events (#97)
feat(doctor)!: doctor --boot lists providers and checks the admin; re…
feat(plugin-api)!: MountApi.runtime replaces MountApi.bootstrap (#97,…
feat(plugin-api)!: the contract names no Fresh type (#97, decision 17)
refactor(plugin-api): keep createPluginRuntime internal, freeze the r…
feat(plugin-api)!: the contract names no Fresh type (#97, decision 17)
feat(plugin-api)!: MountApi.runtime replaces MountApi.bootstrap (#97) (…
feat(plugin-api)!: the contract names no Fresh type (#97, decision 17)
docs(plugin-api): say that an unannotated handler ctx is a PluginRout…
feat(plugin-api)!: the contract names no Fresh type (#97) (#115)
feat(config)!: remove config keys nothing read, warn on the dead ones…
feat(plugin-api)!: rename the inline-edit slot to editor.inline; excl…
feat(plugin-api)!: rename the inline-edit slot to editor.inline; excl…
zumbrunn commentedon Nov 10, 2026
Done: the capability registry (#109), core consuming it (#110) and the removal of
adminContext,adminServices,adminPages,adminBarActionsandmountEarly(#111), with the follow-ups that came out of the work (#112 to #116, #125, #126, #133, #134; later hardened in #144). Acceptance: the headless smoke test passes in CI, and the registry is covered by tests with stub plugins contributing slots and points (tests/plugin-api/capabilities_test.ts);@dune/testing's stub admin and conformance suite (testing#3 to #5) are the broader proof and ship with testing 2.0.0.