Skip to content

feat: mirror the split contract (plugins own their extension points) - #2

Merged
zumbrunn merged 13 commits into
mainfrom
feat/own-contributions
Nov 10, 2026
Merged

zumbrunn merged 13 commits into
mainfrom
feat/own-contributions

Conversation

@zumbrunn

@zumbrunn zumbrunn commented Nov 7, 2026 •

Copy link
Copy Markdown
Member

Part of duneorg/dune#127. Stacked on #1; mirrors the core contract-split PR (duneorg/dune#133).

Extension points belong to the plugin that reads them: AdminPageRegistration, AdminRouteRegistration, ContentEditorPlugin and the bar-action types leave this contract (core never read them). ResponseTransformContext carries capabilities instead of adminPrefix and barActions.

(The first version of this PR used module augmentation, which JSR rejects in a published package; #3 replaces it with typed keys.)

🤖 Generated with Claude Code

zumbrunn and others added 9 commits November 6, 2026 13:41
…nd form contracts

First slice of the plugin contract. Copied from @dune/core where the shape
is already the public one, narrowed where core's is wider than a plugin
needs (SearchEngineCreateContext).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… (slice 2a)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ions (slice 2b)

DunePlugin, PluginApi, MountApi, HookRegistry, HookContext and the hook events;
the capability slot and contribution types; a narrow DuneConfig and PluginAuthz;
PluginRuntime with narrow structural interfaces for the engine, router, theme
loader, search, flex, submissions, sections, metrics and jobs. Handlers and
plugin callbacks are bivariant so core's wider contexts are accepted.

Also drops two unused imports left by slice 2a.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
User loses avatarUrl, providerId, linkedProviders, lastSeenAt and
stripeCustomerId; UserStore loses getByProvider, linkProvider and
unlinkProvider. PageIndex loses gated, roles, publishAt, unpublishAt, fileUrl,
termPageFor and coverImage. Nothing in the first-party plugins or the testing
harness reads them; adding a field later is additive, removing one is not.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
providerId, linkedProviders, getByProvider, linkProvider and unlinkProvider are
what a third-party OAuth login provider is built from. No first-party plugin
uses them yet; they stay so one can be written against the 1.0 contract.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Where the admin is mounted. Core reads it instead of assuming /admin; with no
provider there is no admin.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…une#125)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…wn extension points (#127)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@zumbrunn
zumbrunn changed the base branch from main to feat/plugin-contract November 7, 2026 20:06
zumbrunn and others added 3 commits November 10, 2026 13:50
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
# Conflicts:
#	CHANGELOG.md
#	src/capabilities.ts
#	src/hooks.ts
#	src/mod.ts
@zumbrunn
zumbrunn changed the base branch from feat/plugin-contract to main November 10, 2026 15:33
@zumbrunn
zumbrunn merged commit fb5aed5 into main Nov 10, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant