Skip to content

feat(trust): extract @xnetjs/trust, unify labs+plugins trust (0194 Phase 1) - #145

Merged
crs48 merged 1 commit into
mainfrom
feat/unified-trust-0194
Jun 17, 2026
Merged

feat(trust): extract @xnetjs/trust, unify labs+plugins trust (0194 Phase 1)#145
crs48 merged 1 commit into
mainfrom
feat/unified-trust-0194

Conversation

@crs48

@crs48 crs48 commented Jun 17, 2026

Copy link
Copy Markdown
Owner

What

Exploration 0194's keystone (Phase 1): extract the shared provenance→trust logic into a new zero-dep MIT leaf package, @xnetjs/trust, and have both @xnetjs/labs and @xnetjs/plugins consume it — deleting the duplication.

Why

packages/labs/src/trust.ts and packages/plugins/src/ecosystem/provenance-trust.ts were byte-for-byte identical. 0192 mirrored the labs logic into plugins deliberately, to avoid a plugins → labs dependency edge (labs already depends on plugins, so the reverse would cycle). A tiny zero-dep leaf both can depend on is the clean fix — and it's the structural "tell" the whole 0194 convergence roadmap is built around.

Changes

  • packages/trust (new) — InstallProvenance / TrustTier / SandboxKind + deriveTrustTier / requiresCapabilityReprompt / sandboxForTier, with 10 tests.
  • labs/src/trust.ts + labs/src/runtime/types.ts — re-export from @xnetjs/trust; LabInstallSource and LabTrustTier preserved as aliases of the shared types.
  • plugins/ecosystem/provenance-trust.ts — re-export; InstallProvenance / PluginTrustTier / SandboxKind + the three functions preserved.
  • The duplicated bodies are gone; public APIs unchanged.
  • vitest.config.ts (alias + unit project include) and pnpm-lock.yaml updated for the new workspace package.

Scope

This is Phase 1 only (the substrate unification). The labs-ladder-as-plugin-runtime adapter + benchmark are deferred (they need a port to avoid the cycle + a perf gate), as are Phases 2–4 (AI tools, AI-in-editor, editor seams). Each is a follow-up.

Gates

  • No hub impact — the hub depends on neither labs nor plugins.
  • trust (10) + plugins (452) + labs (46) suites green and unchanged (backward-compatible); tsc clean across all three; eslint + prettier clean; fallow audit --changed-since origin/main reports no issues in 12 changed files.

🤖 Generated with Claude Code

…ase 1)

Exploration 0194's keystone: the labs and plugins ecosystems carried
byte-for-byte identical provenance→trust logic (0192 deliberately mirrored
labs/trust.ts into plugins/ecosystem/provenance-trust.ts to avoid a
plugins→labs dependency edge — labs already depends on plugins). This extracts
the shared logic into a new zero-dep MIT leaf package both consume.

- packages/trust: InstallProvenance / TrustTier / SandboxKind +
  deriveTrustTier / requiresCapabilityReprompt / sandboxForTier (10 tests).
- labs/src/trust.ts + labs/src/runtime/types.ts: re-export from @xnetjs/trust,
  preserving LabInstallSource / LabTrustTier as aliases.
- plugins/ecosystem/provenance-trust.ts: re-export, preserving InstallProvenance
  / PluginTrustTier / SandboxKind and the three functions.
- The duplicated bodies are gone; public APIs unchanged.

No hub impact (hub depends on neither labs nor plugins). trust (10) + plugins
(452) + labs (46) suites green; typecheck/eslint/prettier/fallow clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@crs48
crs48 temporarily deployed to pr-145 June 17, 2026 17:25 — with GitHub Actions Inactive
@github-actions

github-actions Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Preview removed for PR #145.

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