# WRNexusJS 0.4.0 upgrade manifest This replacement upgrades the uploaded WRNexusJS repository to the 0.4.0 platform baseline and preserves existing APIs where practical. Compared with the uploaded baseline archive, the final tree contains 45 added files, 214 modified files, and 15 removed obsolete or generated files. ## Main platform additions - Automatic installed/workspace package discovery through `package.json` `wrnexus.plugin` - Package-owned component directories - Page-scoped client runtimes - Virtual development assets with secure content types - Hashed production runtime assets - Package CSS entries and Tailwind scan sources - Package page/API/realtime routes and middleware - Package database migrations - Package DevToolbar panels - Dependency ordering, duplicate detection, cycle detection, and safe contribution validation - Runtime mount/unmount lifecycle during CSR navigation - Package-aware HMR and build reporting - `wrnexus inspect` commands and `wrnexus generate system` - 0.4 migration and compatibility tooling ## CAPTCHA integration `@wrnexus/captcha` is now self-contained and automatically discovered. The old duplicate copies are removed from `@wrnexus/ui` and the showcase. The package contributes its own component, runtime, Tailwind scan source, and DevToolbar audit. Developers use: ```bash bun add @wrnexus/captcha ``` ```wrn ``` They do not copy `captcha.js`, add a script tag, or manually register `captchaPlugin()` for normal use. The runtime is injected only on pages that render a CAPTCHA. ## Existing packages upgraded | Package | 0.4.0 addition or hardening | | ---------------------- | ------------------------------------------------------------------------------------ | | `@wrnexus/syntax` | syntax contract, feature/version metadata, ranges and diagnostics | | `@wrnexus/compiler` | compilation cache, dependency graph, cycle-safe cache implementation | | `@wrnexus/reactive` | watchers, resources, abort/supersession handling and cleanup scopes | | `@wrnexus/core` | service container, lifecycle, health, Problem Details, request IDs and idempotency | | `@wrnexus/router` | named routes, manifests, reverse URLs and app-over-package precedence | | `@wrnexus/ssr` | structured scripts, deduplication, CSP/SRI attributes and streaming output | | `@wrnexus/csr` | lazy package runtime loading and navigation mount/unmount lifecycle | | `@wrnexus/plugin` | discovery and package components/runtimes/assets/styles/routes/middleware/migrations | | `@wrnexus/dev-server` | virtual assets, TS runtime bundling, package HMR and migration integration | | `@wrnexus/cli` | package-aware builds, inspect commands, generator and 0.4 migration | | `@wrnexus/dev-toolbar` | package panels and platform snapshots | | `@wrnexus/styles` | package CSS/source support, package-only styles, token and contrast audits | | `@wrnexus/test` | request/context utilities, JSON/problem assertions, cookies and deferred helpers | | `@wrnexus/db` | migration ordering, cursor pagination, optimistic updates and tenant helpers | | `@wrnexus/queue` | durable stores, claims, priority, retry, dead-letter and processing safety | | `@wrnexus/pubsub` | resilient delivery and expiring defensive presence channels | | `@wrnexus/uploader` | safe object keys, inspection, policy enforcement and signed file tokens | | `@wrnexus/encryption` | versioned payloads and validated rotatable keyrings | | `@wrnexus/jwt` | key-ID signing, validated keyrings and safe decoding | | `@wrnexus/oauth` | state/PKCE storage, refresh, OIDC discovery and safe return URLs | | `@wrnexus/authz` | explainable decisions, owner policies, composition and filtering | | `@wrnexus/captcha` | automatic component/runtime, providers, audio, image styles, gates and guards | | `@wrnexus/validation` | async/cross-field refinements and OpenAPI conversion | | `@wrnexus/i18n` | fallbacks, coverage, formatters and plural messages | | `@wrnexus/ui` | component metadata and reference audits | | `@wrnexus/helpers` | retry, backoff, abortable sleep, timeouts and stable serialization | | `@wrnexus/tracking` | sampled/batched telemetry and reliable sink handling | | `@wrnexus/ai` | provider-neutral client, fallback providers and usage metadata | | `@wrnexus/mobile` | deep links, offline tasks and environment detection | | `@wrnexus/native` | capability manifests, permissions and target inspection | ## Upgrade and release tooling - Root/package/service versions: 0.4.0 - VS Code extension version: 0.4.0 - Workspace lock versions updated - `update.ts` includes a 0.4.0 migration - Legacy CAPTCHA scripts are archived by migration rather than silently destroyed - Obsolete generated/release artifacts removed - New commands: ```bash bun run verify:0.4 bun run validate:0.4 wrnexus doctor wrnexus inspect packages . wrnexus inspect plugins . wrnexus inspect routes . wrnexus inspect runtimes . wrnexus inspect assets . wrnexus generate system ``` ## Documentation included - `README.md` - `CHANGELOG-0.4.0.md` - `docs/ARCHITECTURE-0.4.md` - `docs/PACKAGE-RUNTIMES-0.4.md` - `docs/PACKAGE-UPGRADES-0.4.md` - `docs/UPGRADE-0.4.md` - `docs/TEST-CHECKLIST-0.4.md` - `VALIDATION-0.4.0.md` - `MANIFEST-0.4.0.md` See `VALIDATION-0.4.0.md` for the exact checks completed and the required final Bun validation commands.