feat(plugins): plugin-ecosystem platform layer (0192) - #138
Merged
Conversation
The enforceable substrate beneath the marketplace, authoring DX, and trust story from exploration 0192, built on the 0189 FeatureModule chassis: - capability-guard: turns the declared ModuleCapabilities (schemaWrite/ schemaRead/network) into runtime gates via a Proxy over the plugin's NodeStore handle — the one choke point a plugin can't route around. - provenance-trust + consent: derive trust tier from install provenance, wire requiresCapabilityReprompt into the install flow, render a headless capability-consent decision (broad/secret grants flagged danger). - compatibility: dependency-free semver subset gating installs on xnetVersion. - dependencies: inter-plugin dependency declaration + resolution (topo sort, cycle detection, missing/mismatch reporting). - marketplace: registry.json index shape + pure browse/search/sort + rating aggregation + an injectable-fetch MarketplaceClient. - provenance: Sigstore-style verification contract, fail-closed by default. - testing: createTestPluginHarness — in-memory store + real registry for plugin authors to unit-test a manifest. PluginRegistry.install gains optional, back-compatible install gates (compatibility -> dependencies -> consent) and records provenance/trustTier. 56 new tests; full plugins suite (432) green; typecheck/eslint/prettier clean; fallow audit passes with coverage. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…tems - plugins.mdx: new "Ecosystem APIs" section (capability enforcement, provenance/trust + consent, version compatibility, dependencies, marketplace index/client, supply-chain provenance, test harness). - 0192 exploration: mark the shipped platform-layer checklist items ([x] capability guard, requiresCapabilityReprompt wiring, dependency resolution, compatibility gating, test kit, docs; [~] consent descriptor, network allowlist, marketplace data layer, provenance contract, ratings aggregation), with as-built notes for each. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
|
Preview removed for PR #138. |
This was referenced Jun 17, 2026
crs48
added a commit
that referenced
this pull request
Jun 18, 2026
…193/0194) (#201) The `changelog-section` required check was only added in #164, so the 0192/0193/0194 feature batch merged before it never got changelog entries. This backfills the 12 user-facing features that were missing, each dated to its merge day with its PR number and contributors: | PR | Entry | |----|-------| | #138 | A safer foundation for plugins | | #145 | One trust model across plugins and Labs | | #146 | Reliability you can see for managed hubs | | #148 | Drive your own coding agent from xNet | | #149 | AI that can act on your workspace | | #150 | Your Labs become AI tools | | #152 | Your agent can use your workspace | | #154 | AI edits, right inside the editor | | #155 | An agentic dev loop in your terminal | | #158 | Review AI edits before they apply | | #159 | Kick off agentic code tasks from xNet | | #162 | Plugins run on the Labs runtime | Skipped: PRs already covered by umbrella entries (#142 plugin ecosystem, #144 extensibility fabric, #147 automated changelog, #163 agent panel, #180 changelog gallery), internal-only changes (#139 schema authz — zero user-facing effect), and meta/test/docs PRs. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Implements the enforceable platform substrate from exploration
0192,built on the 0189
FeatureModulechassis. This is the layer beneath themarketplace, authoring DX, and trust story — the parts that can be enforced and
unit-tested without the running app.
New
@xnetjs/plugins/ecosystemmodules (all exported from@xnetjs/plugins):capability-guardModuleCapabilities(schemaWrite/schemaRead/network) into runtime gates via aProxyover the plugin'sExtensionContextstore — the one choke point a plugin can't route around. A write outside the grant throwsCapabilityError.provenance-trust+consentrequiresCapabilityRepromptinto the install flow; render a headless consent decision (*/secret grants flagged danger).compatibilityxnetVersion;hasUpdate.dependenciesmanifest.dependencies, topo-sort install order, cycle detection, missing/mismatch reporting.marketplaceregistry.jsonindex shape + pure browse/search/sort + rating aggregation + an injectable-fetchMarketplaceClient.provenancetestingcreateTestPluginHarness— in-memory store + real registry for plugin authors to unit-test a manifest.PluginRegistry.installgains optional, back-compatible install gates(compatibility → dependencies → consent) and records
provenance/trustTier.Why
0189 shipped
ModuleCapabilitiesas a declaration with no enforcement —worse than nothing, because it implies a guarantee that doesn't exist. This makes
the declaration load-bearing and adds the version/dependency/provenance/
marketplace/testing primitives the rest of 0192's roadmap builds on. Security
moves from sandbox-centric toward capability-centric.
Scope / deferred
This PR is the platform layer, not the UI/infra. Deferred (and noted as such
in the exploration checklist): the React marketplace + consent dialogs, the
create-xnet-pluginscaffolder + hot-reload, the AI-authoring UI, theWASM/Extism hub tier, the published
registry.jsonrepo + Sigstore CI, and thefirst-party importer/billing/GitHub migrations. The substrate here is what those
consume.
Tests / gates
@xnetjs/pluginssuite 432 green(incl. the unchanged 25-test
registry.test.ts— back-compat confirmed).CapabilityErrorand neverreaches the store; compatibility/dependency/consent gates block & allow as
expected; provenance fails closed.
tsc, eslint, prettier clean;fallow audit --changed-since origin/main(with istanbul coverage, as CI runs it) reports no issues in changed files.
Docs
plugins.mdxgains an Ecosystem APIs section covering every new export.🤖 Generated with Claude Code