Skip to content

feat(plugins): plugin-ecosystem platform layer (0192) - #138

Merged
crs48 merged 5 commits into
mainfrom
feat/plugin-ecosystem-platform-0192
Jun 17, 2026
Merged

feat(plugins): plugin-ecosystem platform layer (0192)#138
crs48 merged 5 commits into
mainfrom
feat/plugin-ecosystem-platform-0192

Conversation

@crs48

@crs48 crs48 commented Jun 17, 2026

Copy link
Copy Markdown
Owner

What

Implements the enforceable platform substrate from exploration
0192,
built on the 0189 FeatureModule chassis. This is the layer beneath the
marketplace, authoring DX, and trust story — the parts that can be enforced and
unit-tested without the running app.

New @xnetjs/plugins/ecosystem modules (all exported from @xnetjs/plugins):

Module What it does
capability-guard Turns the declared ModuleCapabilities (schemaWrite/schemaRead/network) into runtime gates via a Proxy over the plugin's ExtensionContext store — the one choke point a plugin can't route around. A write outside the grant throws CapabilityError.
provenance-trust + consent Derive trust tier from install provenance (never self-declared); wire the previously-dead requiresCapabilityReprompt into the install flow; render a headless consent decision (*/secret grants flagged danger).
compatibility Dependency-free semver subset; gates installs on xnetVersion; hasUpdate.
dependencies Inter-plugin deps: manifest.dependencies, topo-sort install order, 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 (no verifier ⇒ "unverified", never a false green).
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.

Why

0189 shipped ModuleCapabilities as 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-plugin scaffolder + hot-reload, the AI-authoring UI, the
WASM/Extism hub tier, the published registry.json repo + Sigstore CI, and the
first-party importer/billing/GitHub migrations. The substrate here is what those
consume.

Tests / gates

  • 56 new tests across 6 files; full @xnetjs/plugins suite 432 green
    (incl. the unchanged 25-test registry.test.ts — back-compat confirmed).
  • End-to-end: a capability-violating write throws CapabilityError and never
    reaches 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.mdx gains an Ecosystem APIs section covering every new export.

🤖 Generated with Claude Code

xNet Test and others added 3 commits June 17, 2026 08:43
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>
@crs48
crs48 temporarily deployed to pr-138 June 17, 2026 16:10 — with GitHub Actions Inactive
@crs48
crs48 temporarily deployed to pr-138 June 17, 2026 16:13 — with GitHub Actions Inactive
github-actions Bot added a commit that referenced this pull request Jun 17, 2026
@github-actions

github-actions Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Preview removed for PR #138.

@crs48
crs48 temporarily deployed to pr-138 June 17, 2026 16:38 — with GitHub Actions Inactive
github-actions Bot added a commit that referenced this pull request Jun 17, 2026
@crs48
crs48 merged commit 642a25a into main Jun 17, 2026
8 checks passed
github-actions Bot added a commit that referenced this pull request 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)
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