Plugins installed while verified had stale trust values in the DB.
The load route now re-checks the registry so revoked plugins correctly
trigger the unverified warning dialog.
- proxy.ts: early return NextResponse.next() when isDemo
- auth.config.ts: authorized() returns true when isDemo
- Demo instance is now fully public as designed in the architecture
- Guard install-redirect, install, uninstall, grant-token routes with
isPluginInstallEnabled check (returns 403 on demo edition)
- Expose edition field in setup-status endpoint for marketplace detection
- Remove redundant JS frustum culling (Cesium handles natively via GPU)
- Static entities (no speed/heading) only horizon-culled every 30 frames
- Dynamic entities (aviation) still update per frame
- Cache animatables array to avoid per-frame allocation
- Use distanceSquared to avoid sqrt in hot path
The async chunked processor (renderEntitiesChunked) spread entity processing
across multiple requestAnimationFrame frames. When plugin polling triggered a
re-render mid-flight, the old run was cancelled but stale primitives remained
in the shared map, causing brief ghost point flashes.
Switch to synchronous renderEntities so all entities are processed atomically
in a single frame, eliminating the race condition.
- Add GET /api/marketplace/grant-token: issues marketplace JWT for users
configuring instance URL from Manage page (no install required)
- Update GET /api/marketplace/load: skip trust:'built-in' plugins (already
in AppShell) and invalid/empty manifests from legacy installs
- Fix CORS on GET /api/auth/setup-status (needed by marketplace Test Connection)
- Fix AUTH_SECRET variable name in marketplaceToken.ts (was NEXTAUTH_SECRET)
- Fix btoa Unicode error in InstallButton (unescape+encodeURIComponent)
- Fix bundle plugin manifests missing entry field in getInstallManifest()
- Add top-level try/catch in install-redirect route for better error handling
- Update artifacts/marketplace design doc to reflect current implementation
- Add lib/marketplace/marketplaceToken.ts: issueMarketplaceToken() and
verifyMarketplaceToken() using jose JWT signed with NEXTAUTH_SECRET,
30-day expiry, scope:'marketplace' claim (stateless, no DB needed)
- Update lib/marketplace/auth.ts: validateMarketplaceAuth now accepts
session OR marketplace JWT OR legacy bearer token (in that order)
- Update api/marketplace/install-redirect/route.ts: issue JWT on
successful install and append ?token=<jwt> to redirect URL
- Add marketplaceToken.test.ts: 5 tests covering round-trip, tamper,
wrong secret, and wrong scope (node environment for jose compat)