feat(plugins): AI tool surface + extensible mentions + recommendations (0194 Phases 2 & 4) - #149
Merged
Merged
Conversation
…Lab→Plugin pipeline (0194 Phase 2) - contributions: CommandContribution gains an `AiCommandExposure` opt-in (`aiExposed`/`aiInputSchema`/`aiRisk`/`aiScopes`/`aiInvoke`). - ai-surface/contribution-tools: `contributionsAsAiTools()` wraps opted-in commands as capability-scoped, callable `AiCallableTool`s (AiToolDefinition + invoke) — the agent's tool surface grows with installed plugins. Exposure is never implicit. - ecosystem/ai-pipeline: `runAiPluginPipeline(input, ports)` — the headless AI→Lab→Plugin assembly line (generate → run-in-lab → consent → publish) over injected ports, so it's testable and free of the plugins→labs edge. Refuses unvalidated generations; never publishes without consent; stamps `ai-generated` provenance via scriptToPluginManifest. 12 new tests; plugins suite 464 green; typecheck/eslint/prettier/fallow clean. Deferred: the labs agent-tools → AI-tool adapter + MCP registration (app-side). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ions (0194 Phase 4) - mention-providers: a new `mentionProviders` contribution point makes the `[[`/`#`/`@` typeaheads plugin-extensible (a plugin adds a new entity type to a trigger). Full wiring mirrors `importers` (registry + ctx.registerMentionProvider + manifest field + static registration). `resolveMentionProviders` is the consumer logic: parallel fan-out, priority merge, id dedup, per-provider timeout, throw-resilient — one slow/broken provider can't block or break the menu. - marketplace: `recommendExtensions(index, signals, opts)` — weighted category/keyword ranking over the index, excludes installed, install-count tiebreak. The AI brain supplies the signals; this returns the shortlist. 12 new tests; plugins suite 476 green; typecheck/eslint/prettier/fallow clean. Deferred (app-side): editor wiring of the resolver, custom-block rendering, embedding-based semantic search. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
|
Preview removed for PR #149. |
crs48
added a commit
that referenced
this pull request
Jun 17, 2026
…(0194 Phase 1) (#162) ## What Lands the **runtime adapter** — the last architectural Phase 1 item of exploration [0194](docs/explorations/0194_[_]_EXTENSIBILITY_FABRIC_PLUGINS_LABS_AI_EDITOR.md): run user/marketplace-tier plugin code on the *same* labs runtime ladder, instead of a separate plugin sandbox. - **`runPluginCode(ladder, { code, trustTier, … })`** + **`ladderTierForTrust`** route `user`→`sandbox` (SES/QuickJS) and `marketplace`→`app` (iframe), and **reject `first-party`** (it runs in the host realm, not the ladder). - The ladder is a **structural port** (`PluginRuntimeLadder`), not an `@xnetjs/labs` import — so there's **no `plugins→labs` cycle** (labs already depends on plugins); the host passes its concrete ladder. Also **backfills the public API**: `runAiPluginPipeline` (Phase 2) and `recommendExtensions` (Phase 4) were added to the ecosystem barrel in #149 but never re-exported from `@xnetjs/plugins` — now surfaced, along with the new runtime exports. ## Gates - **6 new tests**; full `@xnetjs/plugins` suite **482 green**; `tsc` clean; eslint + prettier clean (prettier re-checked after eslint-fix); `fallow` reports **no issues in 4 changed files**. ## Remaining The registry *switch* to this runtime (replacing the current sandbox path) + the perf benchmark vs the 0184 budgets — the exploration gates that on no regression, so it's its own focused change. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
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
Two more phases of exploration 0194 (the convergence roadmap), building on the merged Phase 1 (
@xnetjs/trust). All testable, package-level substrate.Phase 2 — AI drives the ecosystem
contributionsAsAiTools()+ anAiCommandExposureopt-in onCommandContribution(aiExposed/aiInputSchema/aiRisk/aiScopes/aiInvoke). Opted-in plugin commands become capability-scoped, callableAiCallableTools — the agent's tool surface grows with installed plugins. Exposure is never implicit.runAiPluginPipeline()— the headless AI→Lab→Plugin assembly line (generate → run-in-lab → consent → publish) over injected ports, so it's testable and free of theplugins→labsedge. Refuses unvalidated generations; never publishes without consent; stampsai-generatedprovenance viascriptToPluginManifest.Phase 4 — Editor seams + smart marketplace
mentionProviderscontribution point — makes the[[/#/@typeaheads plugin-extensible (a GitHub plugin makes@resolve issues; a CRM plugin makes it resolve contacts). Full wiring mirrorsimporters.resolveMentionProvidersis the consumer logic: parallel fan-out, priority merge, id dedup, per-provider timeout, throw-resilient — one slow/broken provider can't block or break the menu.recommendExtensions()— weighted category/keyword ranking over the marketplace index, excludes installed, install-count tiebreak. The AI brain supplies the signals; this returns the shortlist.Why
Phase 1 unified the trust substrate; these make the AI a first-class ecosystem participant (the 2026 MCP-composable lesson) and open the editor's typeaheads + the marketplace to plugins — all inheriting the 0192 capability/consent/provenance gates.
Gates
@xnetjs/pluginssuite 476 green (existing registry/manifest tests unchanged — the new contribution point is additive).tscclean, eslint + prettier clean,fallow audit --changed-since origin/main(with istanbul coverage) reports no issues in 16 changed files.Deferred (app-side, noted in checklist)
The labs agent-tools→AI-tool adapter + MCP registration; Phase 3 (the
/aieditor surface); the editor wiring of the mention resolver; custom-block/AI-Lab-block rendering; embedding-based semantic search. Each needs the running app/editor or cross-package integration.🤖 Generated with Claude Code