Skip to content

feat(plugins): AI tool surface + extensible mentions + recommendations (0194 Phases 2 & 4) - #149

Merged
crs48 merged 2 commits into
mainfrom
feat/ecosystem-ai-tools-0194
Jun 17, 2026
Merged

feat(plugins): AI tool surface + extensible mentions + recommendations (0194 Phases 2 & 4)#149
crs48 merged 2 commits into
mainfrom
feat/ecosystem-ai-tools-0194

Conversation

@crs48

@crs48 crs48 commented Jun 17, 2026

Copy link
Copy Markdown
Owner

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() + an AiCommandExposure opt-in on CommandContribution (aiExposed/aiInputSchema/aiRisk/aiScopes/aiInvoke). Opted-in plugin commands become capability-scoped, callable AiCallableTools — 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 the plugins→labs edge. Refuses unvalidated generations; never publishes without consent; stamps ai-generated provenance via scriptToPluginManifest.

Phase 4 — Editor seams + smart marketplace

  • mentionProviders contribution point — makes the [[/#/@ typeaheads plugin-extensible (a GitHub plugin makes @ resolve issues; a CRM plugin makes it resolve contacts). Full wiring mirrors importers. 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.
  • 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

  • 24 new tests across 4 files; full @xnetjs/plugins suite 476 green (existing registry/manifest tests unchanged — the new contribution point is additive).
  • tsc clean, 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 /ai editor 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

xNet Test and others added 2 commits June 17, 2026 12:40
…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>
@crs48
crs48 temporarily deployed to pr-149 June 17, 2026 19:48 — with GitHub Actions Inactive
@github-actions

github-actions Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Preview removed for PR #149.

github-actions Bot added a commit that referenced this pull request Jun 17, 2026
@crs48
crs48 merged commit 9baf2f2 into main Jun 17, 2026
9 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 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)
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